| Index: include/core/SkRRect.h
|
| diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
|
| index 9878b54fdc0019be255f3c18551b748cd9dce8aa..c09d2d46fe85aed3ca925d2419fcb98838138225 100644
|
| --- a/include/core/SkRRect.h
|
| +++ b/include/core/SkRRect.h
|
| @@ -103,6 +103,17 @@ public:
|
|
|
| bool allCornersCircular() const;
|
|
|
| + /**
|
| + * Are both x-radii the same on the two left corners, and similar for the top, right, and
|
| + * bottom. When this is the case the four ellipse centers form a rectangle.
|
| + */
|
| + bool isNinePatch() const {
|
| + return fRadii[kUpperLeft_Corner].fX == fRadii[kLowerLeft_Corner].fX &&
|
| + fRadii[kUpperRight_Corner].fX == fRadii[kLowerRight_Corner].fX &&
|
| + fRadii[kUpperLeft_Corner].fY == fRadii[kUpperRight_Corner].fY &&
|
| + fRadii[kLowerLeft_Corner].fY == fRadii[kLowerRight_Corner].fY;
|
| + }
|
| +
|
| SkScalar width() const { return fRect.width(); }
|
| SkScalar height() const { return fRect.height(); }
|
|
|
|
|