Skip to content

Commit 9cabb4f

Browse files
skia-bookmakerSkia Commit-Bot
authored andcommitted
Update markdown files
Automatic commit by the Housekeeper-Nightly-Bookmaker bot. TBR=rmistry@google.com NO_MERGE_BUILDS Change-Id: I365c56af7fd227cb5dd9cfd47261284ce9c18bd2 Reviewed-on: https://skia-review.googlesource.com/c/176342 Reviewed-by: <skia-bookmaker@skia-swarming-bots.iam.gserviceaccount.com> Commit-Queue: <skia-bookmaker@skia-swarming-bots.iam.gserviceaccount.com>
1 parent 264843e commit 9cabb4f

File tree

3 files changed

+7
-164
lines changed

3 files changed

+7
-164
lines changed

site/user/api/SkFont_Reference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,9 @@ bytes of <a href='#SkFont_breakText_text'>text</a> that fit, always less than or
11421142

11431143
### Example
11441144

1145-
<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
1145+
<div><fiddle-embed name="3cad18678254526be66ef162eecd1d23"><div><a href='undocumented#Line'>Line</a> under "Breakfast" shows desired width, shorter than available characters.
1146+
<a href='undocumented#Line'>Line</a> under "Bre" shows measured width after breaking <a href='#SkFont_breakText_text'>text</a>.
1147+
</div></fiddle-embed></div>
11461148

11471149
### See Also
11481150

site/user/api/SkPaint_Reference.md

Lines changed: 2 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@ class <a href='SkPaint_Reference#SkPaint'>SkPaint</a> {
153153
<a href='SkPath_Reference#SkPath'>SkPath</a>* <a href='SkPath_Reference#Path'>path</a>) const;
154154
void <a href='#SkPaint_getPosTextPath'>getPosTextPath</a>(const void* <a href='undocumented#Text'>text</a>, size_t length,
155155
const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[], <a href='SkPath_Reference#SkPath'>SkPath</a>* <a href='SkPath_Reference#Path'>path</a>) const;
156-
int <a href='#SkPaint_getTextIntercepts'>getTextIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y,
157-
const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
158-
int <a href='#SkPaint_getPosTextIntercepts'>getPosTextIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[],
159-
const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
160-
int <a href='#SkPaint_getPosTextHIntercepts'>getPosTextHIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, const <a href='undocumented#SkScalar'>SkScalar</a> xpos[],
161-
<a href='undocumented#SkScalar'>SkScalar</a> constY, const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
162156
int <a href='#SkPaint_getTextBlobIntercepts'>getTextBlobIntercepts</a>(const <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>* blob, const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2],
163157
<a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
164158
bool <a href='#SkPaint_nothingToDraw'>nothingToDraw</a>() const;
@@ -3870,10 +3864,8 @@ Only supported on platforms that use FreeType as the <a href='SkFont_Reference#
38703864
</tr>
38713865
</table>
38723866

3873-
### Example
3874-
3875-
<div><fiddle-embed name="79c550ec6c34054ab60fbcd1b81adc03"><div>Convert UTF-8 <a href='#SkPaint_glyphsToUnichars_text'>text</a> to <a href='#SkPaint_glyphsToUnichars_glyphs'>glyphs</a>; then convert <a href='#SkPaint_glyphsToUnichars_glyphs'>glyphs</a> to Unichar code <a href='SkPoint_Reference#Point'>points</a>.
3876-
</div></fiddle-embed></div>
3867+
<div>Convert UTF-8 <a href='#SkPaint_glyphsToUnichars_text'>text</a> to <a href='#SkPaint_glyphsToUnichars_glyphs'>glyphs</a>; then convert <a href='#SkPaint_glyphsToUnichars_glyphs'>glyphs</a> to Unichar code <a href='SkPoint_Reference#Point'>points</a>.
3868+
</div>
38773869

38783870
<a name='Measure_Text'></a>
38793871

@@ -3992,12 +3984,6 @@ Does not scale the advance or bounds by <a href='#Fake_Bold'>fake bold</a> or <
39923984

39933985
bytes of <a href='#SkPaint_breakText_text'>text</a> that fit, always less than or equal to <a href='#SkPaint_breakText_length'>length</a>
39943986

