add async replacement for oscim UrlTileSource/TileLoader

This commit is contained in:
Hannes Janetzek
2013-06-28 04:31:42 +02:00
parent d7c412f74f
commit 6f18e804e6
5 changed files with 935 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ public class GwtCanvas implements org.oscim.backend.canvas.Canvas {
@Override
public void setBitmap(Bitmap bitmap) {
this.bitmap = (GwtBitmap) bitmap;
this.bitmap.pixmap.setColor(0);
//this.bitmap.pixmap.setColor(0x00ffffff);
this.bitmap.pixmap.getContext().clearRect(0, 0, this.bitmap.getWidth(), this.bitmap.getHeight());
}
@@ -30,11 +30,11 @@ public class GwtCanvas implements org.oscim.backend.canvas.Canvas {
ctx.setFont(p.font);
if (p.stroke){
Log.d("", "stroke " + p.stroke + " " + p.color + " " + p.font + " "+ string);
//Log.d("", "stroke " + p.stroke + " " + p.color + " " + p.font + " "+ string);
ctx.setStrokeStyle(p.color);
ctx.strokeText(string, x, y);
} else{
Log.d("", "fill " + p.stroke + " " + p.color + " " + p.font + " "+ string);
//Log.d("", "fill " + p.stroke + " " + p.color + " " + p.font + " "+ string);
ctx.setFillStyle(p.color);
ctx.fillText(string, x, y);
}