cleanups
This commit is contained in:
parent
0b9e81a6c0
commit
2fa0a53fdd
@ -24,23 +24,23 @@ public class AndroidCanvas implements Canvas {
|
|||||||
final android.graphics.Canvas canvas;
|
final android.graphics.Canvas canvas;
|
||||||
|
|
||||||
public AndroidCanvas() {
|
public AndroidCanvas() {
|
||||||
this.canvas = new android.graphics.Canvas();
|
canvas = new android.graphics.Canvas();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBitmap(Bitmap bitmap) {
|
public void setBitmap(Bitmap bitmap) {
|
||||||
this.canvas.setBitmap(((AndroidBitmap) bitmap).mBitmap);
|
canvas.setBitmap(((AndroidBitmap) bitmap).mBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawText(String string, float x, float y, Paint stroke) {
|
public void drawText(String string, float x, float y, Paint stroke) {
|
||||||
this.canvas.drawText(string, x, y, ((AndroidPaint) stroke).mPaint);
|
if (string != null)
|
||||||
|
canvas.drawText(string, x, y, ((AndroidPaint) stroke).mPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBitmap(Bitmap bitmap, float x, float y) {
|
public void drawBitmap(Bitmap bitmap, float x, float y) {
|
||||||
this.canvas.drawBitmap(((AndroidBitmap) bitmap).mBitmap, x, y, null);
|
canvas.drawBitmap(((AndroidBitmap) bitmap).mBitmap, x, y, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user