Canvas: pass fill+stroke for drawing text

This commit is contained in:
Hannes Janetzek
2014-09-30 02:55:21 +02:00
parent a8641ce535
commit fa62602826
7 changed files with 54 additions and 59 deletions

View File

@@ -33,9 +33,13 @@ public class AndroidCanvas implements Canvas {
}
@Override
public void drawText(String string, float x, float y, Paint stroke) {
if (string != null)
canvas.drawText(string, x, y, ((AndroidPaint) stroke).mPaint);
public void drawText(String string, float x, float y, Paint fill, Paint stroke) {
if (string != null) {
if (stroke != null)
canvas.drawText(string, x, y, ((AndroidPaint) stroke).mPaint);
canvas.drawText(string, x, y, ((AndroidPaint) fill).mPaint);
}
}
@Override