diff --git a/src/api-impl/android/graphics/Canvas.java b/src/api-impl/android/graphics/Canvas.java index 82e96b98..81dcb97d 100644 --- a/src/api-impl/android/graphics/Canvas.java +++ b/src/api-impl/android/graphics/Canvas.java @@ -416,13 +416,20 @@ public class Canvas { gsk_canvas.restoreToCount(count); } - public void drawRoundRect(RectF rect, float rx, float ry, Paint paint) { + public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) { if (paint.getShader() instanceof BitmapShader) { BitmapShader shader = (BitmapShader)paint.getShader(); drawBitmap(shader.bitmap, 0, 0, paint); + } else { + gsk_canvas.snapshot = bitmap.getSnapshot(); + gsk_canvas.drawRoundRect(left, top, right, bottom, rx, ry, paint); } } + public void drawRoundRect(RectF rect, float rx, float ry, Paint paint) { + drawRoundRect(rect.left, rect.top, rect.right, rect.bottom, rx, ry, paint); + } + public void getMatrix(Matrix matrix) { matrix.reset(); } @@ -518,10 +525,6 @@ public class Canvas { Log.w("Canvas", "STUB: drawArc"); } - public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) { - Log.w("Canvas", "STUB: drawRoundRect"); - } - public boolean getClipBounds(Rect outRect) { /* UGLY HACK */ outRect.set(0, 0, Resources.getSystem().getDisplayMetrics().widthPixels, Resources.getSystem().getDisplayMetrics().heightPixels);