fix bookmaker
Mark experimental method in SkCanvas as "Experimental" in its
comment. Maybe it should be enough to name the routine experimental_...
but for now bookmaker requires the comment to say that as well.
Change the TextIntercept examples to #NoExample.
TBR=reed@google.com,bsalomon@google.com
Docs-Preview: https://skia.org/?cl=172402
Bug: skia:
Change-Id: Id74b59e141d5002a8b6118ca28cb9c62a36e2f02
Reviewed-on: https://skia-review.googlesource.com/c/172402
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index 98067ae..9ae82cd 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -3504,7 +3504,7 @@
#Line # returns where lines intersect text; underlines ##
#Populate
-#Example
+#NoExample
#Height 128
#Description
Underline uses intercepts to draw on either side of the glyph Descender.
@@ -3539,7 +3539,7 @@
#Line # returns where lines intersect positioned text; underlines ##
#Populate
-#Example
+#NoExample
#Description
Text intercepts draw on either side of, but not inside, Glyphs in a run.
##
@@ -3576,7 +3576,7 @@
#Line # returns where lines intersect horizontally positioned text; underlines ##
#Populate
-#Example
+#NoExample
#Height 128
#Description
Text intercepts do not take stroke thickness into consideration.
diff --git a/docs/spelling.txt b/docs/spelling.txt
index 7caf9ef..fb08a11 100644
--- a/docs/spelling.txt
+++ b/docs/spelling.txt
@@ -110,7 +110,7 @@
influence info inform information initial initialize initialized initializes initializing
initially inline inner input insert inserts inset insets inside inspected installed instance
instantaneous instantiated instantiation instantiations instead instruct instructs integer integers
-integral intensity intercepted intercepts interchangeably interface interior
+integral intensity intercepted intercepts interchangeably interest interface interior
interleaved interleaving
intermediate internal internally interpolate interpolated interpolates interpolation interpret
interpreted interrupted interruption intersect intersected intersecting intersection
@@ -194,7 +194,7 @@
rotate rotate-x rotate-y rotated rotates rotating rotation roughly round rounded
rounding rounds route routes routines row rows rule rules run runs
-safe safely safer same sample sampled samples sampling satisfies satisfy satisfying
+safe safely safer same sample sampled samples sampling sanitized satisfies satisfy satisfying
saturation savable save saved saves scale scale-x scale-y scaled scales scaling scan
scene scope screen second second-order section sections see seek seeks segment segments select
selecting selectively selector selects semaphore semaphores sensitive sent separate separately
@@ -229,7 +229,7 @@
transformations
transformed transforming transforms transition transitions translate translated translates
translating translation translucent transparency transparent travel traveled treat treated
-treating treats triangle trigger triggered triggers trivial true try turned turns twice two
+treating treats triangle trigger triggered triggers trimmed trivial true try turned turns twice two
two-dimensional type types typically typographic
unaffected unaltered unchanged unchanging uncompressed undefined under underline
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index e2c3951..7bb7a11 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -18,7 +18,7 @@
CSS HTML
affine destructor multitexturing representable subclasses descender descenders grayscale kerning
- unhinted
+ unhinted no-parameter
Sa Da Sc Dc 0xAARRGGBB # temporary until figure out what to do
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index db66a0c..6177349 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1840,7 +1840,7 @@
unsigned fAAFlags; // QuadAAFlags
};
- /** This version will be removed. Alpha is now a property of ImageSetEntry. */
+ /** Experimental. This version will be removed. Alpha is now a property of ImageSetEntry. */
void experimental_DrawImageSetV0(const ImageSetEntry imageSet[], int cnt, float alpha,
SkFilterQuality quality, SkBlendMode mode);
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index 6bf9d4d..01aceb5 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -206,14 +206,22 @@
};
struct ImageSetEntry {
+ ImageSetEntry(<a href='undocumented#sk_sp'>sk_sp</a><const <a href='SkImage_Reference#SkImage'>SkImage</a>>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& srcRect, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dstRect,
+ unsigned aaFlags);
+ ImageSetEntry(<a href='undocumented#sk_sp'>sk_sp</a><const <a href='SkImage_Reference#SkImage'>SkImage</a>>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& srcRect, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dstRect,
+ float <a href='SkColor_Reference#Alpha'>alpha</a>, unsigned aaFlags);
+ ImageSetEntry() = default;
<a href='undocumented#sk_sp'>sk_sp</a><const <a href='SkImage_Reference#SkImage'>SkImage</a>> fImage;
<a href='SkRect_Reference#SkRect'>SkRect</a> fSrcRect;
<a href='SkRect_Reference#SkRect'>SkRect</a> fDstRect;
+ float fAlpha;
unsigned fAAFlags;
};
void experimental_DrawImageSetV0(const ImageSetEntry imageSet[], int cnt, float <a href='SkColor_Reference#Alpha'>alpha</a>,
<a href='undocumented#SkFilterQuality'>SkFilterQuality</a> quality, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode);
+ void experimental_DrawImageSetV1(const ImageSetEntry imageSet[], int cnt,
+ <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> quality, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode);
void <a href='#SkCanvas_drawText'>drawText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y,
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
void <a href='#SkCanvas_drawString'>drawString</a>(const char* <a href='undocumented#String'>string</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
diff --git a/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md
index 38927de..a77ffad 100644
--- a/site/user/api/SkImage_Reference.md
+++ b/site/user/api/SkImage_Reference.md
@@ -60,13 +60,6 @@
<a href='undocumented#SkISize'>SkISize</a> imageSize,
<a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
<a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr);
- static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkImage_MakeFromYUVATextures'>MakeFromYUVATextures</a>(<a href='undocumented#GrContext'>GrContext</a>* context,
- <a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace,
- const <a href='undocumented#GrBackendTexture'>GrBackendTexture</a> yuvaTextures[],
- const <a href='undocumented#SkYUVAIndex'>SkYUVAIndex</a> yuvaIndices[4],
- <a href='undocumented#SkISize'>SkISize</a> imageSize,
- <a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
- <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr);
static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkImage_MakeFromYUVATexturesCopyWithExternalBackend'>MakeFromYUVATexturesCopyWithExternalBackend</a>(
<a href='undocumented#GrContext'>GrContext</a>* context,
<a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace,
@@ -76,6 +69,18 @@
<a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
const <a href='undocumented#GrBackendTexture'>GrBackendTexture</a>& backendTexture,
<a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr);
+ static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkImage_MakeFromYUVATextures'>MakeFromYUVATextures</a>(<a href='undocumented#GrContext'>GrContext</a>* context,
+ <a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace,
+ const <a href='undocumented#GrBackendTexture'>GrBackendTexture</a> yuvaTextures[],
+ const <a href='undocumented#SkYUVAIndex'>SkYUVAIndex</a> yuvaIndices[4],
+ <a href='undocumented#SkISize'>SkISize</a> imageSize,
+ <a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
+ <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr);
+ static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkImage_MakeFromYUVAPixmaps'>MakeFromYUVAPixmaps</a>(
+ <a href='undocumented#GrContext'>GrContext</a>* context, <a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace, const <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a> yuvaPixmaps[],
+ const <a href='undocumented#SkYUVAIndex'>SkYUVAIndex</a> yuvaIndices[4], <a href='undocumented#SkISize'>SkISize</a> imageSize, <a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
+ bool buildMips, bool limitToMaxTextureSize = false,
+ <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr);
static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkImage_MakeFromYUVTexturesCopy'>MakeFromYUVTexturesCopy</a>(<a href='undocumented#GrContext'>GrContext</a>* context, <a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace,
const <a href='undocumented#GrBackendTexture'>GrBackendTexture</a> yuvTextures[3],
<a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
@@ -991,6 +996,94 @@
<a href='#SkImage_MakeFromYUVATexturesCopy'>MakeFromYUVATexturesCopy</a> <a href='#SkImage_MakeFromYUVATexturesCopyWithExternalBackend'>MakeFromYUVATexturesCopyWithExternalBackend</a>
+<a name='SkImage_MakeFromYUVAPixmaps'></a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+static <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>
+ <a href='#SkImage_MakeFromYUVAPixmaps'>MakeFromYUVAPixmaps</a>(
+ <a href='undocumented#GrContext'>GrContext</a>* context,
+ <a href='SkImageInfo_Reference#SkYUVColorSpace'>SkYUVColorSpace</a> yuvColorSpace, const <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a> yuvaPixmaps[],
+ const <a href='undocumented#SkYUVAIndex'>SkYUVAIndex</a> yuvaIndices[4], <a href='undocumented#SkISize'>SkISize</a> imageSize, <a href='undocumented#GrSurfaceOrigin'>GrSurfaceOrigin</a> imageOrigin,
+ bool buildMips, bool limitToMaxTextureSize = false,
+ <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr) ;
+</pre>
+
+Creates <a href='SkImage_Reference#SkImage'>SkImage</a> from <a href='SkPixmap_Reference#Pixmap'>pixmap</a> array representing YUVA <a href='undocumented#Data'>data</a>.
+<a href='SkImage_Reference#SkImage'>SkImage</a> is uploaded to GPU back-end using <a href='#SkImage_MakeFromYUVAPixmaps_context'>context</a>.
+
+Each <a href='undocumented#GrBackendTexture'>GrBackendTexture</a> created from <a href='#SkImage_MakeFromYUVAPixmaps_yuvaPixmaps'>yuvaPixmaps</a> array is uploaded to match <a href='SkSurface_Reference#SkSurface'>SkSurface</a>
+using <a href='undocumented#SkColorSpace'>SkColorSpace</a> of <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>. <a href='undocumented#SkColorSpace'>SkColorSpace</a> of <a href='SkImage_Reference#SkImage'>SkImage</a> is determined by <a href='#SkImage_MakeFromYUVAPixmaps_imageColorSpace'>imageColorSpace</a>.
+
+<a href='SkImage_Reference#SkImage'>SkImage</a> is returned referring to GPU back-end if <a href='#SkImage_MakeFromYUVAPixmaps_context'>context</a> is not nullptr and
+format of <a href='undocumented#Data'>data</a> is recognized and supported. Otherwise, nullptr is returned.
+Recognized GPU formats vary by platform and GPU back-end.
+
+### Parameters
+
+<table> <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_context'><code><strong>context</strong></code></a></td>
+ <td><a href='undocumented#GPU_Context'>GPU context</a></td>
+ </tr>
+ <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_yuvColorSpace'><code><strong>yuvColorSpace</strong></code></a></td>
+ <td>How the YUV values are converted to RGB. One of:</td>
+ </tr>
+</table>
+
+<a href='SkImageInfo_Reference#kJPEG_SkYUVColorSpace'>kJPEG_SkYUVColorSpace</a>, <a href='SkImageInfo_Reference#kRec601_SkYUVColorSpace'>kRec601_SkYUVColorSpace</a>,
+<a href='SkImageInfo_Reference#kRec709_SkYUVColorSpace'>kRec709_SkYUVColorSpace</a>
+
+### Parameters
+
+<table> <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_yuvaPixmaps'><code><strong>yuvaPixmaps</strong></code></a></td>
+ <td>array of (up to four) <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a> which contain the,</td>
+ </tr>
+</table>
+
+possibly interleaved, YUVA planes
+
+### Parameters
+
+<table> <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_yuvaIndices'><code><strong>yuvaIndices</strong></code></a></td>
+ <td>array indicating which <a href='SkPixmap_Reference#Pixmap'>pixmap</a> in <a href='#SkImage_MakeFromYUVAPixmaps_yuvaPixmaps'>yuvaPixmaps</a>, and channel</td>
+ </tr>
+</table>
+
+in that <a href='SkPixmap_Reference#Pixmap'>pixmap</a>, maps to each component of YUVA.
+
+### Parameters
+
+<table> <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_imageSize'><code><strong>imageSize</strong></code></a></td>
+ <td><a href='undocumented#Size'>size</a> of the resulting <a href='SkImage_Reference#Image'>image</a></td>
+ </tr>
+ <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_imageOrigin'><code><strong>imageOrigin</strong></code></a></td>
+ <td>origin of the resulting <a href='SkImage_Reference#Image'>image</a>. One of:</td>
+ </tr>
+</table>
+
+<a href='undocumented#kBottomLeft_GrSurfaceOrigin'>kBottomLeft_GrSurfaceOrigin</a>, <a href='undocumented#kTopLeft_GrSurfaceOrigin'>kTopLeft_GrSurfaceOrigin</a>
+
+### Parameters
+
+<table> <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_buildMips'><code><strong>buildMips</strong></code></a></td>
+ <td>create internal YUVA textures as <a href='undocumented#Mip_Map'>mip map</a> if true</td>
+ </tr>
+ <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_limitToMaxTextureSize'><code><strong>limitToMaxTextureSize</strong></code></a></td>
+ <td>downscale <a href='SkImage_Reference#Image'>image</a> to GPU maximum <a href='undocumented#Texture'>texture</a> <a href='undocumented#Size'>size</a>, if necessary</td>
+ </tr>
+ <tr> <td><a name='SkImage_MakeFromYUVAPixmaps_imageColorSpace'><code><strong>imageColorSpace</strong></code></a></td>
+ <td>range of colors of the resulting <a href='SkImage_Reference#Image'>image</a>; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+created <a href='SkImage_Reference#SkImage'>SkImage</a>, or nullptr
+
+### See Also
+
+<a href='#SkImage_MakeFromYUVATextures'>MakeFromYUVATextures</a>
+
<a name='SkImage_MakeFromYUVATexturesCopyWithExternalBackend'></a>
---
@@ -1079,38 +1172,7 @@
<a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr)
</pre>
-Creates <a href='SkImage_Reference#SkImage'>SkImage</a> from copy of <a href='#SkImage_MakeFromYUVTexturesCopy_yuvTextures'>yuvTextures</a>, an array of textures on GPU.
-<a href='#SkImage_MakeFromYUVTexturesCopy_yuvTextures'>yuvTextures</a> contain pixels for <a href='undocumented#YUV_Planes'>YUV planes</a> of <a href='SkImage_Reference#SkImage'>SkImage</a>. Returned <a href='SkImage_Reference#SkImage'>SkImage</a> has the dimensions
-<a href='#SkImage_MakeFromYUVTexturesCopy_yuvTextures'>yuvTextures</a>[0]. <a href='#SkImage_MakeFromYUVTexturesCopy_yuvColorSpace'>yuvColorSpace</a> describes how YUV colors convert to RGB colors.
-
-### Parameters
-
-<table> <tr> <td><a name='SkImage_MakeFromYUVTexturesCopy_context'><code><strong>context</strong></code></a></td>
- <td><a href='undocumented#GPU_Context'>GPU context</a></td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopy_yuvColorSpace'><code><strong>yuvColorSpace</strong></code></a></td>
- <td>one of: <a href='SkImageInfo_Reference#kJPEG_SkYUVColorSpace'>kJPEG_SkYUVColorSpace</a>, <a href='SkImageInfo_Reference#kRec601_SkYUVColorSpace'>kRec601_SkYUVColorSpace</a>,</td>
- </tr>
-</table>
-
-<a href='SkImageInfo_Reference#kRec709_SkYUVColorSpace'>kRec709_SkYUVColorSpace</a>
-
-### Parameters
-
-<table> <tr> <td><a name='SkImage_MakeFromYUVTexturesCopy_yuvTextures'><code><strong>yuvTextures</strong></code></a></td>
- <td>array of YUV textures on GPU</td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopy_imageOrigin'><code><strong>imageOrigin</strong></code></a></td>
- <td>one of: <a href='undocumented#kBottomLeft_GrSurfaceOrigin'>kBottomLeft_GrSurfaceOrigin</a>, <a href='undocumented#kTopLeft_GrSurfaceOrigin'>kTopLeft_GrSurfaceOrigin</a></td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopy_imageColorSpace'><code><strong>imageColorSpace</strong></code></a></td>
- <td>range of colors; may be nullptr</td>
- </tr>
-</table>
-
-### Return Value
-
-created <a href='SkImage_Reference#SkImage'>SkImage</a>, or nullptr
+To be deprecated.
### See Also
@@ -1128,42 +1190,7 @@
<a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkColorSpace'>SkColorSpace</a>> imageColorSpace = nullptr) ;
</pre>
-Creates <a href='SkImage_Reference#SkImage'>SkImage</a> from copy of <a href='#SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvTextures'>yuvTextures</a>, an array of textures on GPU.
-<a href='#SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvTextures'>yuvTextures</a> contain pixels for <a href='undocumented#YUV_Planes'>YUV planes</a> of <a href='SkImage_Reference#SkImage'>SkImage</a>. Returned <a href='SkImage_Reference#SkImage'>SkImage</a> has the dimensions
-<a href='#SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvTextures'>yuvTextures</a>[0] and stores pixels in <a href='#SkImage_MakeFromYUVTexturesCopyWithExternalBackend_backendTexture'>backendTexture</a>. <a href='#SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvColorSpace'>yuvColorSpace</a> describes how YUV colors
-convert to RGB colors.
-
-### Parameters
-
-<table> <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_context'><code><strong>context</strong></code></a></td>
- <td><a href='undocumented#GPU_Context'>GPU context</a></td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvColorSpace'><code><strong>yuvColorSpace</strong></code></a></td>
- <td>one of: <a href='SkImageInfo_Reference#kJPEG_SkYUVColorSpace'>kJPEG_SkYUVColorSpace</a>, <a href='SkImageInfo_Reference#kRec601_SkYUVColorSpace'>kRec601_SkYUVColorSpace</a>,</td>
- </tr>
-</table>
-
-<a href='SkImageInfo_Reference#kRec709_SkYUVColorSpace'>kRec709_SkYUVColorSpace</a>
-
-### Parameters
-
-<table> <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_yuvTextures'><code><strong>yuvTextures</strong></code></a></td>
- <td>array of YUV textures on GPU</td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_imageOrigin'><code><strong>imageOrigin</strong></code></a></td>
- <td>one of: <a href='undocumented#kBottomLeft_GrSurfaceOrigin'>kBottomLeft_GrSurfaceOrigin</a>, <a href='undocumented#kTopLeft_GrSurfaceOrigin'>kTopLeft_GrSurfaceOrigin</a></td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_backendTexture'><code><strong>backendTexture</strong></code></a></td>
- <td>the resource that stores the final pixels</td>
- </tr>
- <tr> <td><a name='SkImage_MakeFromYUVTexturesCopyWithExternalBackend_imageColorSpace'><code><strong>imageColorSpace</strong></code></a></td>
- <td>range of colors; may be nullptr</td>
- </tr>
-</table>
-
-### Return Value
-
-created <a href='SkImage_Reference#SkImage'>SkImage</a>, or nullptr
+To be deprecated.
### See Also
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 05a48ea..61eb909 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -181,12 +181,7 @@
<a href='SkPath_Reference#SkPath'>SkPath</a>* <a href='SkPath_Reference#Path'>path</a>) const;
void <a href='#SkPaint_getPosTextPath'>getPosTextPath</a>(const void* <a href='undocumented#Text'>text</a>, size_t length,
const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[], <a href='SkPath_Reference#SkPath'>SkPath</a>* <a href='SkPath_Reference#Path'>path</a>) const;
- 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,
- const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
- 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[],
- const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
- 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, const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
+public:
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],
<a href='undocumented#SkScalar'>SkScalar</a>* intervals) const;
<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkPaint_getFontBounds'>getFontBounds</a>() const;
@@ -4283,10 +4278,8 @@
number of intersections; may be zero
-### Example
-
-<div><fiddle-embed name="2a0b80ed20d193c688085b79deb5bdc9"><div>Underline uses intercepts to draw on either side of the <a href='undocumented#Glyph'>glyph</a> Descender.
-</div></fiddle-embed></div>
+<div>Underline uses intercepts to draw on either side of the <a href='undocumented#Glyph'>glyph</a> Descender.
+</div>
<a name='SkPaint_getPosTextIntercepts'></a>
@@ -4332,10 +4325,8 @@
number of intersections; may be zero
-### Example
-
-<div><fiddle-embed name="5b5754fdb90b44c245d72567854eca04"><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.
-</div></fiddle-embed></div>
+<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.
+</div>
<a name='SkPaint_getPosTextHIntercepts'></a>
@@ -4384,10 +4375,8 @@
number of intersections; may be zero
-### Example
-
-<div><fiddle-embed name="dc9851c43acc3716aca8c9a4d40d452d"><div><a href='undocumented#Text'>Text</a> intercepts do not take stroke thickness into consideration.
-</div></fiddle-embed></div>
+<div><a href='undocumented#Text'>Text</a> intercepts do not take stroke thickness into consideration.
+</div>
<a name='SkPaint_getTextBlobIntercepts'></a>
diff --git a/site/user/api/SkSurface_Reference.md b/site/user/api/SkSurface_Reference.md
index 8870379..6fa2060 100644
--- a/site/user/api/SkSurface_Reference.md
+++ b/site/user/api/SkSurface_Reference.md
@@ -83,6 +83,7 @@
<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>* <a href='#SkSurface_getCanvas'>getCanvas</a>();
<a href='undocumented#sk_sp'>sk_sp</a><<a href='SkSurface_Reference#SkSurface'>SkSurface</a>> <a href='#SkSurface_makeSurface'>makeSurface</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& imageInfo);
<a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkSurface_makeImageSnapshot'>makeImageSnapshot</a>();
+ <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkSurface_makeImageSnapshot'>makeImageSnapshot</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& bounds);
void draw(<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>* <a href='SkCanvas_Reference#Canvas'>canvas</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
bool <a href='#SkSurface_peekPixels'>peekPixels</a>(<a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>* <a href='SkPixmap_Reference#Pixmap'>pixmap</a>);
bool <a href='#SkSurface_readPixels'>readPixels</a>(const <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>& dst, int srcX, int srcY);
@@ -1299,6 +1300,30 @@
<a href='#SkSurface_draw'>draw</a> <a href='#SkSurface_getCanvas'>getCanvas</a>
+<a name='SkSurface_makeImageSnapshot_2'></a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>> <a href='#SkSurface_makeImageSnapshot'>makeImageSnapshot</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& bounds)
+</pre>
+
+Like the no-parameter version, this returns an <a href='SkImage_Reference#Image'>image</a> of the current <a href='SkSurface_Reference#Surface'>surface</a> contents.
+This variant takes a rectangle specifying the subset of the <a href='SkSurface_Reference#Surface'>surface</a> that is of interest.
+These bounds will be sanitized before being used.
+- If bounds extends beyond the <a href='SkSurface_Reference#Surface'>surface</a>, it will be trimmed to just the intersection of
+it and the <a href='SkSurface_Reference#Surface'>surface</a>.
+- If bounds does not intersect the <a href='SkSurface_Reference#Surface'>surface</a>, then this returns nullptr.
+- If bounds == the <a href='SkSurface_Reference#Surface'>surface</a>, then this is the same as calling the no-parameter variant.
+
+### Example
+
+<div><fiddle-embed name="b18b8ab693b09eb70a1d22ab63790cc7"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkSurface_draw'>draw</a> <a href='#SkSurface_getCanvas'>getCanvas</a>
+
<a name='Pixels'></a>
<a name='SkSurface_draw'></a>
diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm
index c6fe099..09ad08a 100644
--- a/site/user/api/catalog.htm
+++ b/site/user/api/catalog.htm
@@ -7107,22 +7107,6 @@
"file": "SkPaint_Reference",
"name": "SkPaint::getFontMetrics"
},
- "SkPaint_getPosTextHIntercepts": {
- "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(120);\n paint.setStyle(SkPaint::kStroke_Style);\n paint.setStrokeWidth(4);\n SkScalar textPosH[] = { 20, 80, 140 };\n SkScalar y = 100;\n SkScalar bounds[] = { 56, 78 };\n const char str[] = \"\\\\-/\";\n int len = sizeof(str) - 1;\n int count = paint.getPosTextHIntercepts(str, len, textPosH, y, bounds, nullptr);\n std::vector<SkScalar> intervals;\n intervals.resize(count);\n (void) paint.getPosTextHIntercepts(str, len, textPosH, y, bounds, &intervals.front());\n canvas->drawPosTextH(str, len, textPosH, y, paint);\n paint.setColor(0xFFFF7777);\n paint.setStyle(SkPaint::kFill_Style);\n SkScalar x = textPosH[0];\n for (int i = 0; i < count; i+= 2) {\n canvas->drawRect({x, bounds[0], intervals[i], bounds[1]}, paint);\n x = intervals[i + 1];\n }\n canvas->drawRect({intervals[count - 1], bounds[0], 180, bounds[1]}, paint);\n}\n",
- "width": 256,
- "height": 128,
- "hash": "dc9851c43acc3716aca8c9a4d40d452d",
- "file": "SkPaint_Reference",
- "name": "SkPaint::getPosTextHIntercepts"
-},
- "SkPaint_getPosTextIntercepts": {
- "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(120);\n SkPoint textPos[] = {{ 60, 90 }, { 120, 90 }};\n SkScalar bounds[] = { 40, 70 };\n const char str[] = \"A+\";\n int len = sizeof(str) - 1;\n int count = paint.getPosTextIntercepts(str, len, textPos, bounds, nullptr);\n std::vector<SkScalar> intervals;\n intervals.resize(count);\n (void) paint.getPosTextIntercepts(str, len, textPos, bounds, &intervals.front());\n canvas->drawPosText(str, len, textPos, paint);\n paint.setColor(SK_ColorRED);\n SkScalar x = textPos[0].fX;\n for (int i = 0; i < count; i+= 2) {\n canvas->drawRect({x, bounds[0], intervals[i], bounds[1]}, paint);\n x = intervals[i + 1];\n }\n if (count) {\n canvas->drawRect({intervals[count - 1], bounds[0], 180, bounds[1]}, paint);\n }\n}\n",
- "width": 256,
- "height": 256,
- "hash": "5b5754fdb90b44c245d72567854eca04",
- "file": "SkPaint_Reference",
- "name": "SkPaint::getPosTextIntercepts"
-},
"SkPaint_getPosTextPath": {
"code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(80);\n SkPath path, path2;\n SkPoint pos[] = {{20, 60}, {30, 70}, {40, 80}};\n paint.getPosTextPath(\"ABC\", 3, pos, &path);\n Simplify(path, &path);\n paint.setStyle(SkPaint::kStroke_Style);\n canvas->drawPath(path, paint);\n}\n",
"width": 256,
@@ -7139,14 +7123,6 @@
"file": "SkPaint_Reference",
"name": "SkPaint::getTextBlobIntercepts"
},
- "SkPaint_getTextIntercepts": {
- "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(120);\n SkPoint textOrigin = { 20, 100 };\n SkScalar bounds[] = { 100, 108 };\n int count = paint.getTextIntercepts(\"y\", 1, textOrigin.fX, textOrigin.fY, bounds, nullptr);\n std::vector<SkScalar> intervals;\n intervals.resize(count);\n (void) paint.getTextIntercepts(\"y\", 1, textOrigin.fX, textOrigin.fY, bounds,\n &intervals.front());\n canvas->drawString(\"y\", textOrigin.fX, textOrigin.fY, paint);\n paint.setColor(SK_ColorRED);\n SkScalar x = textOrigin.fX;\n for (int i = 0; i < count; i += 2) {\n canvas->drawRect({x, bounds[0], intervals[i], bounds[1]}, paint);\n x = intervals[i + 1];\n }\n canvas->drawRect({intervals[count - 1], bounds[0],\n textOrigin.fX + paint.measureText(\"y\", 1), bounds[1]}, paint);\n}\n",
- "width": 256,
- "height": 128,
- "hash": "2a0b80ed20d193c688085b79deb5bdc9",
- "file": "SkPaint_Reference",
- "name": "SkPaint::getTextIntercepts"
-},
"SkPaint_getTextPath": {
"code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(80);\n SkPath path, path2;\n paint.getTextPath(\"ABC\", 3, 20, 80, &path);\n path.offset(20, 20, &path2);\n Op(path, path2, SkPathOp::kDifference_SkPathOp, &path);\n path.addPath(path2);\n paint.setStyle(SkPaint::kStroke_Style);\n canvas->drawPath(path, paint);\n}\n",
"width": 256,
@@ -8947,6 +8923,14 @@
"file": "SkSurface_Reference",
"name": "SkSurface::makeImageSnapshot"
},
+ "SkSurface_makeImageSnapshot_2": {
+ "code": "void draw(SkCanvas* canvas) {\n sk_sp<SkSurface> big(SkSurface::MakeRasterN32Premul(64, 64));\n sk_sp<SkSurface> lil(big->makeSurface(SkImageInfo::MakeN32(32, 32, kPremul_SkAlphaType)));\n big->getCanvas()->clear(SK_ColorRED);\n lil->getCanvas()->clear(SK_ColorBLACK);\n sk_sp<SkImage> early(big->makeImageSnapshot());\n lil->draw(big->getCanvas(), 16, 16, nullptr);\n sk_sp<SkImage> later(big->makeImageSnapshot({0, 0, 16, 16}));\n canvas->drawImage(early, 0, 0);\n canvas->drawImage(later, 0, 0);\n}",
+ "width": 256,
+ "height": 64,
+ "hash": "b18b8ab693b09eb70a1d22ab63790cc7",
+ "file": "SkSurface_Reference",
+ "name": "SkSurface::makeImageSnapshot_2"
+},
"SkSurface_makeSurface": {
"code": "void draw(SkCanvas* canvas) {\n sk_sp<SkSurface> big(SkSurface::MakeRasterN32Premul(64, 64));\n sk_sp<SkSurface> lil(big->makeSurface(SkImageInfo::MakeN32(32, 32, kPremul_SkAlphaType)));\n big->getCanvas()->clear(SK_ColorRED);\n lil->getCanvas()->clear(SK_ColorBLACK);\n SkPixmap pixmap;\n if (big->peekPixels(&pixmap)) {\n SkBitmap bigBits;\n bigBits.installPixels(pixmap);\n canvas->drawBitmap(bigBits, 0, 0);\n }\n if (lil->peekPixels(&pixmap)) {\n SkBitmap lilBits;\n lilBits.installPixels(pixmap);\n canvas->drawBitmap(lilBits, 64, 64);\n }\n}",
"width": 256,