aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user/api/SkIRect_Reference.md
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-03-05 13:26:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-05 18:48:15 +0000
commit1a8d762a18d6f6494408a3a5e06a80097f8b85f7 (patch)
treed4ccb89175936ecfeceb205bc60a2af536d96de1 /site/user/api/SkIRect_Reference.md
parentf6188425c7501ee0d7485d933f0c93b25972e58b (diff)
work in imageinfo and phrase substitution
This adds the ability to define long phrases in one place and refer to those phrases in many places. Bookmaker has new syntax to support phrase substitution. When it encounters #some_phrase_reference# It substitutes the body of #PhraseDef some_phrase_reference text to substitute when encountering the phrase ## The phrase label must start with a lowercase letter, and be bracketed by single hash marks, without spaces between the label and the hash marks. Docs-Preview: https://skia.org/?cl=111224 TBR=caryclark@google.com Bug: skia:6898 Change-Id: I12c57d916ccedbd86b421377d117399150ada72a Reviewed-on: https://skia-review.googlesource.com/111224 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'site/user/api/SkIRect_Reference.md')
-rw-r--r--site/user/api/SkIRect_Reference.md24
1 files changed, 16 insertions, 8 deletions
diff --git a/site/user/api/SkIRect_Reference.md b/site/user/api/SkIRect_Reference.md
index ee4cb41820..f58c3c1cb6 100644
--- a/site/user/api/SkIRect_Reference.md
+++ b/site/user/api/SkIRect_Reference.md
@@ -297,7 +297,8 @@ static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y, in
</pre>
Returns constructed <a href="#IRect">IRect</a> set to:
-(x, y, x + <a href="#SkIRect_MakeXYWH_w">w</a>, y + <a href="#SkIRect_MakeXYWH_h">h</a>).
+(x, y, x + <a href="#SkIRect_MakeXYWH_w">w</a>, y + <a href="#SkIRect_MakeXYWH_h">h</a>)
+.
Does not validate input;
<a href="#SkIRect_MakeXYWH_w">w</a> or <a href="#SkIRect_MakeXYWH_h">h</a> may be negative.
@@ -732,7 +733,8 @@ midpoint in x
### Example
-<div><fiddle-embed name="549b840a9ceaaf7cb4e604f9f3d7108d"><div>Dividing by two rounds towards zero. <a href="#SkIRect_centerX">centerX</a> uses a bit shift and rounds down.</div>
+<div><fiddle-embed name="549b840a9ceaaf7cb4e604f9f3d7108d"><div>Dividing by two rounds towards zero. <a href="#SkIRect_centerX">centerX</a> uses a bit shift and rounds down.
+</div>
#### Example Output
@@ -1108,7 +1110,8 @@ void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
</pre>
Sets <a href="#IRect">IRect</a> to:
-(x, y, x + width, y + height).
+(x, y, x + width, y + height)
+.
Does not validate input;
width or height may be negative.
@@ -1498,7 +1501,8 @@ must describe area; <a href="#SkIRect_fLeft">fLeft</a> is less than <a href="#Sk
empty() returns false. The intersection of <a href="#IRect">IRect</a> pair can be described by:
(max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
-min(a.fRight, b.fRight), min(a.fBottom, b.fBottom)).
+min(a.fRight, b.fRight), min(a.fBottom, b.fBottom))
+.
The intersection is only meaningful if the resulting <a href="#IRect">IRect</a> is not empty and
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>.
@@ -1548,7 +1552,8 @@ true if construction and <a href="#IRect">IRect</a> have no area in common
### Example
-<div><fiddle-embed name="f07146508efc516559d73853e6dadc78"><div><a href="#SkIRect_quickReject">quickReject</a> is the complement of <a href="#SkIRect_Intersects">Intersects</a>.</div>
+<div><fiddle-embed name="f07146508efc516559d73853e6dadc78"><div><a href="#SkIRect_quickReject">quickReject</a> is the complement of <a href="#SkIRect_Intersects">Intersects</a>.
+</div>
#### Example Output
@@ -1579,7 +1584,8 @@ Returns true if:
Returns false if <a href="#IRect">IRect</a> is empty.
Considers input to describe constructed <a href="#IRect">IRect</a>:
-(x, y, x + 1, y + 1)and
+(x, y, x + 1, y + 1)
+and
returns true if constructed area is completely enclosed by <a href="#IRect">IRect</a> area.
### Parameters
@@ -1869,7 +1875,8 @@ true if <a href="#SkIRect_intersect_r">r</a> and <a href="#IRect">IRect</a> have
<div><fiddle-embed name="2be1302480e54a767e25cbeed5d41b41"><div>Two <a href="undocumented#SkDebugf">SkDebugf</a> calls are required. If the calls are combined, their arguments
may not be evaluated in left to right order: the printed intersection may
-be before or after the call to intersect.</div>
+be before or after the call to intersect.
+</div>
#### Example Output
@@ -2005,7 +2012,8 @@ true if construction and <a href="#IRect">IRect</a> have area in common
<div><fiddle-embed name="4e6f580a3906c08a5faee524f7e72334"><div>Two <a href="undocumented#SkDebugf">SkDebugf</a> calls are required. If the calls are combined, their arguments
may not be evaluated in left to right order: the printed intersection may
-be before or after the call to intersect.</div>
+be before or after the call to intersect.
+</div>
#### Example Output