Merge "Fix for issue 3400229 Pan and Zoom effect is not accurate in JAVA and JNI" into honeycomb

This commit is contained in:
Dheeraj Sharma
2011-01-30 15:20:49 -08:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 8 deletions

View File

@ -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());

View File

@ -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,