aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user
diff options
context:
space:
mode:
Diffstat (limited to 'site/user')
-rw-r--r--site/user/api/SkBlendMode_Reference.md2
-rw-r--r--site/user/api/SkCanvas_Reference.md102
-rw-r--r--site/user/api/SkPaint_Reference.md6
-rw-r--r--site/user/api/catalog.htm29
-rw-r--r--site/user/api/usingBookmaker.md2
5 files changed, 121 insertions, 20 deletions
diff --git a/site/user/api/SkBlendMode_Reference.md b/site/user/api/SkBlendMode_Reference.md
index d860b27e55..80e98b474f 100644
--- a/site/user/api/SkBlendMode_Reference.md
+++ b/site/user/api/SkBlendMode_Reference.md
@@ -559,7 +559,7 @@ Used by tests to iterate through all valid values.
### See Also
-<a href='SkCanvas_Reference#SkCanvas_drawColor'>SkCanvas::drawColor</a> <a href='SkCanvas_Reference#SkCanvas_drawVertices'>SkCanvas::drawVertices</a><sup><a href='SkCanvas_Reference#SkCanvas_drawVertices_2'>[2]</a></sup> <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkShader_MakeCompose'>SkShader::MakeCompose</a> <a href='undocumented#SkXfermodeImageFilter'>SkXfermodeImageFilter</a>
+<a href='SkCanvas_Reference#SkCanvas_drawColor'>SkCanvas::drawColor</a> <a href='SkCanvas_Reference#SkCanvas_drawVertices'>SkCanvas::drawVertices</a><sup><a href='SkCanvas_Reference#SkCanvas_drawVertices_2'>[2]</a></sup><sup><a href='SkCanvas_Reference#SkCanvas_drawVertices_3'>[3]</a></sup><sup><a href='SkCanvas_Reference#SkCanvas_drawVertices_4'>[4]</a></sup> <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkShader_MakeCompose'>SkShader::MakeCompose</a> <a href='undocumented#SkXfermodeImageFilter'>SkXfermodeImageFilter</a>
## <a name='Clear'>Clear</a>
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index bbf12ba281..1656128411 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -3799,6 +3799,14 @@ device bounds empty = true
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawVertices_2'>drawVertices(const sk sp&lt;SkVertices&gt;& vertices, SkBlendMode mode, const SkPaint& paint)</a></td>
</tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawVertices_3'>drawVertices(const SkVertices* vertices, const SkMatrix* bones, int boneCount, SkBlendMode mode, const SkPaint& paint)</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawVertices_4'>drawVertices(const sk sp&lt;SkVertices&gt;& vertices, const SkMatrix* bones, int boneCount, SkBlendMode mode, const SkPaint& paint)</a></td>
+ </tr>
</table>
<a name='SkCanvas_drawColor'></a>
@@ -6507,7 +6515,95 @@ contains <a href='undocumented#Shader'>Shader</a>, <a href='SkBlendMode_Referenc
### Example
-<div><fiddle-embed name="94e32538646d5f1299c427e473f9ec87"></fiddle-embed></div>
+<div><fiddle-embed name="e8bdae9bea3227758989028424fcac3d"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkCanvas_drawPatch'>drawPatch</a><sup><a href='#SkCanvas_drawPatch_2'>[2]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
+
+---
+
+<a name='SkCanvas_drawVertices_3'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#SkVertices'>SkVertices</a>* vertices, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* bones, int boneCount, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode,
+ const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+</pre>
+
+<a href='#Draw'>Draw</a> <a href='undocumented#Vertices'>Vertices</a> <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a>, a triangle mesh, using <a href='#Clip'>Clip</a> and <a href='#Matrix'>Matrix</a>. Bone data is used to
+deform <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a> with bone weights.
+If <a href='undocumented#Texs'>Vertices Texs</a> and <a href='undocumented#Colors'>Vertices Colors</a> are defined in <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawVertices_3_paint'>paint</a>
+contains <a href='undocumented#Shader'>Shader</a>, <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a> <a href='#SkCanvas_drawVertices_3_mode'>mode</a> combines <a href='undocumented#Colors'>Vertices Colors</a> with <a href='undocumented#Shader'>Shader</a>.
+The first element of <a href='#SkCanvas_drawVertices_3_bones'>bones</a> should be an object to world space transformation matrix that
+will be applied before performing mesh deformations. If no such transformation is needed,
+it should be the identity matrix.
+
+### Parameters
+
+<table> <tr> <td><a name='SkCanvas_drawVertices_3_vertices'><code><strong>vertices</strong></code></a></td>
+ <td>triangle mesh to draw</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_3_bones'><code><strong>bones</strong></code></a></td>
+ <td>bone matrix data</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_3_boneCount'><code><strong>boneCount</strong></code></a></td>
+ <td>number of bone matrices</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_3_mode'><code><strong>mode</strong></code></a></td>
+ <td>combines <a href='undocumented#Colors'>Vertices Colors</a> with <a href='undocumented#Shader'>Shader</a>, if both are present</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_3_paint'><code><strong>paint</strong></code></a></td>
+ <td>specifies the <a href='undocumented#Shader'>Shader</a>, used as <a href='undocumented#Vertices'>Vertices</a> texture, may be nullptr</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="7db6ad6b01931d713d7390736239001b"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkCanvas_drawPatch'>drawPatch</a><sup><a href='#SkCanvas_drawPatch_2'>[2]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
+
+---
+
+<a name='SkCanvas_drawVertices_4'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#sk_sp'>sk sp</a>&lt;<a href='undocumented#SkVertices'>SkVertices</a>&gt;& vertices, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* bones, int boneCount,
+ <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+</pre>
+
+<a href='#Draw'>Draw</a> <a href='undocumented#Vertices'>Vertices</a> <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a>, a triangle mesh, using <a href='#Clip'>Clip</a> and <a href='#Matrix'>Matrix</a>. Bone data is used to
+deform <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a> with bone weights.
+If <a href='undocumented#Texs'>Vertices Texs</a> and <a href='undocumented#Colors'>Vertices Colors</a> are defined in <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawVertices_4_paint'>paint</a>
+contains <a href='undocumented#Shader'>Shader</a>, <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a> <a href='#SkCanvas_drawVertices_4_mode'>mode</a> combines <a href='undocumented#Colors'>Vertices Colors</a> with <a href='undocumented#Shader'>Shader</a>.
+The first element of <a href='#SkCanvas_drawVertices_4_bones'>bones</a> should be an object to world space transformation matrix that
+will be applied before performing mesh deformations. If no such transformation is needed,
+it should be the identity matrix.
+
+### Parameters
+
+<table> <tr> <td><a name='SkCanvas_drawVertices_4_vertices'><code><strong>vertices</strong></code></a></td>
+ <td>triangle mesh to draw</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_4_bones'><code><strong>bones</strong></code></a></td>
+ <td>bone matrix data</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_4_boneCount'><code><strong>boneCount</strong></code></a></td>
+ <td>number of bone matrices</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_4_mode'><code><strong>mode</strong></code></a></td>
+ <td>combines <a href='undocumented#Colors'>Vertices Colors</a> with <a href='undocumented#Shader'>Shader</a>, if both are present</td>
+ </tr>
+ <tr> <td><a name='SkCanvas_drawVertices_4_paint'><code><strong>paint</strong></code></a></td>
+ <td>specifies the <a href='undocumented#Shader'>Shader</a>, used as <a href='undocumented#Vertices'>Vertices</a> texture, may be nullptr</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="cc1fc7f3462abc79ec6dec3405e2812d"></fiddle-embed></div>
### See Also
@@ -6567,7 +6663,7 @@ may be nullptr</td>
### See Also
-SeeAlso <a href='#SkCanvas_drawVertices'>drawVertices</a><sup><a href='#SkCanvas_drawVertices_2'>[2]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
+SeeAlso <a href='#SkCanvas_drawVertices'>drawVertices</a><sup><a href='#SkCanvas_drawVertices_2'>[2]</a></sup><sup><a href='#SkCanvas_drawVertices_3'>[3]</a></sup><sup><a href='#SkCanvas_drawVertices_4'>[4]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
---
@@ -6623,7 +6719,7 @@ may be nullptr</td>
### See Also
-SeeAlso <a href='#SkCanvas_drawVertices'>drawVertices</a><sup><a href='#SkCanvas_drawVertices_2'>[2]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
+SeeAlso <a href='#SkCanvas_drawVertices'>drawVertices</a><sup><a href='#SkCanvas_drawVertices_2'>[2]</a></sup><sup><a href='#SkCanvas_drawVertices_3'>[3]</a></sup><sup><a href='#SkCanvas_drawVertices_4'>[4]</a></sup> <a href='#SkCanvas_drawPicture'>drawPicture</a><sup><a href='#SkCanvas_drawPicture_2'>[2]</a></sup><sup><a href='#SkCanvas_drawPicture_3'>[3]</a></sup><sup><a href='#SkCanvas_drawPicture_4'>[4]</a></sup>
---
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index ae834cb097..3a5a9320b0 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -5443,9 +5443,7 @@ Returns true if <a href='#SkPaint_containsText_byteLength'>byteLength</a> is zer
true if all <a href='#SkPaint_containsText_text'>text</a> corresponds to a non-zero glyph index
-### Example
-
-<div><fiddle-embed name="71b417d6651cbcecae1a05067c94ab3e"><div><a href='#SkPaint_containsText'>containsText</a> succeeds for degree symbol, but cannot find a glyph index
+<div><a href='#SkPaint_containsText'>containsText</a> succeeds for degree symbol, but cannot find a glyph index
corresponding to the Unicode surrogate code point.
</div>
@@ -5456,8 +5454,6 @@ corresponding to the Unicode surrogate code point.
0xd800 != has char
~~~~
-</fiddle-embed></div>
-
### Example
<div><fiddle-embed name="083557b6f653d6fc00a34e01f87b74ff"><div><a href='#SkPaint_containsText'>containsText</a> returns true that glyph index is greater than zero, not
diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm
index db6e59418c..e1fe83ea30 100644
--- a/site/user/api/catalog.htm
+++ b/site/user/api/catalog.htm
@@ -1443,17 +1443,10 @@
"stdout": "[ 1.0000 0.0000 3.0000][ 0.0000 2.0000 4.0000][ 0.0000 0.0000 1.0000]\\n"
},
"SkPaint_containsText": {
- "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n const uint16_t goodChar = 0x00B0; // degree symbol\n const uint16_t badChar = 0xD800; // Unicode surrogate\n paint.setTextEncoding(SkPaint::kUTF16_TextEncoding);\n SkDebugf(\"0x%04x %c= has char\\n\", goodChar,\n paint.containsText(&goodChar, 2) ? '=' : '!');\n SkDebugf(\"0x%04x %c= has char\\n\", badChar,\n paint.containsText(&badChar, 2) ? '=' : '!');\n}",
- "hash": "71b417d6651cbcecae1a05067c94ab3e",
- "file": "SkPaint_Reference",
- "name": "SkPaint::containsText",
- "stdout": "0x00b0 == has char\\n0xd800 != has char\\n"
- },
- "SkPaint_containsText_a": {
"code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n const uint16_t goodGlyph = 511;\n const uint16_t zeroGlyph = 0;\n const uint16_t badGlyph = 65535; // larger than glyph count in font\n paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n SkDebugf(\"0x%04x %c= has glyph\\n\", goodGlyph,\n paint.containsText(&goodGlyph, 2) ? '=' : '!');\n SkDebugf(\"0x%04x %c= has glyph\\n\", zeroGlyph,\n paint.containsText(&zeroGlyph, 2) ? '=' : '!');\n SkDebugf(\"0x%04x %c= has glyph\\n\", badGlyph,\n paint.containsText(&badGlyph, 2) ? '=' : '!');\n}",
"hash": "083557b6f653d6fc00a34e01f87b74ff",
"file": "SkPaint_Reference",
- "name": "SkPaint::containsText_2",
+ "name": "SkPaint::containsText",
"stdout": "0x01ff == has glyph\\n0x0000 != has glyph\\n0xffff == has glyph\\n"
},
"SkPaint_copy_const_SkPaint": {
@@ -5097,13 +5090,29 @@
"name": "SkCanvas::drawVertices"
},
"SkCanvas_drawVertices_2": {
- "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };\n SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };\n SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };\n paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,\n SkShader::kClamp_TileMode));\n auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,\n SK_ARRAY_COUNT(points), points, texs, colors);\n canvas->drawVertices(vertices.get(), SkBlendMode::kDarken, paint);\n}\n",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };\n SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };\n SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };\n paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,\n SkShader::kClamp_TileMode));\n auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,\n SK_ARRAY_COUNT(points), points, texs, colors);\n canvas->drawVertices(vertices, SkBlendMode::kDarken, paint);\n}\n",
"width": 256,
"height": 256,
- "hash": "94e32538646d5f1299c427e473f9ec87",
+ "hash": "e8bdae9bea3227758989028424fcac3d",
"file": "SkCanvas_Reference",
"name": "SkCanvas::drawVertices_2"
},
+ "SkCanvas_drawVertices_3": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };\n SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };\n SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };\n SkVertices::BoneIndices boneIndices[] = { { 0, 0, 0, 0 },\n { 1, 0, 0, 0 },\n { 2, 0, 0, 0 },\n { 3, 0, 0, 0 } };\n SkVertices::BoneWeights boneWeights[] = { { 0.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f } };\n SkMatrix bones[] = { SkMatrix::I(),\n SkMatrix::MakeTrans(0, 20),\n SkMatrix::MakeTrans(50, 50),\n SkMatrix::MakeTrans(20, 0) };\n paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,\n SkShader::kClamp_TileMode));\n auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,\n SK_ARRAY_COUNT(points), points, texs, colors, boneIndices, boneWeights);\n canvas->drawVertices(vertices.get(), bones, SK_ARRAY_COUNT(bones), SkBlendMode::kDarken, paint);\n}\n",
+ "width": 256,
+ "height": 256,
+ "hash": "7db6ad6b01931d713d7390736239001b",
+ "file": "SkCanvas_Reference",
+ "name": "SkCanvas::drawVertices_3"
+},
+ "SkCanvas_drawVertices_4": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };\n SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };\n SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };\n SkVertices::BoneIndices boneIndices[] = { { 0, 0, 0, 0 },\n { 1, 0, 0, 0 },\n { 2, 0, 0, 0 },\n { 3, 0, 0, 0 } };\n SkVertices::BoneWeights boneWeights[] = { { 0.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f },\n { 1.0f, 0.0f, 0.0f, 0.0f } };\n SkMatrix bones[] = { SkMatrix::I(),\n SkMatrix::MakeTrans(0, 20),\n SkMatrix::MakeTrans(50, 50),\n SkMatrix::MakeTrans(20, 0) };\n paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,\n SkShader::kClamp_TileMode));\n auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,\n SK_ARRAY_COUNT(points), points, texs, colors, boneIndices, boneWeights);\n canvas->drawVertices(vertices, bones, SK_ARRAY_COUNT(bones), SkBlendMode::kDarken, paint);\n}\n",
+ "width": 256,
+ "height": 256,
+ "hash": "cc1fc7f3462abc79ec6dec3405e2812d",
+ "file": "SkCanvas_Reference",
+ "name": "SkCanvas::drawVertices_4"
+},
"SkCanvas_getGrContext": {
"code": "void draw(SkCanvas* canvas) {\n if (canvas->getGrContext()) {\n canvas->clear(SK_ColorRED);\n } else {\n canvas->clear(SK_ColorBLUE);\n }\n}\n",
"width": 256,
diff --git a/site/user/api/usingBookmaker.md b/site/user/api/usingBookmaker.md
index 004361a2dc..348d1c6704 100644
--- a/site/user/api/usingBookmaker.md
+++ b/site/user/api/usingBookmaker.md
@@ -104,7 +104,7 @@ Get the fiddle command line interface tool.
By default this will appear in your home directory.
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
-$ go get go.skia.org/infra/fiddle/go/fiddlecli
+$ go get go.skia.org/infra/fiddlek/go/fiddlecli
</pre>
Build <a href='#Bookmaker'>Bookmaker</a>.