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

@@ -31,6 +31,8 @@ import org.oscim.backend.canvas.Paint;
public class AwtPaint implements Paint {
final static float TEXT_OFFSET = 2;
private static int getCap(Cap cap) {
switch (cap) {
case BUTT:
@@ -85,7 +87,7 @@ public class AwtPaint implements Paint {
@Override
public void setStrokeWidth(float width) {
strokeWidth = width;
strokeWidth = width + 1;
createStroke();
// int size = font.getSize();
@@ -108,7 +110,7 @@ public class AwtPaint implements Paint {
@Override
public void setTextSize(float textSize) {
font = font.deriveFont(textSize - 2);
font = font.deriveFont(textSize);
}