GradientDrawable: support oval shape

This commit is contained in:
Julian Winkler
2025-10-26 12:28:15 +01:00
parent a2f3f8808a
commit f8a3b31379
2 changed files with 3 additions and 3 deletions

View File

@@ -480,7 +480,7 @@ public class Canvas {
} }
public void drawOval(RectF oval, Paint paint) { public void drawOval(RectF oval, Paint paint) {
Log.w("Canvas", "STUB: drawOval"); drawRoundRect(oval, oval.width()/2, oval.height()/2, paint);
} }
public void drawColor(int color, PorterDuff.Mode mode) { public void drawColor(int color, PorterDuff.Mode mode) {

View File

@@ -550,10 +550,10 @@ public class GradientDrawable extends Drawable {
} }
break; break;
case OVAL: case OVAL:
/*canvas.drawOval(mRect, mFillPaint); canvas.drawOval(mRect, mFillPaint);
if (haveStroke) { if (haveStroke) {
canvas.drawOval(mRect, mStrokePaint); canvas.drawOval(mRect, mStrokePaint);
}*/ }
break; break;
case LINE: { case LINE: {
RectF r = mRect; RectF r = mRect;