do correct vertical scaling in case we want a higher horizontal resolution

This commit is contained in:
Ahmet Inan 2014-12-12 11:41:21 +01:00
parent 0d5407f090
commit bb183cb80e

View file

@ -308,7 +308,7 @@ public class ImageView extends SurfaceView implements SurfaceHolder.Callback {
py = 0.0f;
} else {
sx = (float)canvasWidth / bitmap.getWidth();
sy = sx;
sy = (float)canvasWidth / imageWidth;
px = 0.0f;
py = (canvasHeight - sy * bitmap.getHeight()) / 2.0f;
}