Mapsforge themes compatibility improvements #388 #100

This commit is contained in:
Emux
2017-09-02 18:36:49 +03:00
parent b695d43fee
commit f4f8eb8d1c
20 changed files with 276 additions and 229 deletions

View File

@@ -88,6 +88,14 @@ public class AndroidCanvas implements Canvas {
canvas.drawColor(color, color == Color.TRANSPARENT ? PorterDuff.Mode.CLEAR : PorterDuff.Mode.SRC_OVER);
}
@Override
public void fillRectangle(float x, float y, float width, float height, int color) {
RectF rect = new RectF(x, y, x + width, y + height);
android.graphics.Paint paint = new android.graphics.Paint();
paint.setColor(color);
canvas.drawRect(rect, paint);
}
@Override
public int getHeight() {
return canvas.getHeight();
@@ -97,12 +105,4 @@ public class AndroidCanvas implements Canvas {
public int getWidth() {
return canvas.getWidth();
}
@Override
public void fillRectangle(int x, int y, int width, int height, int color) {
RectF rec = new RectF(x, y, x + width, y + height);
android.graphics.Paint paint = new android.graphics.Paint();
paint.setColor(color);
canvas.drawRect(rec, paint);
}
}