X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/blobdiff_plain/d0e04237b00df7c11616f359200255a8b47e79d7..9c697f2994c6aec06a8a78e21a89227ee6c342b9:/src/de/cwde/shisensho/ShisenShoView.java diff --git a/src/de/cwde/shisensho/ShisenShoView.java b/src/de/cwde/shisensho/ShisenShoView.java index cb1a57c..9872c66 100644 --- a/src/de/cwde/shisensho/ShisenShoView.java +++ b/src/de/cwde/shisensho/ShisenShoView.java @@ -5,14 +5,13 @@ import java.util.Locale; import java.util.Timer; import java.util.TimerTask; -import de.cwde.shisensho.R; - import android.app.Activity; import android.content.Context; 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; @@ -64,6 +63,11 @@ class ShisenShoView extends SurfaceView implements SurfaceHolder.Callback { surfaceHolder.addCallback(this); } + public ShisenShoView(Context ctx) { + super((Context)ctx); + // silence lint? + } + private void paint(StatePaint pstate) { this.pstate=pstate; repaint(); @@ -85,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