diff options
author | 2018-02-06 09:41:53 -0500 | |
---|---|---|
committer | 2018-02-06 15:20:25 +0000 | |
commit | 4855f78dd16ad50003ec537c98062e24a831cd45 (patch) | |
tree | 9566730a4f8416078131a0dc8255aecdeb9e3bf3 /site/user/api/SkIRect_Reference.md | |
parent | 2aa5bab573cff2d9bfb40f7af6014a93bf2d4fda (diff) |
fix bookmaker nightly
- mark the interfaces that use SkMask as deprecated
- add more autogenerated subtopics
- make subtopic names singular, avoiding collision with Skia names
- simplify #Deprecated and #Bug tags
- add "#Deprecated soon" to note things to be deprecated
- fix some spelling errors
- refresh web docs
- add self-check functionality to find methods outside subtopics
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102150
Bug: skia:6898
Change-Id: I0e742a56d49dccd4409bb68eed9167c8ad7611ce
Reviewed-on: https://skia-review.googlesource.com/102150
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'site/user/api/SkIRect_Reference.md')
-rw-r--r-- | site/user/api/SkIRect_Reference.md | 91 |
1 files changed, 52 insertions, 39 deletions
diff --git a/site/user/api/SkIRect_Reference.md b/site/user/api/SkIRect_Reference.md index 78129ec813..ec9a7249cd 100644 --- a/site/user/api/SkIRect_Reference.md +++ b/site/user/api/SkIRect_Reference.md @@ -5,15 +5,15 @@ SkIRect Reference ## <a name="Overview"></a> Overview -## <a name="Subtopics"></a> Subtopics +## <a name="Subtopic"></a> Subtopic | name | description | | --- | --- | -| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIRect_Reference#SkIRect">SkIRect</a> | -| <a href="#Member_Functions">Member Functions</a> | static functions and member methods | -| <a href="#Members">Members</a> | member values | -| <a href="#Operators">Operators</a> | operator overloading methods | -| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together | +| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkIRect_Reference#SkIRect">SkIRect</a> | +| <a href="#Member_Function">Member Function</a> | static functions and member methods | +| <a href="#Member">Member</a> | member values | +| <a href="#Operator">Operator</a> | operator overloading methods | +| <a href="#Related_Function">Related Function</a> | similar methods grouped together | # <a name="SkIRect"></a> Struct SkIRect <a href="#SkIRect">SkIRect</a> holds four 32 bit integer coordinates describing the upper and @@ -22,19 +22,16 @@ from position, width, and height. <a href="#SkIRect">SkIRect</a> describes an ar is less than or equal to its left, or if its bottom is less than or equal to its top, it is considered empty. -## <a name="Related_Functions"></a> Related Functions +## <a name="Related_Function"></a> Related Function | name | description | -| --- | --- | +| --- | --- | | <a href="#Inset_Outset_Offset">Inset Outset Offset</a> | moves sides | | <a href="#Intersection">Intersection</a> | set to shared bounds | -| Join | set to union of bounds | -| Properties | side values, center, validity | -| Rounding | adjust to integer bounds | -| Set | replaces all values | -| Sorting | orders sides | +| <a href="#Join">Join</a> | set to union of bounds | +| <a href="#Sorting">Sorting</a> | orders sides | -## <a name="Member_Functions"></a> Member Functions +## <a name="Member_Function"></a> Member Function | name | description | | --- | --- | @@ -43,7 +40,6 @@ its top, it is considered empty. | <a href="#SkIRect_IntersectsNoEmptyCheck">IntersectsNoEmptyCheck</a> | returns true if areas overlap skips empty check | | <a href="#SkIRect_MakeEmpty">MakeEmpty</a> | returns bounds of (0, 0, 0, 0) | | <a href="#SkIRect_MakeLTRB">MakeLTRB</a> | constructs from int left, top, right, bottom | -| <a href="#SkIRect_MakeLargest">MakeLargest</a> | deprecated | | <a href="#SkIRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) | | <a href="#SkIRect_MakeWH">MakeWH</a> | constructs from int input returning (0, 0, width, height) | | <a href="#SkIRect_MakeXYWH">MakeXYWH</a> | constructs from int input returning (x, y, width, height) | @@ -83,7 +79,7 @@ its top, it is considered empty. | <a href="#SkIRect_x">x</a> | returns bounds left | | <a href="#SkIRect_y">y</a> | returns bounds top | -## <a name="Members"></a> Members +## <a name="Member"></a> Member | name | description | | --- | --- | @@ -112,13 +108,13 @@ When equal to or less than <a href="#SkIRect_fLeft">fLeft</a>, <a href="#IRect"> May contain any value. The larger of the vertical values when sorted. When equal to or less than <a href="#SkIRect_fTop">fTop</a>, <a href="#IRect">IRect</a> is empty. -## <a name="Constructors"></a> Constructors +## <a name="Constructor"></a> Constructor | name | description | | --- | --- | +| <a href="#SkIRect_EmptyIRect">EmptyIRect</a> | returns immutable bounds of (0, 0, 0, 0) | | <a href="#SkIRect_MakeEmpty">MakeEmpty</a> | returns bounds of (0, 0, 0, 0) | | <a href="#SkIRect_MakeLTRB">MakeLTRB</a> | constructs from int left, top, right, bottom | -| <a href="#SkIRect_MakeLargest">MakeLargest</a> | deprecated | | <a href="#SkIRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) | | <a href="#SkIRect_MakeWH">MakeWH</a> | constructs from int input returning (0, 0, width, height) | | <a href="#SkIRect_MakeXYWH">MakeXYWH</a> | constructs from int input returning (x, y, width, height) | @@ -339,6 +335,27 @@ rect: -10, 35, 5, 60 isEmpty: false --- +## <a name="Property"></a> Property + +| name | description | +| --- | --- | +| <a href="#SkIRect_bottom">bottom</a> | returns larger bounds in y, if sorted | +| <a href="#SkIRect_centerX">centerX</a> | returns midpoint in x | +| <a href="#SkIRect_centerY">centerY</a> | returns midpoint in y | +| <a href="#SkIRect_height">height</a> | returns span in y | +| <a href="#SkIRect_height64">height64</a> | returns span in y as int64_t | +| <a href="#SkIRect_is16Bit">is16Bit</a> | returns true if members fit in 16-bit word | +| <a href="#SkIRect_isEmpty">isEmpty</a> | returns true if width or height are zero or negative or they exceed int32_t | +| <a href="#SkIRect_isEmpty64">isEmpty64</a> | returns true if width or height are zero or negative | +| <a href="#SkIRect_left">left</a> | returns smaller bounds in x, if sorted | +| <a href="#SkIRect_right">right</a> | returns larger bounds in x, if sorted | +| <a href="#SkIRect_size">size</a> | returns <a href="undocumented#ISize">ISize</a> (width, height) | +| <a href="#SkIRect_top">top</a> | returns smaller bounds in y, if sorted | +| <a href="#SkIRect_width">width</a> | returns span in x | +| <a href="#SkIRect_width64">width64</a> | returns span in y as int64_t | +| <a href="#SkIRect_x">x</a> | returns bounds left | +| <a href="#SkIRect_y">y</a> | returns bounds top | + <a name="SkIRect_left"></a> ## left @@ -832,7 +849,7 @@ sorted: {20, 40, 20, 50} is empty --- -## <a name="Operators"></a> Operators +## <a name="Operator"></a> Operator | name | description | | --- | --- | @@ -1119,14 +1136,9 @@ rect: -10, 35, 5, 60 isEmpty: false ## <a name="Inset_Outset_Offset"></a> Inset Outset Offset | name | description | -| --- | --- | +| --- | --- | | <a href="#SkIRect_inset">inset</a> | moves the sides symmetrically about the center | -| <a href="#SkIRect_makeInset">makeInset</a> | constructs from sides moved symmetrically about the center | -| <a href="#SkIRect_makeOffset">makeOffset</a> | constructs from translated sides | -| <a href="#SkIRect_makeOutset">makeOutset</a> | constructs from sides moved symmetrically about the center | | <a href="#SkIRect_offset">offset</a> | translates sides without changing width and height | -| | void <a href="#SkIRect_offset">offset(int32 t dx, int32 t dy)</a> | -| | void <a href="#SkIRect_offset_2">offset(const SkIPoint& delta)</a> | | <a href="#SkIRect_offsetTo">offsetTo</a> | translates to (x, y) without changing width and height | | <a href="#SkIRect_outset">outset</a> | moves the sides symmetrically about the center | @@ -1480,17 +1492,12 @@ The intersection is only meaningful if the resulting <a href="#IRect">IRect</a> describes an area: <a href="#SkIRect_fLeft">fLeft</a> is less than <a href="#SkIRect_fRight">fRight</a>, and <a href="#SkIRect_fTop">fTop</a> is less than <a href="#SkIRect_fBottom">fBottom</a>. | name | description | -| --- | --- | +| --- | --- | | <a href="#SkIRect_Intersects">Intersects</a> | returns true if areas overlap | | <a href="#SkIRect_IntersectsNoEmptyCheck">IntersectsNoEmptyCheck</a> | returns true if areas overlap skips empty check | | <a href="#SkIRect_contains">contains</a> | returns true if points are equal or inside | -| | bool <a href="#SkIRect_contains">contains(int32 t x, int32 t y)</a> const | -| | bool <a href="#SkIRect_contains_2">contains(int32 t left, int32 t top, int32 t right, int32 t bottom)</a> const | -| | bool <a href="#SkIRect_contains_3">contains(const SkIRect& r)</a> const | +| <a href="#SkIRect_containsNoEmptyCheck">containsNoEmptyCheck</a> | returns true if points are equal or inside skips empty check | | <a href="#SkIRect_intersect">intersect</a> | sets to shared area; returns true if not empty | -| | bool <a href="#SkIRect_intersect">intersect(const SkIRect& r)</a> | -| | bool <a href="#SkIRect_intersect_2">intersect(const SkIRect& a, const SkIRect& b)</a> | -| | bool <a href="#SkIRect_intersect_3">intersect(int32 t left, int32 t top, int32 t right, int32 t bottom)</a> | | <a href="#SkIRect_intersectNoEmptyCheck">intersectNoEmptyCheck</a> | sets to shared area; returns true if not empty skips empty check | | <a href="#SkIRect_quickReject">quickReject</a> | returns true if rectangles do not intersect | @@ -2081,6 +2088,13 @@ intersection --- +## <a name="Join"></a> Join + +| name | description | +| --- | --- | +| <a href="#SkIRect_join">join</a> | sets to union of bounds | +| | join | + <a name="SkIRect_join"></a> ## join @@ -2162,6 +2176,12 @@ join: 10, 20, 55, 65 --- +## <a name="Sorting"></a> Sorting + +| name | description | +| --- | --- | +| <a href="#SkIRect_sort">sort</a> | orders sides from smaller to larger | + <a name="SkIRect_sort"></a> ## sort @@ -2264,12 +2284,5 @@ rect: 0, 0, 0, 0 static SkIRect SK_WARN_UNUSED_RESULT MakeLargest() </pre> -Returns constructed <a href="#SkIRect">SkIRect</a> setting left and top to most negative value, and -setting right and bottom to most positive value. - -### Return Value - -bounds (<a href="undocumented#SK_MinS32">SK MinS32</a>, <a href="undocumented#SK_MinS32">SK MinS32</a>, <a href="undocumented#SK_MaxS32">SK MaxS32</a>, <a href="undocumented#SK_MaxS32">SK MaxS32</a>) - --- |