mirror of
https://github.com/xdsopl/robot36.git
synced 2026-04-05 14:25:25 +00:00
do correct vertical scaling in case we want a higher horizontal resolution
This commit is contained in:
parent
0d5407f090
commit
bb183cb80e
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue