From c995dcb4403248466b775679072cf742276e0a1b Mon Sep 17 00:00:00 2001 From: gitknilch Date: Sun, 24 Feb 2013 22:33:51 +0100 Subject: [PATCH 1/1] prepare for density-independent scaling approach --- src/de/cwde/shisensho/ShisenShoView.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/de/cwde/shisensho/ShisenShoView.java b/src/de/cwde/shisensho/ShisenShoView.java index 48d16cb..9872c66 100644 --- a/src/de/cwde/shisensho/ShisenShoView.java +++ b/src/de/cwde/shisensho/ShisenShoView.java @@ -11,6 +11,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Align; import android.graphics.Paint.Cap; @@ -88,10 +89,17 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback { tileWidth = tileset.getWidth()/tilesetCols; tileHeight = tileset.getHeight()/tilesetRows; tile = new Bitmap[tilesetRows*tilesetCols]; + + // align to screen + Matrix matrix = new Matrix(); + matrix.setScale(1.0f, 1.0f); // FIXME! + + // TODO: go on. + int k=0; for (int i=0; i