| Index: include/core/SkPath.h
|
| diff --git a/include/core/SkPath.h b/include/core/SkPath.h
|
| index 4b95e893e2821821aecaf129f9fbea9430b0e266..c6ff715404cd972679505e136ae2377047e9c8ae 100644
|
| --- a/include/core/SkPath.h
|
| +++ b/include/core/SkPath.h
|
| @@ -239,16 +239,6 @@ public:
|
| */
|
| bool isLine(SkPoint line[2]) const;
|
|
|
| - /** Returns true if the path specifies a rectangle. If so, and if rect is
|
| - not null, set rect to the bounds of the path. If the path does not
|
| - specify a rectangle, return false and ignore rect.
|
| -
|
| - @param rect If not null, returns the bounds of the path if it specifies
|
| - a rectangle
|
| - @return true if the path specifies a rectangle
|
| - */
|
| - bool isRect(SkRect* rect) const { return this->isRect(rect, NULL, NULL); }
|
| -
|
| /** Return the number of points in the path
|
| */
|
| int countPoints() const;
|
| @@ -286,7 +276,8 @@ public:
|
| /** Returns the bounds of the path's points. If the path contains 0 or 1
|
| points, the bounds is set to (0,0,0,0), and isEmpty() will return true.
|
| Note: this bounds may be larger than the actual shape, since curves
|
| - do not extend as far as their control points.
|
| + do not extend as far as their control points. Additionally this bound
|
| + can contain trailing MoveTo points (cf. isRect).
|
| */
|
| const SkRect& getBounds() const {
|
| return fPathRef->getBounds();
|
| @@ -592,19 +583,6 @@ public:
|
| */
|
| PathAsRect asRect(Direction* direction = NULL) const;
|
|
|
| - /** Returns true if the path specifies a rectangle. If so, and if isClosed is
|
| - not null, set isClosed to true if the path is closed. Also, if returning true
|
| - and direction is not null, return the rect direction. If the path does not
|
| - specify a rectangle, return false and ignore isClosed and direction.
|
| -
|
| - @param isClosed If not null, set to true if the path is closed
|
| - @param direction If not null, set to the rectangle's direction
|
| - @return true if the path specifies a rectangle
|
| - */
|
| - bool isRect(bool* isClosed, Direction* direction) const {
|
| - return this->isRect(NULL, isClosed, direction);
|
| - }
|
| -
|
| /**
|
| * Returns true if the path specifies a rectangle.
|
| *
|
| @@ -612,12 +590,15 @@ public:
|
| * unchanged. If this returns true, then each of the output parameters
|
| * are checked for NULL. If they are not, they return their value.
|
| *
|
| - * @param rect If not null, set to the bounds of the rectangle
|
| + * @param rect If not null, set to the bounds of the rectangle.
|
| + * Note : this bounds may be smaller than the path's bounds, since it is just
|
| + * the bounds of the "drawable" parts of the path. e.g. a trailing MoveTo would
|
| + * be ignored in this rect, but not by the path's bounds
|
| * @param isClosed If not null, set to true if the path is closed
|
| * @param direction If not null, set to the rectangle's direction
|
| * @return true if the path specifies a rectangle
|
| */
|
| - bool isRect(SkRect* rect, bool* isClosed, Direction* direction) const;
|
| + bool isRect(SkRect* rect, bool* isClosed = NULL, Direction* direction = NULL) const;
|
|
|
| /** Returns true if the path specifies a pair of nested rectangles. If so, and if
|
| rect is not null, set rect[0] to the outer rectangle and rect[1] to the inner
|
|
|