Loading graphics/java/android/graphics/Outline.java +6 −3 Original line number Diff line number Diff line Loading @@ -32,13 +32,15 @@ import android.graphics.drawable.Drawable; * @see Drawable#getOutline(Outline) */ public final class Outline { private static final float RADIUS_UNDEFINED = -1.0f; /** @hide */ public Path mPath; /** @hide */ public Rect mRect; /** @hide */ public float mRadius; public float mRadius = RADIUS_UNDEFINED; /** @hide */ public float mAlpha; Loading @@ -63,7 +65,7 @@ public final class Outline { public void setEmpty() { mPath = null; mRect = null; mRadius = 0; mRadius = RADIUS_UNDEFINED; } /** Loading Loading @@ -223,6 +225,7 @@ public final class Outline { mPath.reset(); mPath.addOval(left, top, right, bottom, Path.Direction.CW); mRect = null; mRadius = RADIUS_UNDEFINED; } /** Loading @@ -249,7 +252,7 @@ public final class Outline { mPath.set(convexPath); mRect = null; mRadius = -1.0f; mRadius = RADIUS_UNDEFINED; } /** Loading graphics/java/android/graphics/drawable/shapes/ArcShape.java +7 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics.drawable.shapes; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Paint; /** Loading Loading @@ -46,5 +47,11 @@ public class ArcShape extends RectShape { public void draw(Canvas canvas, Paint paint) { canvas.drawArc(rect(), mStart, mSweep, true, paint); } @Override public void getOutline(Outline outline) { // Since we don't support concave outlines, arc shape does not attempt // to provide an outline. } } Loading
graphics/java/android/graphics/Outline.java +6 −3 Original line number Diff line number Diff line Loading @@ -32,13 +32,15 @@ import android.graphics.drawable.Drawable; * @see Drawable#getOutline(Outline) */ public final class Outline { private static final float RADIUS_UNDEFINED = -1.0f; /** @hide */ public Path mPath; /** @hide */ public Rect mRect; /** @hide */ public float mRadius; public float mRadius = RADIUS_UNDEFINED; /** @hide */ public float mAlpha; Loading @@ -63,7 +65,7 @@ public final class Outline { public void setEmpty() { mPath = null; mRect = null; mRadius = 0; mRadius = RADIUS_UNDEFINED; } /** Loading Loading @@ -223,6 +225,7 @@ public final class Outline { mPath.reset(); mPath.addOval(left, top, right, bottom, Path.Direction.CW); mRect = null; mRadius = RADIUS_UNDEFINED; } /** Loading @@ -249,7 +252,7 @@ public final class Outline { mPath.set(convexPath); mRect = null; mRadius = -1.0f; mRadius = RADIUS_UNDEFINED; } /** Loading
graphics/java/android/graphics/drawable/shapes/ArcShape.java +7 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics.drawable.shapes; import android.graphics.Canvas; import android.graphics.Outline; import android.graphics.Paint; /** Loading Loading @@ -46,5 +47,11 @@ public class ArcShape extends RectShape { public void draw(Canvas canvas, Paint paint) { canvas.drawArc(rect(), mStart, mSweep, true, paint); } @Override public void getOutline(Outline outline) { // Since we don't support concave outlines, arc shape does not attempt // to provide an outline. } }