3995-
### Example
3996-
3997-
<div><fiddle-embed name="fd0033470ccbd5c7059670fdbf96cffc"><div><a href='undocumented#Line'>Line</a> under "Breakfast" shows desired width, shorter than available characters.
3998-
<a href='undocumented#Line'>Line</a> under "Bre" shows measured width after breaking <a href='#SkPaint_breakText_text'>text</a>.
3999-
</div></fiddle-embed></div>
4000-
40013987
<a name='SkPaint_getTextWidths'></a>
40023988

40033989
---
@@ -4127,153 +4113,6 @@ Uses <a href='#SkPaint_getPosTextPath_pos'>pos</a> array to position <a href='#S
41274113
of <a href='undocumented#Line'>lines</a> parallel to the <a href='undocumented#Text'>text</a> advance. <a href='#Paint_Text_Intercepts'>Text_Intercepts</a> permits creating a
41284114
underline that skips Descenders.
41294115

4130-
<a name='SkPaint_getTextIntercepts'></a>
4131-
4132-
---
4133-
4134-
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4135-
int <a href='#SkPaint_getTextIntercepts'>getTextIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y,
4136-
const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals)const
4137-
</pre>
4138-
4139-
Returns the number of <a href='#SkPaint_getTextIntercepts_intervals'>intervals</a> that intersect <a href='#SkPaint_getTextIntercepts_bounds'>bounds</a>.
4140-
<a href='#SkPaint_getTextIntercepts_bounds'>bounds</a> describes a pair of <a href='undocumented#Line'>lines</a> parallel to the <a href='#SkPaint_getTextIntercepts_text'>text</a> advance.
4141-
The return count is zero or a multiple of two, and is at most twice the number of <a href='undocumented#Glyph'>glyphs</a> in
4142-
the <a href='undocumented#String'>string</a>.
4143-
Uses <a href='undocumented#SkTextEncoding'>SkTextEncoding</a> to decode <a href='#SkPaint_getTextIntercepts_text'>text</a>, <a href='undocumented#SkTypeface'>SkTypeface</a> to get the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>,
4144-
and <a href='#Text_Size'>text size</a>, <a href='#Fake_Bold'>fake bold</a>, and <a href='undocumented#SkPathEffect'>SkPathEffect</a> to scale and modify the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>.
4145-
Uses <a href='#SkPaint_getTextIntercepts_x'>x</a>, <a href='#SkPaint_getTextIntercepts_y'>y</a> to position <a href='#SkPaint_getTextIntercepts_intervals'>intervals</a>.
4146-
4147-
Pass nullptr for <a href='#SkPaint_getTextIntercepts_intervals'>intervals</a> to determine the <a href='undocumented#Size'>size</a> of the interval array.
4148-
4149-
<a href='#SkPaint_getTextIntercepts_intervals'>intervals</a> are cached to improve performance for multiple calls.
4150-
4151-
### Parameters
4152-
4153-
<table> <tr> <td><a name='SkPaint_getTextIntercepts_text'><code><strong>text</strong></code></a></td>
4154-
<td>character codes or <a href='undocumented#Glyph'>glyph</a> indices</td>
4155-
</tr>
4156-
<tr> <td><a name='SkPaint_getTextIntercepts_length'><code><strong>length</strong></code></a></td>
4157-
<td>number of bytes of <a href='#SkPaint_getTextIntercepts_text'>text</a></td>
4158-
</tr>
4159-
<tr> <td><a name='SkPaint_getTextIntercepts_x'><code><strong>x</strong></code></a></td>
4160-
<td>x-axis value of the origin of the <a href='#SkPaint_getTextIntercepts_text'>text</a></td>
4161-
</tr>
4162-
<tr> <td><a name='SkPaint_getTextIntercepts_y'><code><strong>y</strong></code></a></td>
4163-
<td>y-axis value of the origin of the <a href='#SkPaint_getTextIntercepts_text'>text</a></td>
4164-
</tr>
4165-
<tr> <td><a name='SkPaint_getTextIntercepts_bounds'><code><strong>bounds</strong></code></a></td>
4166-
<td>lower and upper <a href='undocumented#Line'>line</a> parallel to the advance</td>
4167-
</tr>
4168-
<tr> <td><a name='SkPaint_getTextIntercepts_intervals'><code><strong>intervals</strong></code></a></td>
4169-
<td>returned intersections; may be nullptr</td>
4170-
</tr>
4171-
</table>
4172-
4173-
### Return Value
4174-
4175-
number of intersections; may be zero
4176-
4177-
<div>Underline uses intercepts to draw on either side of the <a href='undocumented#Glyph'>glyph</a> Descender.
4178-
</div>
4179-
4180-
<a name='SkPaint_getPosTextIntercepts'></a>
4181-
4182-
---
4183-
4184-
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4185-
int <a href='#SkPaint_getPosTextIntercepts'>getPosTextIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[],
4186-
const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals)const
4187-
</pre>
4188-
4189-
Returns the number of <a href='#SkPaint_getPosTextIntercepts_intervals'>intervals</a> that intersect <a href='#SkPaint_getPosTextIntercepts_bounds'>bounds</a>.
4190-
<a href='#SkPaint_getPosTextIntercepts_bounds'>bounds</a> describes a pair of <a href='undocumented#Line'>lines</a> parallel to the <a href='#SkPaint_getPosTextIntercepts_text'>text</a> advance.
4191-
The return count is zero or a multiple of two, and is at most twice the number of <a href='undocumented#Glyph'>glyphs</a> in
4192-
the <a href='undocumented#String'>string</a>.
4193-
Uses <a href='undocumented#SkTextEncoding'>SkTextEncoding</a> to decode <a href='#SkPaint_getPosTextIntercepts_text'>text</a>, <a href='undocumented#SkTypeface'>SkTypeface</a> to get the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>,
4194-
and <a href='#Text_Size'>text size</a>, <a href='#Fake_Bold'>fake bold</a>, and <a href='undocumented#SkPathEffect'>SkPathEffect</a> to scale and modify the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>.
4195-
Uses <a href='#SkPaint_getPosTextIntercepts_pos'>pos</a> array to position <a href='#SkPaint_getPosTextIntercepts_intervals'>intervals</a>.
4196-
4197-
Pass nullptr for <a href='#SkPaint_getPosTextIntercepts_intervals'>intervals</a> to determine the <a href='undocumented#Size'>size</a> of the interval array.
4198-
4199-
<a href='#SkPaint_getPosTextIntercepts_intervals'>intervals</a> are cached to improve performance for multiple calls.
4200-
4201-
### Parameters
4202-
4203-
<table> <tr> <td><a name='SkPaint_getPosTextIntercepts_text'><code><strong>text</strong></code></a></td>
4204-
<td>character codes or <a href='undocumented#Glyph'>glyph</a> indices</td>
4205-
</tr>
4206-
<tr> <td><a name='SkPaint_getPosTextIntercepts_length'><code><strong>length</strong></code></a></td>
4207-
<td>number of bytes of <a href='#SkPaint_getPosTextIntercepts_text'>text</a></td>
4208-
</tr>
4209-
<tr> <td><a name='SkPaint_getPosTextIntercepts_pos'><code><strong>pos</strong></code></a></td>
4210-
<td>positions of each <a href='undocumented#Glyph'>glyph</a></td>
4211-
</tr>
4212-
<tr> <td><a name='SkPaint_getPosTextIntercepts_bounds'><code><strong>bounds</strong></code></a></td>
4213-
<td>lower and upper <a href='undocumented#Line'>line</a> parallel to the advance</td>
4214-
</tr>
4215-
<tr> <td><a name='SkPaint_getPosTextIntercepts_intervals'><code><strong>intervals</strong></code></a></td>
4216-
<td>returned intersections; may be nullptr</td>
4217-
</tr>
4218-
</table>
4219-
4220-
### Return Value
4221-
4222-
number of intersections; may be zero
4223-
4224-
<div><a href='undocumented#Text'>Text</a> intercepts draw on either side of, but not inside, <a href='undocumented#Glyph'>Glyphs</a> in a run.
4225-
</div>
4226-
4227-
<a name='SkPaint_getPosTextHIntercepts'></a>
4228-
4229-
---
4230-
4231-
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4232-
int <a href='#SkPaint_getPosTextHIntercepts'>getPosTextHIntercepts</a>(const void* <a href='undocumented#Text'>text</a>, size_t length, const <a href='undocumented#SkScalar'>SkScalar</a> xpos[], <a href='undocumented#SkScalar'>SkScalar</a> constY,
4233-
const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals)const
4234-
</pre>
4235-
4236-
Returns the number of <a href='#SkPaint_getPosTextHIntercepts_intervals'>intervals</a> that intersect <a href='#SkPaint_getPosTextHIntercepts_bounds'>bounds</a>.
4237-
<a href='#SkPaint_getPosTextHIntercepts_bounds'>bounds</a> describes a pair of <a href='undocumented#Line'>lines</a> parallel to the <a href='#SkPaint_getPosTextHIntercepts_text'>text</a> advance.
4238-
The return count is zero or a multiple of two, and is at most twice the number of <a href='undocumented#Glyph'>glyphs</a> in
4239-
the <a href='undocumented#String'>string</a>.
4240-
Uses <a href='undocumented#SkTextEncoding'>SkTextEncoding</a> to decode <a href='#SkPaint_getPosTextHIntercepts_text'>text</a>, <a href='undocumented#SkTypeface'>SkTypeface</a> to get the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>,
4241-
and <a href='#Text_Size'>text size</a>, <a href='#Fake_Bold'>fake bold</a>, and <a href='undocumented#SkPathEffect'>SkPathEffect</a> to scale and modify the <a href='undocumented#Glyph'>glyph</a> <a href='SkPath_Reference#Path'>paths</a>.
4242-
Uses <a href='#SkPaint_getPosTextHIntercepts_xpos'>xpos</a> array, <a href='#SkPaint_getPosTextHIntercepts_constY'>constY</a> to position <a href='#SkPaint_getPosTextHIntercepts_intervals'>intervals</a>.
4243-
4244-
Pass nullptr for <a href='#SkPaint_getPosTextHIntercepts_intervals'>intervals</a> to determine the <a href='undocumented#Size'>size</a> of the interval array.
4245-
4246-
<a href='#SkPaint_getPosTextHIntercepts_intervals'>intervals</a> are cached to improve performance for multiple calls.
4247-
4248-
### Parameters
4249-
4250-
<table> <tr> <td><a name='SkPaint_getPosTextHIntercepts_text'><code><strong>text</strong></code></a></td>
4251-
<td>character codes or <a href='undocumented#Glyph'>glyph</a> indices</td>
4252-
</tr>
4253-
<tr> <td><a name='SkPaint_getPosTextHIntercepts_length'><code><strong>length</strong></code></a></td>
4254-
<td>number of bytes of <a href='#SkPaint_getPosTextHIntercepts_text'>text</a></td>
4255-
</tr>
4256-
<tr> <td><a name='SkPaint_getPosTextHIntercepts_xpos'><code><strong>xpos</strong></code></a></td>
4257-
<td>positions of each <a href='undocumented#Glyph'>glyph</a> on x-axis</td>
4258-
</tr>
4259-
<tr> <td><a name='SkPaint_getPosTextHIntercepts_constY'><code><strong>constY</strong></code></a></td>
4260-
<td>position of each <a href='undocumented#Glyph'>glyph</a> on y-axis</td>
4261-
</tr>
4262-
<tr> <td><a name='SkPaint_getPosTextHIntercepts_bounds'><code><strong>bounds</strong></code></a></td>
4263-
<td>lower and upper <a href='undocumented#Line'>line</a> parallel to the advance</td>
4264-
</tr>
4265-
<tr> <td><a name='SkPaint_getPosTextHIntercepts_intervals'><code><strong>intervals</strong></code></a></td>
4266-
<td>returned intersections; may be nullptr</td>
4267-
</tr>
4268-
</table>
4269-
4270-
### Return Value
4271-
4272-
number of intersections; may be zero
4273-
4274-
<div><a href='undocumented#Text'>Text</a> intercepts do not take stroke thickness into consideration.
4275-
</div>
4276-
42774116
<a name='SkPaint_getTextBlobIntercepts'></a>
42784117

42794118
---

site/user/api/SkTextBlob_Reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a> final : public <a
1111

1212
const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='#SkTextBlob_bounds'>bounds()</a> const;
1313
uint32_t <a href='#SkTextBlob_uniqueID'>uniqueID</a>() const;
14+
int getIntercepts(const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a> intervals[],
15+
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr) const;
1416
static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlob_MakeFromText'>MakeFromText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='SkFont_Reference#SkFont'>SkFont</a>& <a href='SkFont_Reference#Font'>font</a>,
1517
<a href='undocumented#SkTextEncoding'>SkTextEncoding</a> encoding = <a href='undocumented#kUTF8_SkTextEncoding'>kUTF8_SkTextEncoding</a>);
1618
static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlob_MakeFromString'>MakeFromString</a>(const char* <a href='undocumented#String'>string</a>, const <a href='SkFont_Reference#SkFont'>SkFont</a>& <a href='SkFont_Reference#Font'>font</a>,

0 commit comments

Comments
 (0)