| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPath_DEFINED | 8 #ifndef SkPath_DEFINED |
| 9 #define SkPath_DEFINED | 9 #define SkPath_DEFINED |
| 10 | 10 |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 * @param rect If not null, set to the bounds of the rectangle. | 574 * @param rect If not null, set to the bounds of the rectangle. |
| 575 * Note : this bounds may be smaller than the path's bounds, si
nce it is just | 575 * Note : this bounds may be smaller than the path's bounds, si
nce it is just |
| 576 * the bounds of the "drawable" parts of the path. e.g. a trail
ing MoveTo would | 576 * the bounds of the "drawable" parts of the path. e.g. a trail
ing MoveTo would |
| 577 * be ignored in this rect, but not by the path's bounds | 577 * be ignored in this rect, but not by the path's bounds |
| 578 * @param isClosed If not null, set to true if the path is closed | 578 * @param isClosed If not null, set to true if the path is closed |
| 579 * @param direction If not null, set to the rectangle's direction | 579 * @param direction If not null, set to the rectangle's direction |
| 580 * @return true if the path specifies a rectangle | 580 * @return true if the path specifies a rectangle |
| 581 */ | 581 */ |
| 582 bool isRect(SkRect* rect, bool* isClosed = NULL, Direction* direction = NULL
) const; | 582 bool isRect(SkRect* rect, bool* isClosed = NULL, Direction* direction = NULL
) const; |
| 583 | 583 |
| 584 /** Returns true if the path specifies a pair of nested rectangles. If so, a
nd if | 584 /** Returns true if the path specifies a pair of nested rectangles, or would
draw a |
| 585 pair of nested rectangles when filled. If so, and if |
| 585 rect is not null, set rect[0] to the outer rectangle and rect[1] to the
inner | 586 rect is not null, set rect[0] to the outer rectangle and rect[1] to the
inner |
| 586 rectangle. If so, and dirs is not null, set dirs[0] to the direction of | 587 rectangle. If so, and dirs is not null, set dirs[0] to the direction of |
| 587 the outer rectangle and dirs[1] to the direction of the inner rectangle.
If | 588 the outer rectangle and dirs[1] to the direction of the inner rectangle.
If |
| 588 the path does not specify a pair of nested rectangles, return | 589 the path does not specify a pair of nested rectangles, return |
| 589 false and ignore rect and dirs. | 590 false and ignore rect and dirs. |
| 590 | 591 |
| 591 @param rect If not null, returns the path as a pair of nested rectangles | 592 @param rect If not null, returns the path as a pair of nested rectangles |
| 592 @param dirs If not null, returns the direction of the rects | 593 @param dirs If not null, returns the direction of the rects |
| 593 @return true if the path describes a pair of nested rectangles | 594 @return true if the path describes a pair of nested rectangles |
| 594 */ | 595 */ |
| 595 bool isNestedRects(SkRect rect[2], Direction dirs[2] = NULL) const; | 596 bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = NULL) const; |
| 596 | 597 |
| 597 /** | 598 /** |
| 598 * Add a closed rectangle contour to the path | 599 * Add a closed rectangle contour to the path |
| 599 * @param rect The rectangle to add as a closed contour to the path | 600 * @param rect The rectangle to add as a closed contour to the path |
| 600 * @param dir The direction to wind the rectangle's contour. Cannot be | 601 * @param dir The direction to wind the rectangle's contour. Cannot be |
| 601 * kUnknown_Direction. | 602 * kUnknown_Direction. |
| 602 */ | 603 */ |
| 603 void addRect(const SkRect& rect, Direction dir = kCW_Direction); | 604 void addRect(const SkRect& rect, Direction dir = kCW_Direction); |
| 604 | 605 |
| 605 /** | 606 /** |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 } | 1035 } |
| 1035 | 1036 |
| 1036 friend class SkAutoPathBoundsUpdate; | 1037 friend class SkAutoPathBoundsUpdate; |
| 1037 friend class SkAutoDisableOvalCheck; | 1038 friend class SkAutoDisableOvalCheck; |
| 1038 friend class SkAutoDisableDirectionCheck; | 1039 friend class SkAutoDisableDirectionCheck; |
| 1039 friend class SkBench_AddPathTest; // perf test reversePathTo | 1040 friend class SkBench_AddPathTest; // perf test reversePathTo |
| 1040 friend class PathTest_Private; // unit test reversePathTo | 1041 friend class PathTest_Private; // unit test reversePathTo |
| 1041 }; | 1042 }; |
| 1042 | 1043 |
| 1043 #endif | 1044 #endif |
| OLD | NEW |