Loading src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java +2 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,8 @@ public class ImageFilterGradient extends ImageFilter { @Override public ImageFilter clone() throws CloneNotSupportedException { ImageFilterGradient filter = (ImageFilterGradient) super.clone(); for (int i = 0; i < mColors.length; i++) { filter.addColor(mColors[i], mPositions[i]); } System.arraycopy(mColors, 0, filter.mColors, 0, mColors.length); System.arraycopy(mPositions, 0, filter.mPositions, 0, mPositions.length); return filter; } Loading src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java +7 −7 Original line number Diff line number Diff line Loading @@ -89,12 +89,19 @@ public class ImageStraighten extends ImageShow { public void setActionUp() { mMode = MODES.UP; updatePreset(); } public void setNoAction() { mMode = MODES.NONE; } private void updatePreset() { ImagePreset copy = new ImagePreset(getImagePreset()); copy.setStraightenRotation(mImageRotation, mImageRotationZoomFactor); setImagePreset(copy); } public boolean onTouchEvent(MotionEvent event) { switch (event.getActionMasked()) { case (MotionEvent.ACTION_DOWN): Loading Loading @@ -232,13 +239,6 @@ public class ImageStraighten extends ImageShow { mImageRotationZoomFactor = (float) (rw / boundsRect.width()); ImagePreset copy = new ImagePreset(getImagePreset()); Log.v(LOGTAG, "creating a new image preset with rotation " + mImageRotation + " and zoom factor: " + mImageRotationZoomFactor); copy.setStraightenRotation(mImageRotation, mImageRotationZoomFactor); setImagePreset(copy); if (mMode == MODES.MOVE) { canvas.save(); canvas.clipPath(path); Loading Loading
src/com/android/gallery3d/filtershow/filters/ImageFilterGradient.java +2 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,8 @@ public class ImageFilterGradient extends ImageFilter { @Override public ImageFilter clone() throws CloneNotSupportedException { ImageFilterGradient filter = (ImageFilterGradient) super.clone(); for (int i = 0; i < mColors.length; i++) { filter.addColor(mColors[i], mPositions[i]); } System.arraycopy(mColors, 0, filter.mColors, 0, mColors.length); System.arraycopy(mPositions, 0, filter.mPositions, 0, mPositions.length); return filter; } Loading
src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java +7 −7 Original line number Diff line number Diff line Loading @@ -89,12 +89,19 @@ public class ImageStraighten extends ImageShow { public void setActionUp() { mMode = MODES.UP; updatePreset(); } public void setNoAction() { mMode = MODES.NONE; } private void updatePreset() { ImagePreset copy = new ImagePreset(getImagePreset()); copy.setStraightenRotation(mImageRotation, mImageRotationZoomFactor); setImagePreset(copy); } public boolean onTouchEvent(MotionEvent event) { switch (event.getActionMasked()) { case (MotionEvent.ACTION_DOWN): Loading Loading @@ -232,13 +239,6 @@ public class ImageStraighten extends ImageShow { mImageRotationZoomFactor = (float) (rw / boundsRect.width()); ImagePreset copy = new ImagePreset(getImagePreset()); Log.v(LOGTAG, "creating a new image preset with rotation " + mImageRotation + " and zoom factor: " + mImageRotationZoomFactor); copy.setStraightenRotation(mImageRotation, mImageRotationZoomFactor); setImagePreset(copy); if (mMode == MODES.MOVE) { canvas.save(); canvas.clipPath(path); Loading