summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-10-16 08:58:57 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-10-16 09:02:25 -0700
commite38600d5d427623d041eea68ca629b4575fef284 (patch)
tree93730bef2e621dfab27533caeff9ff0ed20b0cc0
parentdb72d07313158abaebec1f688e39cdf550540e41 (diff)
downloadandroid_packages_apps_WallpaperPicker-e38600d5d427623d041eea68ca629b4575fef284.tar.gz
android_packages_apps_WallpaperPicker-e38600d5d427623d041eea68ca629b4575fef284.tar.bz2
android_packages_apps_WallpaperPicker-e38600d5d427623d041eea68ca629b4575fef284.zip
Refactoring WallpaperOffsetInterpolator to a new file
Removing some us unused methods Change-Id: Ife790e5ca6848fa13dc3fab1bba1e6220bf83743
-rw-r--r--WallpaperPicker/src/com/android/photos/views/TiledImageView.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
index 6f7a530..759613d 100644
--- a/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
+++ b/WallpaperPicker/src/com/android/photos/views/TiledImageView.java
@@ -164,40 +164,6 @@ public class TiledImageView extends FrameLayout {
}
}
- private RectF mTempRectF = new RectF();
- public void positionFromMatrix(Matrix matrix) {
- if (mRenderer.source != null) {
- final int rotation = mRenderer.source.getRotation();
- final boolean swap = !(rotation % 180 == 0);
- final int width = swap ? mRenderer.source.getImageHeight()
- : mRenderer.source.getImageWidth();
- final int height = swap ? mRenderer.source.getImageWidth()
- : mRenderer.source.getImageHeight();
- mTempRectF.set(0, 0, width, height);
- matrix.mapRect(mTempRectF);
- matrix.getValues(mValues);
- int cx = width / 2;
- int cy = height / 2;
- float scale = mValues[Matrix.MSCALE_X];
- int xoffset = Math.round((getWidth() - mTempRectF.width()) / 2 / scale);
- int yoffset = Math.round((getHeight() - mTempRectF.height()) / 2 / scale);
- if (rotation == 90 || rotation == 180) {
- cx += (mTempRectF.left / scale) - xoffset;
- } else {
- cx -= (mTempRectF.left / scale) - xoffset;
- }
- if (rotation == 180 || rotation == 270) {
- cy += (mTempRectF.top / scale) - yoffset;
- } else {
- cy -= (mTempRectF.top / scale) - yoffset;
- }
- mRenderer.scale = scale;
- mRenderer.centerX = swap ? cy : cx;
- mRenderer.centerY = swap ? cx : cy;
- invalidate();
- }
- }
-
@Thunk class TileRenderer implements Renderer {
private GLES20Canvas mCanvas;