mirror of
https://github.com/xdsopl/robot36.git
synced 2025-12-06 07:12:07 +01:00
do correct vertical scaling in case we want a higher horizontal resolution
This commit is contained in:
parent
0d5407f090
commit
bb183cb80e
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue