summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/current.txt3
-rw-r--r--graphics/java/android/graphics/Path.java14
2 files changed, 16 insertions, 1 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index a3d8978caa21..9ecd07e4594b 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -16286,7 +16286,8 @@ package android.graphics {
method public void arcTo(@NonNull android.graphics.RectF, float, float);
method public void arcTo(float, float, float, float, float, float, boolean);
method public void close();
- method public void computeBounds(@NonNull android.graphics.RectF, boolean);
+ method @Deprecated public void computeBounds(@NonNull android.graphics.RectF, boolean);
+ method public void computeBounds(@NonNull android.graphics.RectF);
method public void conicTo(float, float, float, float, float);
method public void cubicTo(float, float, float, float, float, float);
method @NonNull public android.graphics.Path.FillType getFillType();
diff --git a/graphics/java/android/graphics/Path.java b/graphics/java/android/graphics/Path.java
index 81b8542c20f7..c9c1b23d874c 100644
--- a/graphics/java/android/graphics/Path.java
+++ b/graphics/java/android/graphics/Path.java
@@ -293,9 +293,23 @@ public class Path {
*
* @param bounds Returns the computed bounds of the path's control points.
* @param exact This parameter is no longer used.
+ *
+ * @deprecated use computeBounds(RectF) instead
*/
+ @Deprecated
@SuppressWarnings({"UnusedDeclaration"})
public void computeBounds(@NonNull RectF bounds, boolean exact) {
+ computeBounds(bounds);
+ }
+
+ /**
+ * Compute the bounds of the control points of the path, and write the
+ * answer into bounds. If the path contains 0 or 1 points, the bounds is
+ * set to (0,0,0,0)
+ *
+ * @param bounds Returns the computed bounds of the path's control points.
+ */
+ public void computeBounds(@NonNull RectF bounds) {
nComputeBounds(mNativePath, bounds);
}