From: gitknilch Date: Sun, 24 Feb 2013 21:33:51 +0000 (+0100) Subject: prepare for density-independent scaling approach X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/commitdiff_plain/c995dcb4403248466b775679072cf742276e0a1b?ds=inline prepare for density-independent scaling approach --- 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