Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9803b843 authored by Dheeraj Sharma's avatar Dheeraj Sharma
Browse files

Fix for issue 3400229 Pan and Zoom effect is not accurate in JAVA and JNI

Change-Id: I6216e7e66be4bf0d7cfc74ee3bda7e22969a229a
parent 3c89f6d1
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -794,8 +794,8 @@ public class MediaImageItem extends MediaItem {
            return clipSettings;
        }

        PanZoomXa = (100 * start.width()) / width;
        PanZoomXb = (100 * end.width()) / width;
        PanZoomXa = (1000 * start.width()) / width;
        PanZoomXb = (1000 * end.width()) / width;

        clipSettings.clipPath = getDecodedImageFileName();
        clipSettings.fileType = mMANativeHelper.getMediaItemFileType(getFileType());
@@ -805,11 +805,11 @@ public class MediaImageItem extends MediaItem {
        clipSettings.endCutPercent = 0;
        clipSettings.panZoomEnabled = true;
        clipSettings.panZoomPercentStart = PanZoomXa;
        clipSettings.panZoomTopLeftXStart = (start.left * 100) / width;
        clipSettings.panZoomTopLeftYStart = (start.top * 100) / height;
        clipSettings.panZoomTopLeftXStart = (start.left * 1000) / width;
        clipSettings.panZoomTopLeftYStart = (start.top * 1000) / height;
        clipSettings.panZoomPercentEnd = PanZoomXb;
        clipSettings.panZoomTopLeftXEnd = (end.left * 100) / width;
        clipSettings.panZoomTopLeftYEnd = (end.top * 100) / height;
        clipSettings.panZoomTopLeftXEnd = (end.left * 1000) / width;
        clipSettings.panZoomTopLeftYEnd = (end.top * 1000) / height;
        clipSettings.mediaRendering
            = mMANativeHelper.getMediaItemRenderingMode(getRenderingMode());

+2 −2
Original line number Diff line number Diff line
@@ -1548,7 +1548,7 @@ videoEditClasses_createClipSettings(

            // Set the panZoomPercentStart field.
            pEnv->SetIntField(object, fieldIds.panZoomPercentStart,
                (100 - pSettings->xVSS.PanZoomXa));
                (1000 - pSettings->xVSS.PanZoomXa));

            // Set the panZoomTopLeftXStart field.
            pEnv->SetIntField(object, fieldIds.panZoomTopLeftXStart,
@@ -1560,7 +1560,7 @@ videoEditClasses_createClipSettings(

            // Set the panZoomPercentEnd field.
            pEnv->SetIntField(object, fieldIds.panZoomPercentEnd,
                (100 - pSettings->xVSS.PanZoomXb));
                (1000 - pSettings->xVSS.PanZoomXb));

            // Set the panZoomTopLeftXEnd field.
            pEnv->SetIntField(object, fieldIds.panZoomTopLeftXEnd,