diff options
author | 2017-08-03 17:14:08 -0400 | |
---|---|---|
committer | 2017-08-03 21:36:08 +0000 | |
commit | bad5ad7d601b217396ed17ba914172323d62cfe5 (patch) | |
tree | 6bb5437585bb79fb9ec182ae606b77f7c5de0c4d /site/user | |
parent | 161f9a6dc65ff04bb63ef29815b8af881963571b (diff) |
canvas include checkpoint
All fixes to bookmaker to allow creating SkCanvas.h
Docs-Preview: https://skia.org/?cl=29022
TBR=caryclark@google.com
Bug: skia: 6898
Change-Id: If10638fbc77cfe680f21868c97f9c0643b87ebf9
Reviewed-on: https://skia-review.googlesource.com/29022
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'site/user')
-rw-r--r-- | site/user/api/SkCanvas_Reference.md | 2074 | ||||
-rw-r--r-- | site/user/api/SkPaint_Reference.md | 75 | ||||
-rw-r--r-- | site/user/api/SkPath_Reference.md | 10 | ||||
-rw-r--r-- | site/user/api/undocumented.md | 14 | ||||
-rw-r--r-- | site/user/api/usingBookmaker.md | 46 |
5 files changed, 1266 insertions, 953 deletions
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md index f6976b2750..a907bd8a10 100644 --- a/site/user/api/SkCanvas_Reference.md +++ b/site/user/api/SkCanvas_Reference.md @@ -6,23 +6,22 @@ SkCanvas Reference <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> contains a stack of <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> values. <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> together provide the state to draw into <a href="bmh_undocumented?cl=9919#Surface">Surface</a> or <a href="bmh_undocumented?cl=9919#Device">Device</a>. -Each <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> draw call transforms the geometry of the object by the concatenation of all <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -values in the stack. -The transformed geometry is clipped by the intersection of all of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> values in the stack. -The <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> draw calls take <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> parameter for drawing state. -Create <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to supply the drawing state, such as <a href="bmh_undocumented?cl=9919#Color">Color</a>, -<a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a> and so on. - -To draw to a pixel-based destination, create <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> or <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>. -Request <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> from <a href="bmh_undocumented?cl=9919#Surface">Surface</a> to obtain the interface to draw. -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> generated by <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> draws to memory visible to the <a href="bmh_undocumented?cl=9919#CPU">CPU</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> generated by <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a> uses <a href="bmh_undocumented?cl=9919#Vulkan">Vulkan</a> or <a href="bmh_undocumented?cl=9919#OpenGL">OpenGL</a> to draw to the <a href="bmh_undocumented?cl=9919#GPU">GPU</a>. +Each <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> draw call transforms the geometry of the object by the concatenation of all +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> values in the stack. The transformed geometry is clipped by the intersection +of all of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> values in the stack. The <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> draw calls use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to supply drawing +state such as <a href="bmh_undocumented?cl=9919#Color">Color</a>, <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, text size, stroke width, <a href="bmh_undocumented?cl=9919#Shader">Shader</a> and so on. -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> can be constructed to draw to <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> without first creating <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>. -This approach may be deprecated in the future. +To draw to a pixel-based destination, create <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> or <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>. +Request <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> from <a href="bmh_undocumented?cl=9919#Surface">Surface</a> to obtain the interface to draw. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> generated by <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> draws to memory visible to the <a href="bmh_undocumented?cl=9919#CPU">CPU</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> generated by <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a> uses <a href="bmh_undocumented?cl=9919#Vulkan">Vulkan</a> or <a href="bmh_undocumented?cl=9919#OpenGL">OpenGL</a> to draw to the <a href="bmh_undocumented?cl=9919#GPU">GPU</a>. To draw to a document, obtain <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> from <a href="bmh_undocumented?cl=9919#Canvas">SVG Canvas</a>, <a href="bmh_undocumented?cl=9919#PDF">Document PDF</a>, or <a href="bmh_undocumented?cl=9919#Recorder">Picture Recorder</a>. -Document-based <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> and other <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> subclasses reference <a href="bmh_undocumented?cl=9919#Device">Device</a> describing the destination. +Document-based <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> and other <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> subclasses reference <a href="bmh_undocumented?cl=9919#Device">Device</a> describing the +destination. + +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> can be constructed to draw to <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> without first creating <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a>. +This approach may be deprecated in the future. # <a name="SkCanvas"></a> Class SkCanvas @@ -39,7 +38,7 @@ Document-based <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> and ot | --- | --- | | <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_Flags">Lattice::Flags</a> | Controls <a href="bmh_SkCanvas_Reference?cl=9919#Lattice">Lattice</a> transparency. | | <a href="bmh_SkCanvas_Reference?cl=9919#PointMode">PointMode</a> | Sets <a href="bmh_SkCanvas_Reference?cl=9919#drawPoints">drawPoints</a> options. | -| <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerFlags">SaveLayerFlags</a> | Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec">SaveLayerRec</a> options. | +| <a href="bmh_undocumented?cl=9919#SaveLayerFlags">SaveLayerFlags</a> | Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec">SaveLayerRec</a> options. | | <a href="bmh_SkCanvas_Reference?cl=9919#SrcRectConstraint">SrcRectConstraint</a> | Sets <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">drawImageRect</a> options. | ## <a name="Structs"></a> Structs @@ -52,7 +51,7 @@ Document-based <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> and ot ## <a name="Constructors"></a> Constructors Create the desired type of <a href="bmh_undocumented?cl=9919#Surface">Surface</a> to obtain its <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> when possible. <a href="bmh_SkCanvas_Reference?cl=9919#Overview_Constructors">Constructors</a> are useful -when no <a href="bmh_undocumented?cl=9919#Surface">Surface</a> is required, and some helpers implicitly create <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>. +when no <a href="bmh_undocumented?cl=9919#Surface">Surface</a> is required, and some helpers implicitly create <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a>. | | description | | --- | --- | @@ -118,7 +117,7 @@ when no <a href="bmh_undocumented?cl=9919#Surface">Surface</a> is required, and | <a href="bmh_SkCanvas_Reference?cl=9919#getBaseLayerSize">getBaseLayerSize</a> | Gets size of base layer in global coordinates. | | <a href="bmh_SkCanvas_Reference?cl=9919#getDeviceClipBounds">getDeviceClipBounds</a> | Returns <a href="bmh_undocumented?cl=9919#IRect">IRect</a> bounds of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. | | <a href="bmh_SkCanvas_Reference?cl=9919#getDrawFilter">getDrawFilter</a> | Legacy; to be deprecated. | -| <a href="bmh_SkCanvas_Reference?cl=9919#getGrContext">getGrContext</a> | Returns <a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a> of the <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>. | +| <a href="bmh_SkCanvas_Reference?cl=9919#getGrContext">getGrContext</a> | Returns <a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a> of the <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>. | | <a href="bmh_SkCanvas_Reference?cl=9919#getLocalClipBounds">getLocalClipBounds</a> | Returns <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> bounds in source coordinates. | | <a href="bmh_SkCanvas_Reference?cl=9919#getMetaData">getMetaData</a> | Associates additional data with the canvas. | | <a href="bmh_SkCanvas_Reference?cl=9919#getProps">getProps</a> | Copies <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> if available. | @@ -157,30 +156,36 @@ static std::unique_ptr<SkCanvas> MakeRasterDirect(const SkImageInfo& info, void* pixels, size_t rowBytes) </pre> -Allocates raster canvas that will draw directly into <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a>. +Allocates raster <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that will draw directly into <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a>. To access <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> after drawing, call <a href="bmh_SkCanvas_Reference?cl=9919#flush">flush</a> or <a href="bmh_SkCanvas_Reference?cl=9919#peekPixels">peekPixels</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is returned if all parameters are valid. +Valid parameters include: +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> dimensions are zero or positive; +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> contains <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> supported by <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a>; +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> is not nullptr; +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">rowBytes</a> is zero or large enough to contain <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> width <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> of <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. + +pixel buffer size should be <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> height times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">rowBytes</a> times bytes required for +<a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. + ### Parameters <table> <tr> <td><code><strong>info </strong></code></td> <td> -Width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, <a href="bmh_undocumented?cl=9919#Color_Space">Color Space</a>, of <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>. -Width, or height, or both, may be zero.</td> +width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, <a href="bmh_undocumented?cl=9919#Color_Space">Color Space</a>, of <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a>; +width, or height, or both, may be zero</td> </tr> <tr> <td><code><strong>pixels </strong></code></td> <td> -Pointer to destination <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> buffer. Buffer size should be <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> height -times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">rowBytes</a> times bytes required for <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>.</td> +pointer to destination <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> buffer; buffer size should be height +times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">rowBytes</a> times four</td> </tr> <tr> <td><code><strong>rowBytes </strong></code></td> <td> -The interval from one <a href="bmh_undocumented?cl=9919#Surface">Surface</a> row to the next; equal to or greater than -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> width times bytes required for <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>.</td> +interval from one <a href="bmh_undocumented?cl=9919#Surface">Surface</a> row to the next; equal to or greater than +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> width times bytes required for <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a></td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> if all parameters are valid; otherwise, nullptr. -Valid parameters include: <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> dimensions must be zero or positive, and other checks; -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">info</a> must contain <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> supported by <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>; -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> must be not be nullptr; -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">rowBytes</a> must be zero or large enough to contain width <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirect">pixels</a> of <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> if all parameters are valid; otherwise, nullptr ### Example @@ -212,32 +217,40 @@ static std::unique_ptr<SkCanvas> MakeRasterDirectN32(int width, int height, size_t rowBytes) </pre> -Creates <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> with <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> with inline image specification that draws into <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a>. +Allocates raster <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> specified by inline image specification. Subsequent <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> +calls draw into <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a>. <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> is set to <a href="bmh_undocumented?cl=9919#SkColorType">kN32 SkColorType</a>. <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> is set to <a href="bmh_undocumented?cl=9919#SkAlphaType">kPremul SkAlphaType</a>. To access <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> after drawing, call <a href="bmh_SkCanvas_Reference?cl=9919#flush">flush</a> or <a href="bmh_SkCanvas_Reference?cl=9919#peekPixels">peekPixels</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is returned if all parameters are valid. +Valid parameters include: +info dimensions are zero or positive; +info contains <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> supported by <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a>; +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> is not nullptr; +<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">rowBytes</a> is zero or large enough to contain <a href="bmh_SkCanvas_Reference?cl=9919#width">width</a> <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> of <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. + +pixel buffer size should be info <a href="bmh_SkCanvas_Reference?cl=9919#height">height</a> times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">rowBytes</a> times bytes required for +<a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. + ### Parameters <table> <tr> <td><code><strong>width </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> column count on <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> created. Must be zero or greater.</td> +pixel column count on <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> created; must be zero or greater</td> </tr> <tr> <td><code><strong>height </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> row count on <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> created. Must be zero or greater.</td> +pixel row count on <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> created.; must be zero or greater</td> </tr> <tr> <td><code><strong>pixels </strong></code></td> <td> -Pointer to destination <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> buffer. Buffer size should be <a href="bmh_SkCanvas_Reference?cl=9919#height">height</a> -times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">rowBytes</a> times four.</td> +pointer to destination <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> buffer; buffer size should be <a href="bmh_SkCanvas_Reference?cl=9919#height">height</a> +times <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">rowBytes</a> times four</td> </tr> <tr> <td><code><strong>rowBytes </strong></code></td> <td> -The interval from one <a href="bmh_undocumented?cl=9919#Surface">Surface</a> row to the next; equal to or greater than -<a href="bmh_SkCanvas_Reference?cl=9919#width">width</a> times four.</td> +interval from one <a href="bmh_undocumented?cl=9919#Surface">Surface</a> row to the next; equal to or greater than +<a href="bmh_SkCanvas_Reference?cl=9919#width">width</a> times four</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> if all parameters are valid; otherwise, nullptr. -Valid parameters include: <a href="bmh_SkCanvas_Reference?cl=9919#width">width</a> and <a href="bmh_SkCanvas_Reference?cl=9919#height">height</a> must be zero or positive; -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> must be not be nullptr; -<a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">rowBytes</a> must be zero or large enough to contain <a href="bmh_SkCanvas_Reference?cl=9919#width">width</a> <a href="bmh_SkCanvas_Reference?cl=9919#MakeRasterDirectN32">pixels</a> of <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> if all parameters are valid; otherwise, nullptr ### Example @@ -268,7 +281,7 @@ dimensions. ### Return Value -An empty canvas. +empty canvas ### Example @@ -296,20 +309,27 @@ SkCanvas(int width, int height, const SkSurfaceProps* props = NULL) Creates <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> of the specified dimensions without a <a href="bmh_undocumented?cl=9919#Surface">Surface</a>. Used by subclasses with custom implementations for draw methods. +If <a href="bmh_SkCanvas_Reference?cl=9919#int_int_const_SkSurfaceProps_star">props</a> equals nullptr, <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> are created with <a href="bmh_undocumented?cl=9919#Properties_Legacy_Font_Host">Surface Properties Legacy Font Host</a> settings, +which choose the pixel striping direction and order. Since a platform may dynamically +change its direction when the device is rotated, and since a platform may have +multiple monitors with different characteristics, it's best not to rely on this +legacy behavior. + ### Parameters <table> <tr> <td><code><strong>width </strong></code></td> <td> -Zero or greater.</td> +zero or greater</td> </tr> <tr> <td><code><strong>height </strong></code></td> <td> -Zero or greater.</td> +zero or greater</td> </tr> <tr> <td><code><strong>props </strong></code></td> <td> -The <a href="bmh_undocumented?cl=9919#LCD">LCD</a> striping orientation and setting for device independent fonts.</td> +<a href="bmh_undocumented?cl=9919#LCD">LCD</a> striping orientation and setting for device independent fonts; +may be nullptr</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> placeholder with dimensions. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> placeholder with dimensions ### Example @@ -323,6 +343,10 @@ canvas is empty </fiddle-embed></div> +### See Also + +<a href="bmh_undocumented?cl=9919#SkSurfaceProps">SkSurfaceProps</a> <a href="bmh_undocumented?cl=9919#SkPixelGeometry">SkPixelGeometry</a> + --- <a name="copy_constructor"></a> @@ -338,13 +362,13 @@ Used by child classes of <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCan ### Parameters <table> <tr> <td><code><strong>device </strong></code></td> <td> -Specifies a <a href="bmh_SkCanvas_Reference?cl=9919#device">device</a> for the canvas to draw into.</td> +specifies a <a href="bmh_SkCanvas_Reference?cl=9919#device">device</a> for the canvas to draw into</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#device">device</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#device">device</a> ### Example @@ -362,18 +386,22 @@ explicit SkCanvas(const SkBitmap& bitmap) Construct a canvas that draws into <a href="bmh_SkCanvas_Reference?cl=9919#copy_constructor">bitmap</a>. Sets <a href="bmh_undocumented?cl=9919#kLegacyFontHost_InitType">SkSurfaceProps::kLegacyFontHost InitType</a> in constructed <a href="bmh_undocumented?cl=9919#Surface">Surface</a>. +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is copied so that subsequently editing <a href="bmh_SkCanvas_Reference?cl=9919#copy_constructor">bitmap</a> will not affect +constructed <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. + +May be deprecated in the future. + ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -Width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, and pixel storage of <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>. -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is copied so that subsequently editing <a href="bmh_SkCanvas_Reference?cl=9919#copy_constructor">bitmap</a> will not affect -constructed <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> +width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, and pixel +storage of <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a></td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#copy_constructor">bitmap</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#copy_constructor">bitmap</a> ### Example @@ -403,18 +431,40 @@ constructed <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> enum class <a href="bmh_SkCanvas_Reference?cl=9919#ColorBehavior">ColorBehavior</a> { -<a href="bmh_SkCanvas_Reference?cl=9919#kLegacy">kLegacy</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#ColorBehavior_kLegacy">kLegacy</a>, };</pre> ### Constants <table> <tr> - <td><a name="SkCanvas::kLegacy"></a> <code><strong>SkCanvas::kLegacy </strong></code></td><td>0</td><td></td> + <td><a name="SkCanvas::ColorBehavior::kLegacy"></a> <code><strong>SkCanvas::ColorBehavior::kLegacy </strong></code></td><td>0</td><td>Is a placeholder to allow specialized constructor; has no meaning.</td> </tr> </table> +<a name="const_SkBitmap"></a> +## SkCanvas + +<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0"> +SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior) +</pre> + +### Parameters + +<table> <tr> <td><code><strong>bitmap </strong></code></td> <td> +specifies a <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> for the canvas to draw into</td> + </tr> <tr> <td><code><strong>behavior </strong></code></td> <td> +specializes this constructor; value is unused</td> + </tr> +</table> + +### Return Value + +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> + +--- + <a name="const_SkBitmap_const_SkSurfaceProps"></a> ## SkCanvas @@ -425,21 +475,23 @@ SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props) Construct a canvas that draws into <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a>. Use <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">props</a> to match the device characteristics, like <a href="bmh_undocumented?cl=9919#LCD">LCD</a> striping. +<a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a> is copied so that subsequently editing <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a> will not affect +constructed <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. + ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -Width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, and pixel storage of <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a>. -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is copied so that subsequently editing <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a> will not affect -constructed <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> +width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, +and pixel storage of <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a></td> </tr> <tr> <td><code><strong>props </strong></code></td> <td> -The order and orientation of <a href="bmh_undocumented?cl=9919#RGB">RGB</a> striping; and whether to use -device independent fonts.</td> +order and orientation of <a href="bmh_undocumented?cl=9919#RGB">RGB</a> striping; and whether to use +device independent fonts</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> that can be used to draw into <a href="bmh_SkCanvas_Reference?cl=9919#const_SkBitmap_const_SkSurfaceProps">bitmap</a> ### Example @@ -472,12 +524,19 @@ device independent fonts.</td> virtual ~SkCanvas() </pre> -Draws <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">State Stack Layer</a>, if any. +Draw saved layers, if any. Free up resources used by <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. ### Example -<div><fiddle-embed name=""></fiddle-embed></div> +<div><fiddle-embed name="b7bc91ff16c9b9351b2a127f35394b82"><div><a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> offscreen draws into bitmap. <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerAlpha">saveLayerAlpha</a> sets up an additional +drawing surface that blends with the bitmap. When offscreen goes out of +scope, offscreen destructor is called. The saved layer is restored, drawing +transparent letters.</div></fiddle-embed></div> + +### See Also + +<a href="bmh_SkCanvas_Reference?cl=9919#State_Stack">State Stack</a> --- @@ -493,7 +552,7 @@ The storage is freed when <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas ### Return Value -storage that can be read from and written to. +storage that can be read from and written to ### Example @@ -518,16 +577,24 @@ after: (null) SkImageInfo imageInfo() const </pre> -Returns <a href="bmh_undocumented?cl=9919#Info">Image Info</a> for <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is not associated with <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> or -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, returns <a href="bmh_undocumented?cl=9919#empty_constructor">SkImageInfo::SkImageInfo()</a> is returned <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> is set to <a href="bmh_undocumented?cl=9919#SkColorType">kUnknown SkColorType</a>. +Returns <a href="bmh_undocumented?cl=9919#Info">Image Info</a> for <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is not associated with <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> or +<a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, returned <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> is set to <a href="bmh_undocumented?cl=9919#SkColorType">kUnknown SkColorType</a>. ### Return Value -dimensions and <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +dimensions and <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> ### Example -<div><fiddle-embed name="9d2ec54aff38728be1cb44e06a2252ef"></fiddle-embed></div> +<div><fiddle-embed name="d93389d971f8084c4ccc7a66e4e157ee"> + +#### Example Output + +~~~~ +emptyInfo == canvasInfo +~~~~ + +</fiddle-embed></div> --- @@ -538,20 +605,20 @@ dimensions and <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a bool getProps(SkSurfaceProps* props) const </pre> -If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is associated with <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> or -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, copies <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> and returns true. Otherwise, +If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is associated with <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> or +<a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, copies <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> and returns true. Otherwise, return false and leave <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a> unchanged. ### Parameters <table> <tr> <td><code><strong>props </strong></code></td> <td> -Pointer to writable <a href="bmh_undocumented?cl=9919#SkSurfaceProps">SkSurfaceProps</a>.</td> +storage for writable <a href="bmh_undocumented?cl=9919#SkSurfaceProps">SkSurfaceProps</a></td> </tr> </table> ### Return Value -true if <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> was copied. +true if <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> was copied ### Example @@ -576,7 +643,7 @@ void flush() </pre> Triggers the immediate execution of all pending draw operations. -If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is associated with <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, resolve all pending <a href="bmh_undocumented?cl=9919#GPU">GPU</a> operations. +If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is associated with <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, resolves all pending <a href="bmh_undocumented?cl=9919#GPU">GPU</a> operations. ### Example @@ -597,7 +664,7 @@ smaller (due to clipping or <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">s ### Return Value -Integral width and height of base layer. +integral width and height of base layer ### Example @@ -623,20 +690,23 @@ sk_sp<SkSurface> makeSurface(const SkImageInfo& info, </pre> Creates <a href="bmh_undocumented?cl=9919#Surface">Surface</a> matching <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a> and <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a>, and associates it with <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is already associated with <a href="bmh_undocumented?cl=9919#Surface">Surface</a>, it cannot create a new <a href="bmh_undocumented?cl=9919#Surface">Surface</a>. +Returns nullptr if no match found. + +If <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a> is nullptr, matches <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> in <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a> is nullptr and <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> +does not have <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a>, creates <a href="bmh_undocumented?cl=9919#Surface">Surface</a> with default <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a>. ### Parameters <table> <tr> <td><code><strong>info </strong></code></td> <td> -Initialize <a href="bmh_undocumented?cl=9919#Surface">Surface</a> with width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, and <a href="bmh_undocumented?cl=9919#Color_Space">Color Space</a>.</td> +width, height, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>, and <a href="bmh_undocumented?cl=9919#Color_Space">Color Space</a></td> </tr> <tr> <td><code><strong>props </strong></code></td> <td> -Use to match if provided, or use the <a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> in <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> otherwise.</td> +<a href="bmh_undocumented?cl=9919#Properties">Surface Properties</a> to match; may be nullptr to match <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a></td> </tr> </table> ### Return Value -<a href="bmh_undocumented?cl=9919#Surface">Surface</a> matching <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a> and <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a>, or nullptr if no match is available. +<a href="bmh_undocumented?cl=9919#Surface">Surface</a> matching <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a> and <a href="bmh_SkCanvas_Reference?cl=9919#props">props</a>, or nullptr if no match is available ### Example @@ -660,11 +730,11 @@ size = 3, 4 virtual GrContext* getGrContext() </pre> -Returns <a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a> of the <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a> associated with <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +Returns <a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a> of the <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a> associated with <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. ### Return Value -<a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a>, if available; nullptr otherwise. +<a href="bmh_undocumented?cl=9919#GPU_Context">GPU Context</a>, if available; nullptr otherwise ### Example @@ -680,28 +750,28 @@ void* accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin = NULL) </pre> -Returns the pixel base address, <a href="bmh_undocumented?cl=9919#Info">Image Info</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#origin">origin</a> if the pixels -can be read directly. -The returned address is only valid +Returns the pixel base address, <a href="bmh_undocumented?cl=9919#Info">Image Info</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#accessTopLayerPixels">origin</a> if the pixels +can be read directly. The returned address is only valid while <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is in scope and unchanged. Any <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> call or <a href="bmh_undocumented?cl=9919#Surface">Surface</a> call may invalidate the returned address and other returned values. -If pixels are inaccessible, <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#origin">origin</a> are unchanged. +If pixels are inaccessible, <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#accessTopLayerPixels">origin</a> are unchanged. ### Parameters <table> <tr> <td><code><strong>info </strong></code></td> <td> -If not nullptr, copies writable pixels' <a href="bmh_undocumented?cl=9919#Info">Image Info</a>.</td> +storage for writable pixels' <a href="bmh_undocumented?cl=9919#Info">Image Info</a>; may be nullptr</td> </tr> <tr> <td><code><strong>rowBytes </strong></code></td> <td> -If not nullptr, copies writable pixels' row bytes.</td> +storage for writable pixels' row bytes; may be nullptr</td> </tr> <tr> <td><code><strong>origin </strong></code></td> <td> -If not nullptr, copies <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> top layer <a href="bmh_SkCanvas_Reference?cl=9919#origin">origin</a>, its top left corner.</td> +storage for <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> top layer <a href="bmh_SkCanvas_Reference?cl=9919#accessTopLayerPixels">origin</a>, its top left corner; +may be nullptr</td> </tr> </table> ### Return Value -Address of pixels, or nullptr if inaccessible. +Address of pixels, or nullptr if inaccessible ### Example @@ -728,13 +798,13 @@ SkRasterHandleAllocator::Handle accessTopRasterHandle() const Returns custom context that tracks the <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. Use <a href="bmh_undocumented?cl=9919#Raster_Handle_Allocator">Raster Handle Allocator</a> to blend <a href="bmh_undocumented?cl=9919#Skia">Skia</a> drawing with custom drawing, typically performed -by the host platform's user interface. This accessor returns the custom context created -when <a href="bmh_undocumented?cl=9919#MakeCanvas">SkRasterHandleAllocator::MakeCanvas</a> creates a custom canvas with raster storage for +by the host platform's user interface. This accessor returns the custom context generated by +<a href="bmh_undocumented?cl=9919#MakeCanvas">SkRasterHandleAllocator::MakeCanvas</a>, which creates a custom canvas with raster storage for the drawing destination. ### Return Value -Context of custom allocator. +context of custom allocator ### Example @@ -763,23 +833,25 @@ bool peekPixels(SkPixmap* pixmap) Returns true if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> has direct access to its pixels. -Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, -or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. +Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> +is returned from <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by +<a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class +like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#pixmap">pixmap</a> pixel address is only valid while <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is in scope and unchanged. Any <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> or <a href="bmh_undocumented?cl=9919#Surface">Surface</a> call may -invalidate the <a href="bmh_SkCanvas_Reference?cl=9919#pixmap">pixmap</a> values. +<a href="bmh_SkCanvas_Reference?cl=9919#peekPixels">pixmap</a> pixel address is only valid while <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> is in scope and unchanged. Any +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> or <a href="bmh_undocumented?cl=9919#Surface">Surface</a> call may invalidate the <a href="bmh_SkCanvas_Reference?cl=9919#peekPixels">pixmap</a> values. ### Parameters <table> <tr> <td><code><strong>pixmap </strong></code></td> <td> -storage for <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel state if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are readable; otherwise, ignored.</td> +storage for <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel state if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are readable; +otherwise, ignored</td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> has direct access to pixels. +true if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> has direct access to pixels ### Example @@ -803,14 +875,15 @@ bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY) </pre> -Copies rectangle of pixels from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a>, converting their <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. -Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, +Copies rectangle of pixels from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a>, converting their +<a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is +raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, +returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> does not match <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>. -Only pixels within the rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are copied. -<a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a> outside the rectangle intersection are unchanged. +<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> +does not match <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>. Only pixels within the rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> +pixels are copied. <a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a> outside the rectangle intersection are unchanged. | source rectangle | value | | --- | --- | @@ -838,25 +911,25 @@ Does not copy, and returns false if: ### Parameters <table> <tr> <td><code><strong>dstInfo </strong></code></td> <td> -Dimensions, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a>.</td> +dimensions, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#dstPixels">dstPixels</a></td> </tr> <tr> <td><code><strong>dstPixels </strong></code></td> <td> -Storage for pixels, of size <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>.height() times <a href="bmh_SkCanvas_Reference?cl=9919#dstRowBytes">dstRowBytes</a>.</td> +storage for pixels, of size <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>.height() times <a href="bmh_SkCanvas_Reference?cl=9919#dstRowBytes">dstRowBytes</a></td> </tr> <tr> <td><code><strong>dstRowBytes </strong></code></td> <td> -Size of one destination row, <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>.width() times pixel size.</td> +size of one destination row, <a href="bmh_SkCanvas_Reference?cl=9919#dstInfo">dstInfo</a>.width() times pixel size</td> </tr> <tr> <td><code><strong>srcX </strong></code></td> <td> -Offset into readable pixels in x.</td> +offset into readable pixels in x</td> </tr> <tr> <td><code><strong>srcY </strong></code></td> <td> -Offset into readable pixels in y.</td> +offset into readable pixels in y</td> </tr> </table> ### Return Value -true if pixels were copied. +true if pixels were copied ### Example -<div><fiddle-embed name="481e990e923a0ed34654f4361b94f096"><div><a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> returned by <a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> has premultiplied pixel values. +<div><fiddle-embed name="481e990e923a0ed34654f4361b94f096"><div><a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> returned by <a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> has premultiplied pixel values. <a href="bmh_SkCanvas_Reference?cl=9919#clear">clear</a> takes unpremultiplied input with <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a> equal 0x80 and <a href="bmh_undocumented?cl=9919#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="bmh_undocumented?cl=9919#RGB">Color RGB</a> is multipled by <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a> to generate premultipled value 0x802B5580. <a href="bmh_SkCanvas_Reference?cl=9919#readPixels">readPixels</a> converts pixel back @@ -877,14 +950,16 @@ pixel = 8056a9ff bool readPixels(const SkPixmap& pixmap, int srcX, int srcY) </pre> -Copies rectangle of pixels from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a>, converting their <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. -Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, +Copies rectangle of pixels from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a>, converting their +<a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. +Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, returned by +<a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> does not match bitmap <a href="bmh_undocumented?cl=9919#Info">Image Info</a>. -Only <a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a> pixels within the rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are copied. -<a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a> pixels outside the rectangle intersection are unchanged. +<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> +does not match bitmap <a href="bmh_undocumented?cl=9919#Info">Image Info</a>. Only <a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a> pixels within the rectangle that +intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are copied. <a href="bmh_undocumented?cl=9919#Pixmap">Pixmap</a> pixels outside the rectangle +intersection are unchanged. | source rectangle | value | | --- | --- | @@ -913,17 +988,17 @@ Does not copy, and returns false if: ### Parameters <table> <tr> <td><code><strong>pixmap </strong></code></td> <td> -Receives pixels copied from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> +storage for pixels copied from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a></td> </tr> <tr> <td><code><strong>srcX </strong></code></td> <td> -Offset into readable pixels in x.</td> +offset into readable pixels in x</td> </tr> <tr> <td><code><strong>srcY </strong></code></td> <td> -Offset into readable pixels in y.</td> +offset into readable pixels in y</td> </tr> </table> ### Return Value -true if pixels were copied. +true if pixels were copied ### Example @@ -943,15 +1018,17 @@ pixel = 802b5580 bool readPixels(const SkBitmap& bitmap, int srcX, int srcY) </pre> -Copies pixels enclosed by <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> offset to (x, y) from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, converting their <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. -Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is returned from -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by <a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, -or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. -Allocates pixel storage in <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> if needed. +Copies pixels enclosed by <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> offset to (x, y) from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> into <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, +converting their <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. +Pixels are readable when <a href="bmh_undocumented?cl=9919#Device">Device</a> is raster. Pixels are not readable when <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> +is returned from <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>, returned by <a href="bmh_undocumented?cl=9919#beginPage">SkDocument::beginPage</a>, returned by +<a href="bmh_undocumented?cl=9919#beginRecording">SkPictureRecorder::beginRecording</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#SkCanvas">SkCanvas</a> is the base of a utility class +like <a href="bmh_undocumented?cl=9919#SkDumpCanvas">SkDumpCanvas</a>. Allocates pixel storage in <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> if needed. -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> does not match <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> <a href="bmh_undocumented?cl=9919#Info">Image Info</a>. -Only pixels within the rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are copied. -Bitamp pixels outside the rectangle intersection are unchanged. +<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> +does not match <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> <a href="bmh_undocumented?cl=9919#Info">Image Info</a>. Only pixels within the rectangle that intersect +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels are copied. Bitamp pixels outside the rectangle intersection are +unchanged. | canvas pixel bounds | value | | --- | --- | @@ -973,17 +1050,17 @@ Does not copy, and returns false if: ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -Receives pixels copied from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> +storage for pixels copied from <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a></td> </tr> <tr> <td><code><strong>srcX </strong></code></td> <td> -Offset into readable pixels in x.</td> +offset into readable pixels in x</td> </tr> <tr> <td><code><strong>srcY </strong></code></td> <td> -Offset into readable pixels in y.</td> +offset into readable pixels in y</td> </tr> </table> ### Return Value -true if pixels were copied. +true if pixels were copied ### Example @@ -1010,9 +1087,10 @@ bool writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes, Copies to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a>, ignoring the <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, converting to match <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a> <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> does not match <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>. -Only <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> within the source rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel bounds are copied. -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> outside the rectangle intersection are unchanged. +<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> +does not match <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>. Only <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> within the source rectangle that intersect +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel bounds are copied. <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> outside the rectangle intersection +are unchanged. | source rectangle | value | | --- | --- | @@ -1040,21 +1118,21 @@ Does not copy, and returns false if: ### Parameters <table> <tr> <td><code><strong>info </strong></code></td> <td> -Dimensions, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a>.</td> +dimensions, <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a>, and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> of <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a></td> </tr> <tr> <td><code><strong>pixels </strong></code></td> <td> -Pixels to copy, of size <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>.height() times <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> to copy, of size <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>.height() times <a href="bmh_SkCanvas_Reference?cl=9919#rowBytes">rowBytes</a></td> </tr> <tr> <td><code><strong>rowBytes </strong></code></td> <td> -Offset from one row to the next, usually <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>.width() times pixel size.</td> +offset from one row to the next, usually <a href="bmh_SkCanvas_Reference?cl=9919#info">info</a>.width() times pixel size</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a></td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a></td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> were written to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +true if <a href="bmh_SkCanvas_Reference?cl=9919#pixels">pixels</a> were written to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> ### Example @@ -1069,9 +1147,10 @@ bool writePixels(const SkBitmap& bitmap, int x, int y) Writes to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels, ignoring the <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, converting to match <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a>. -<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> does not match <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>. -Only pixels within the source rectangle that intersect <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel bounds are copied. -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels outside the rectangle intersection are unchanged. +<a href="bmh_undocumented?cl=9919#Pixel">Pixel</a> values are converted only if <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Color_Type">Image Color Type</a> and <a href="bmh_undocumented?cl=9919#Alpha_Type">Image Alpha Type</a> +does not match <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>. Only pixels within the source rectangle that intersect +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixel bounds are copied. <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> pixels outside the rectangle intersection +are unchanged. | source rectangle | value | | --- | --- | @@ -1100,17 +1179,17 @@ Does not copy, and returns false if: ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -Provides pixels copied to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</td> +contains pixels copied to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a></td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a></td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a></td> </tr> </table> ### Return Value -true if pixels were written to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +true if pixels were written to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> ### Example @@ -1120,9 +1199,9 @@ true if pixels were written to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">C # <a name="State_Stack"></a> State Stack <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> maintains a stack of state that allows hierarchical drawing, commonly used -to implement windows and views. The initial state has an identity matrix and and an infinite clip. -Even with a wide-open clip, drawing is constrained by the bounds of the -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Surface">Surface</a> or <a href="bmh_undocumented?cl=9919#Device">Device</a>. +to implement windows and views. The initial state has an identity matrix and and +an infinite clip. Even with a wide-open clip, drawing is constrained by the +bounds of the <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> <a href="bmh_undocumented?cl=9919#Surface">Surface</a> or <a href="bmh_undocumented?cl=9919#Device">Device</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> savable state consists of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> describes the area that may be drawn to. @@ -1132,20 +1211,7 @@ Even with a wide-open clip, drawing is constrained by the bounds of the <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a>, <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a>, <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerAlpha">saveLayerAlpha</a> save state and return the depth of the stack. -<a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> and <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> revert state to its value when saved. - -Each state on the stack intersects <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with the previous <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, -and concatenates <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with the previous <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -The intersected <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> makes the drawing area the same or smaller; -the concatenated <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may move the origin and potentially scale or rotate -the coordinate space. - -<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> does not require balancing the state stack but it is a good idea -to do so. Calling <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> without <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> will eventually cause <a href="bmh_undocumented?cl=9919#Skia">Skia</a> to fail; -mismatched <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> and <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> create hard to find bugs. - -It is not possible to use state to draw outside of the clip defined by the -previous state. +<a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>, <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a>, and ### Example @@ -1174,17 +1240,17 @@ Saves <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_S Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, restoring the <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, +and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. -Saved <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> state is put on a stack; multiple calls to <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> should be balance by an equal number of -calls to <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. +Saved <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> state is put on a stack; multiple calls to <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> should be balance +by an equal number of calls to <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. ### Return Value -Depth of saved stack. +depth of saved stack ### Example @@ -1196,15 +1262,15 @@ the red square is not translated, and is drawn at the origin.</div></fiddle-embe ## <a name="Layer"></a> Layer -<a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> allocates a temporary offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> to draw into. When the drawing is complete, -the <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is drawn into the <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> allocates a temporary offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> to draw into. When the drawing is +complete, the <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is drawn into the <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> is saved in a stack along with other saved state. When state with a <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> is restored, the offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> is drawn into the previous layer. <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> may be initialized with the contents of the previous layer. When <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> is -restored, its <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> can be modified by <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> passed to <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> to apply <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, -<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. +restored, its <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> can be modified by <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> passed to <a href="bmh_SkCanvas_Reference?cl=9919#State_Stack_Layer">Layer</a> to apply +<a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. <a name="saveLayer"></a> ## saveLayer @@ -1217,34 +1283,36 @@ Saves <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_S and allocates an offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> for subsequent drawing. Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, and draws the offscreen bitmap. -The <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> are restored to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to a specific rectangle, -use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to +a specific rectangle, use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. -Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> applies <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called. +Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> applies <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called. -Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. +Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with returned value to restore this and subsequent saves. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Used as a hint to limit the size of the offscreen; may be nullptr.</td> +hint to limit the size of the offscreen; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Used when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called to draw the offscreen; may be nullptr.</td> +graphics state for offscreen; may be nullptr</td> </tr> </table> ### Return Value -Depth of saved stack. +depth of saved stack ### Example -<div><fiddle-embed name="05f9b6fa6b5007aea89dfe66c306855d"><div>Rectangles are blurred by <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> draws offscreen to main <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</div></fiddle-embed></div> +<div><fiddle-embed name="05f9b6fa6b5007aea89dfe66c306855d"><div>Rectangles are blurred by <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> draws offscreen to main +<a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>.</div></fiddle-embed></div> --- @@ -1256,30 +1324,31 @@ Saves <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_S and allocates an offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> for subsequent drawing. Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, and draws the offscreen <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a>. -The <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> are restored to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to a specific rectangle, -use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to +a specific rectangle, use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. -Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> applies <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called. +Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> applies <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called. -Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. +Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with returned value to restore this and subsequent saves. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Used as a hint to limit the size of the offscreen; may be nullptr.</td> +hint to limit the size of the offscreen; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Used when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called to draw the offscreen; may be nullptr.</td> +graphics state for offscreen; may be nullptr</td> </tr> </table> ### Return Value -Depth of saved stack. +depth of saved stack ### Example @@ -1300,36 +1369,36 @@ Saves <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_S and allocates an offscreen bitmap for subsequent drawing. <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a> is preserved when the offscreen is drawn to the prior layer. -Draw text on an opaque background so that <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a> blends correctly with the prior layer. - Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, and draws the offscreen bitmap. -The <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> are restored to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. -Draw <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a> on an opaque background to get good results. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to +a specific rectangle, use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to a specific rectangle, -use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. +Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> applies <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called. -<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> modifies how the offscreen overlays the prior layer. <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, -<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, affect the offscreen draw. +Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with returned value to restore this and subsequent saves. -Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. +Draw text on an opaque background so that <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a> blends correctly with the +prior layer. <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a> drawn on a background with transparency may result in +incorrect banding. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Used as a hint to limit the size of the offscreen; may be nullptr.</td> +hint to limit the size of the offscreen; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Used when <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> is called to draw the offscreen; may be nullptr.</td> +graphics state for offscreen; may be nullptr</td> </tr> </table> ### Return Value -Depth of saved stack. +depth of saved stack ### Example @@ -1349,28 +1418,30 @@ and allocates an offscreen bitmap for subsequent drawing. Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, and blends the offscreen bitmap with <a href="bmh_SkCanvas_Reference?cl=9919#alpha">alpha</a> opacity onto the prior layer. -The <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> are restored to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to a specific rectangle, -use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to +a specific rectangle, use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. -Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. +<a href="bmh_SkCanvas_Reference?cl=9919#alpha">alpha</a> of zero is fully transparent, 255 is fully opaque. + +Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with returned value to restore this and subsequent saves. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Used as a hint to limit the size of the offscreen; may be nullptr.</td> +hint to limit the size of the offscreen; may be nullptr</td> </tr> <tr> <td><code><strong>alpha </strong></code></td> <td> -The opacity of the offscreen; zero is fully transparent, 255 is fully opaque.</td> +opacity of the offscreen</td> </tr> </table> ### Return Value -Depth of saved stack. +depth of saved stack ### Example @@ -1378,18 +1449,19 @@ Depth of saved stack. --- -## <a name="SkCanvas::SaveLayerFlags"></a> Enum SkCanvas::SaveLayerFlags +## <a name="SkCanvas::_anonymous"></a> Enum SkCanvas::_anonymous <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> enum { <a href="bmh_SkCanvas_Reference?cl=9919#kIsOpaque_SaveLayerFlag">kIsOpaque SaveLayerFlag</a> = 1 << 0, <a href="bmh_SkCanvas_Reference?cl=9919#kPreserveLCDText_SaveLayerFlag">kPreserveLCDText SaveLayerFlag</a> = 1 << 1, <a href="bmh_SkCanvas_Reference?cl=9919#kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a> = 1 << 2, +<a href="bmh_SkCanvas_Reference?cl=9919#kDontClipToLayer_Legacy_SaveLayerFlag">kDontClipToLayer Legacy SaveLayerFlag</a> = kDontClipToLayer_PrivateSaveLayerFlag, }; -typedef uint32_t <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerFlags">SaveLayerFlags</a>;</pre> +typedef uint32_t <a href="bmh_undocumented?cl=9919#SaveLayerFlags">SaveLayerFlags</a>;</pre> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerFlags">SaveLayerFlags</a> provides options that may be used in any combination in <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec">SaveLayerRec</a>, +<a href="bmh_undocumented?cl=9919#SaveLayerFlags">SaveLayerFlags</a> provides options that may be used in any combination in <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec">SaveLayerRec</a>, defining how the offscreen allocated by <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a> operates. ### Constants @@ -1406,6 +1478,10 @@ defining how the offscreen allocated by <a href="bmh_SkCanvas_Reference?cl=9919# <tr> <td><a name="SkCanvas::kInitWithPrevious_SaveLayerFlag"></a> <code><strong>SkCanvas::kInitWithPrevious_SaveLayerFlag </strong></code></td><td>4</td><td>Initializes offscreen with the contents of the previous layer.</td> </tr> + <tr> + <td><a name="SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag"></a> <code><strong>SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag </strong></code></td><td>0x80000000</td><td>Only present on <a href="bmh_undocumented?cl=9919#Android">Android</a>. +Skips setting a clip to the layer bounds.</td> + </tr> </table> ### Example @@ -1424,7 +1500,7 @@ struct <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLa const <a href="bmh_undocumented?cl=9919#SkRect">SkRect</a>* <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a>; const <a href="bmh_SkPaint_Reference?cl=9919#SkPaint">SkPaint</a>* <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fPaint">fPaint</a>; const <a href="bmh_undocumented?cl=9919#SkImageFilter">SkImageFilter</a>* <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBackdrop">fBackdrop</a>; -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerFlags">SaveLayerFlags</a> <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>; +<a href="bmh_undocumented?cl=9919#SaveLayerFlags">SaveLayerFlags</a> <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>; };</pre> <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> contains the state used to create the layer offscreen. @@ -1432,36 +1508,43 @@ const <a href="bmh_undocumented?cl=9919#SkImageFilter">SkImageFilter</a>* <a <code><strong>const SkRect* fBounds</strong></code> <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a> is used as a hint to limit the size of the offscreen; may be nullptr. -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a> suggests but does not define the offscreen size. To clip drawing to a specific rectangle, -use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a> suggests but does not define the offscreen size. To clip drawing to +a specific rectangle, use <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>. <code><strong>const SkPaint* fPaint</strong></code> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fPaint">fPaint</a> modifies how the offscreen overlays the prior layer; may be nullptr. <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, -<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a> affect the offscreen draw. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fPaint">fPaint</a> modifies how the offscreen overlays the prior layer; may be nullptr. +<a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and +<a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a> affect the offscreen draw. <code><strong>const SkImageFilter* fBackdrop</strong></code> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBackdrop">fBackdrop</a> applies <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> to the prior layer when copying to the layer offscreen; may be nullptr. -Use <a href="bmh_SkCanvas_Reference?cl=9919#kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a> to copy the prior layer without a <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBackdrop">fBackdrop</a> applies <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> to the prior layer when copying to the layer +offscreen; may be nullptr. Use <a href="bmh_SkCanvas_Reference?cl=9919#kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a> to copy the +prior layer without an <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>. <code><strong>const SkImage* fClipMask</strong></code> -may be nullptr. +<a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> clips the layer offscreen by the alpha channel of <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMask">fClipMask</a> when +the offscreen is copied to <a href="bmh_undocumented?cl=9919#Device">Device</a>. <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMask">fClipMask</a> may be nullptr. . <code><strong>const SkMatrix* fClipMatrix</strong></code> -may be nullptr. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMatrix">fClipMatrix</a> transforms <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMask">fClipMask</a> before it clips the layer offscreen. If +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMask">fClipMask</a> describes a translucent gradient, it may be scaled and rotated +without introducing artifacts. <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMatrix">fClipMatrix</a> may be nullptr. <code><strong>SaveLayerFlags fSaveLayerFlags</strong></code> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a> are used to create layer offscreen without transparency, create layer offscreen for -<a href="bmh_undocumented?cl=9919#LCD">LCD</a> text, and to create layer offscreen with the contents of the previous layer. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a> are used to create layer offscreen without transparency, +create layer offscreen for <a href="bmh_undocumented?cl=9919#LCD">LCD</a> text, and to create layer offscreen with the +contents of the previous layer. ### Example -<div><fiddle-embed name="7b18146582fc2440656b839a173ed500"><div><a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> layer captures a red anti-aliased circle and a blue aliased circle scaled up by four. -After drawing another unscaled red circle on top, the offscreen is transferred to the main canvas.</div></fiddle-embed></div> +<div><fiddle-embed name="7b18146582fc2440656b839a173ed500"><div><a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> layer captures a red anti-aliased circle and a blue aliased circle scaled +up by four. After drawing another unscaled red circle on top, the offscreen is +transferred to the main canvas.</div></fiddle-embed></div> <a name="SaveLayerRec"></a> ## SaveLayerRec @@ -1474,7 +1557,7 @@ Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a>, ### Return Value -empty <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a>. +empty <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> ### Example @@ -1500,17 +1583,17 @@ Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a>, ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Offscreen dimensions; may be nullptr.</td> +offscreen dimensions; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Applied to offscreen when overlaying prior layer; may be nullptr.</td> +applied to offscreen when overlaying prior layer; may be nullptr</td> </tr> <tr> <td><code><strong>saveLayerFlags </strong></code></td> <td> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> with empty backdrop. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> with empty backdrop ### Example @@ -1536,19 +1619,21 @@ Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a>, ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Offscreen dimensions; may be nullptr.</td> +offscreen dimensions; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Applied to offscreen when overlaying prior layer; may be nullptr.</td> +applied to offscreen when overlaying prior layer; +may be nullptr</td> </tr> <tr> <td><code><strong>backdrop </strong></code></td> <td> -Copies prior layer to offscreen with <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>; may be nullptr.</td> +prior layer copied to offscreen with <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>; +may be nullptr</td> </tr> <tr> <td><code><strong>saveLayerFlags </strong></code></td> <td> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> fully specified. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> fully specified ### Example @@ -1570,28 +1655,35 @@ SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkMatrix* clipMatrix, SaveLayerFlags saveLayerFlags) </pre> -Not ready for general use. +Not ready for general use.Sets <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBounds">fBounds</a>, <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fPaint">fPaint</a>, <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fBackdrop">fBackdrop</a>, <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMask">fClipMask</a>, <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fClipMatrix">fClipMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec_4">clipMatrix</a> uses alpha channel of image, transformed by <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec_4">clipMatrix</a>, to clip layer +when drawn to <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. + +Implementation is incomplete; has no effect if <a href="bmh_undocumented?cl=9919#Device">Device</a> is <a href="bmh_undocumented?cl=9919#GPU_backed">GPU-backed</a>. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -Offscreen dimensions; may be nullptr.</td> +offscreen dimensions; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Applied to offscreen when overlaying prior layer; may be nullptr.</td> +graphics state applied to offscreen when overlaying prior +layer; may be nullptr</td> </tr> <tr> <td><code><strong>backdrop </strong></code></td> <td> -Copies prior layer to offscreen with <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>; may be nullptr.</td> +prior layer copied to offscreen with <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>; +may be nullptr</td> </tr> <tr> <td><code><strong>clipMask </strong></code></td> <td> -May be nullptr.</td> +clip applied to layer; may be nullptr</td> </tr> <tr> <td><code><strong>clipMatrix </strong></code></td> <td> -May be nullptr.</td> +matrix applied to <a href="bmh_SkCanvas_Reference?cl=9919#clipMask">clipMask</a>; may be nullptr to use +identity matrix</td> </tr> <tr> <td><code><strong>saveLayerFlags </strong></code></td> <td> -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td> </tr> </table> ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> fully specified. +<a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec_SaveLayerRec">SaveLayerRec</a> fully specified --- @@ -1604,25 +1696,25 @@ and allocates an offscreen bitmap for subsequent drawing. Calling <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a> discards changes to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a>, and blends the offscreen bitmap with alpha opacity onto the prior layer. -The <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> are restored to their state when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a> was called. -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#translate">translate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#scale">scale</a>, <a href="bmh_SkCanvas_Reference?cl=9919#rotate">rotate</a>, <a href="bmh_SkCanvas_Reference?cl=9919#skew">skew</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#setMatrix">setMatrix</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#resetMatrix">resetMatrix</a>. <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> may be changed by <a href="bmh_SkCanvas_Reference?cl=9919#clipRect">clipRect</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRRect">clipRRect</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#clipPath">clipPath</a>, <a href="bmh_SkCanvas_Reference?cl=9919#clipRegion">clipRegion</a>. <a href="bmh_SkCanvas_Reference?cl=9919#SaveLayerRec">SaveLayerRec</a> contains the state used to create the layer offscreen. -Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with result to restore this and subsequent saves. +Call <a href="bmh_SkCanvas_Reference?cl=9919#restoreToCount">restoreToCount</a> with returned value to restore this and subsequent saves. ### Parameters <table> <tr> <td><code><strong>layerRec </strong></code></td> <td> -offscreen state.</td> +offscreen state</td> </tr> </table> ### Return Value -depth of save state stack. +depth of save state stack ### Example @@ -1664,7 +1756,7 @@ The save count of a new canvas is one. ### Return Value -depth of save state stack. +depth of save state stack ### Example @@ -1689,9 +1781,8 @@ depth = 1 void restoreToCount(int saveCount) </pre> -Restores state to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> -values when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a>, <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a>, <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerAlpha">saveLayerAlpha</a> -returned <a href="bmh_SkCanvas_Reference?cl=9919#saveCount">saveCount</a>. +Restores state to <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, and <a href="bmh_undocumented?cl=9919#Draw_Filter">Draw Filter</a> values when <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a>, <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#saveLayerAlpha">saveLayerAlpha</a> returned <a href="bmh_SkCanvas_Reference?cl=9919#saveCount">saveCount</a>. Does nothing if <a href="bmh_SkCanvas_Reference?cl=9919#saveCount">saveCount</a> is greater than state stack count. Restores state to initial values if <a href="bmh_SkCanvas_Reference?cl=9919#saveCount">saveCount</a> is less than or equal to one. @@ -1699,7 +1790,7 @@ Restores state to initial values if <a href="bmh_SkCanvas_Reference?cl=9919#save ### Parameters <table> <tr> <td><code><strong>saveCount </strong></code></td> <td> -The depth of state stack to restore.</td> +depth of state stack to restore</td> </tr> </table> @@ -1739,9 +1830,9 @@ the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>dx </strong></code></td> <td> -The distance to translate in x.</td> +distance to translate in x</td> </tr> <tr> <td><code><strong>dy </strong></code></td> <td> -The distance to translate in y.</td> +distance to translate in y</td> </tr> </table> @@ -1775,9 +1866,9 @@ the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>sx </strong></code></td> <td> -The amount to scale in x.</td> +amount to scale in x</td> </tr> <tr> <td><code><strong>sy </strong></code></td> <td> -The amount to scale in y.</td> +amount to scale in y</td> </tr> </table> @@ -1805,7 +1896,7 @@ the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>degrees </strong></code></td> <td> -The amount to rotate, in <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a>.</td> +amount to rotate, in <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a></td> </tr> </table> @@ -1820,23 +1911,24 @@ are rotated clockwise.</div></fiddle-embed></div> void rotate(SkScalar degrees, SkScalar px, SkScalar py) </pre> -Rotate <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> by <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a> about a point at (<a href="bmh_SkCanvas_Reference?cl=9919#px">px</a>, <a href="bmh_SkCanvas_Reference?cl=9919#py">py</a>). Positive <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a> rotates clockwise. +Rotate <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> by <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a> about a point at (<a href="bmh_SkCanvas_Reference?cl=9919#px">px</a>, <a href="bmh_SkCanvas_Reference?cl=9919#py">py</a>). Positive <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a> rotates +clockwise. Mathematically, construct a rotation matrix. Pre-multiply the rotation matrix by a translation matrix, then replace <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with the resulting matrix pre-multiplied with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -This has the effect of rotating the drawing about a given point before transforming -the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. +This has the effect of rotating the drawing about a given point before +transforming the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>degrees </strong></code></td> <td> -The amount to rotate, in <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a>.</td> +amount to rotate, in <a href="bmh_SkCanvas_Reference?cl=9919#degrees">degrees</a></td> </tr> <tr> <td><code><strong>px </strong></code></td> <td> -The x coordinate of the point to rotate about.</td> +x-coordinate of the point to rotate about</td> </tr> <tr> <td><code><strong>py </strong></code></td> <td> -The y coordinate of the point to rotate about.</td> +y-coordinate of the point to rotate about</td> </tr> </table> @@ -1853,24 +1945,22 @@ The y coordinate of the point to rotate about.</td> void skew(SkScalar sx, SkScalar sy) </pre> -Skew <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> by <a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a> on the x-axis and <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a> on the y-axis. A positive value of <a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a> skews the -drawing right as y increases; a positive value of <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a> skews the drawing down as x increases. +Skew <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> by <a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a> on the x-axis and <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a> on the y-axis. A positive value of <a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a> +skews the drawing right as y increases; a positive value of <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a> skews the drawing +down as x increases. -Mathematically, replace <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with a skew matrix -pre-multiplied with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. +Mathematically, replace <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with a skew matrix pre-multiplied with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -Preconcat the current matrix with the specified skew. +This has the effect of skewing the drawing by (<a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a>, <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a>) before transforming +the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>sx </strong></code></td> <td> -The amount to skew in x.</td> +amount to skew in x</td> </tr> <tr> <td><code><strong>sy </strong></code></td> <td> -The amount to skew in y.</td> +amount to skew in y</td> </tr> -This has the effect of scaling the drawing by (<a href="bmh_SkCanvas_Reference?cl=9919#sx">sx</a>, <a href="bmh_SkCanvas_Reference?cl=9919#sy">sy</a>) before transforming -the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. - </table> ### Example @@ -1890,15 +1980,15 @@ Blue text combines x and y skew to rotate and scale.</div></fiddle-embed></div> void concat(const SkMatrix& matrix) </pre> -Replace <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> pre-multiplied with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. +Replace <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> with <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> pre-multiplied with existing <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -This has the effect of transforming the drawn geometry by <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, before transforming -the result with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. +This has the effect of transforming the drawn geometry by <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, before +transforming the result with existing <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. ### Parameters <table> <tr> <td><code><strong>matrix </strong></code></td> <td> -Pre-multiply with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> to pre-multiply with existing <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a></td> </tr> </table> @@ -1921,7 +2011,7 @@ Unlike <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, any prior <a ### Parameters <table> <tr> <td><code><strong>matrix </strong></code></td> <td> -Copied into <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> to copy, replacing existing <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a></td> </tr> </table> @@ -1959,7 +2049,7 @@ This does not account for translation by <a href="bmh_undocumented?cl=9919#Devic ### Return Value -<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> on <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> in <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> ### Example @@ -2024,11 +2114,11 @@ before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be anti-aliased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be anti-aliased</td> </tr> </table> @@ -2044,15 +2134,14 @@ void clipRect(const SkRect& rect, SkClipOp op) Replace <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with the intersection or difference of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a>. Resulting <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is aliased; pixels are fully contained by the clip. -<a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> @@ -2074,9 +2163,9 @@ before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +Rectangle to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be anti-aliased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be anti-aliased</td> </tr> </table> @@ -2100,11 +2189,14 @@ Sets the max clip rectangle, which can be set by <a href="bmh_SkCanvas_Reference The max clip affects only future ops (it is not retroactive). The clip restriction is not recorded in pictures. +Pass an empty <a href="bmh_SkCanvas_Reference?cl=9919#androidFramework_setDeviceClipRestriction">rect</a> to disable max clip. + ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -The maximum allowed clip in device coordinates.</td> +maximum allowed clip in device coordinates</td> </tr> +# --- @@ -2125,11 +2217,11 @@ before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a ### Parameters <table> <tr> <td><code><strong>rrect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased</td> </tr> </table> @@ -2145,15 +2237,14 @@ void clipRRect(const SkRRect& rrect, SkClipOp op) Replace <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with the intersection or difference of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a>. Resulting <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is aliased; pixels are fully contained by the clip. -<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. ### Parameters <table> <tr> <td><code><strong>rrect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> @@ -2169,15 +2260,14 @@ void clipRRect(const SkRRect& rrect, bool doAntiAlias = false) Replace <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with the intersection of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a>, with an aliased or anti-aliased clip edge. -<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. ### Parameters <table> <tr> <td><code><strong>rrect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased</td> </tr> </table> @@ -2198,17 +2288,16 @@ Replace <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with the intersec with an aliased or anti-aliased clip edge. <a href="bmh_SkPath_Reference?cl=9919#Fill_Type">Path Fill Type</a> determines if <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> describes the area inside or outside its contours; and if <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a> overlaps itself or another <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a>, whether the overlaps form part of the area. -<a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. ### Parameters <table> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased</td> </tr> </table> @@ -2237,9 +2326,9 @@ before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a ### Parameters <table> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> @@ -2260,15 +2349,14 @@ Resulting <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is aliased; pix <a href="bmh_SkPath_Reference?cl=9919#Fill_Type">Path Fill Type</a> determines if <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> describes the area inside or outside its contours; and if <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a> overlaps itself or another <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a>, whether the overlaps form part of the area. -<a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> -before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +<a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> is transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> before it is combined with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. ### Parameters <table> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>doAntiAlias </strong></code></td> <td> -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased.</td> +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is to be antialiased</td> </tr> </table> @@ -2305,9 +2393,9 @@ Resulting <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is aliased; pix ### Parameters <table> <tr> <td><code><strong>deviceRgn </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Region">Region</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Region">Region</a> to combine with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> <tr> <td><code><strong>op </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Op">Clip Op</a> to apply to <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> @@ -2334,13 +2422,13 @@ Use to check if an area to be drawn is clipped out, to skip subsequent draw call ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> to compare with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> to compare with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a>, transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, does not intersect <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +true if <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a>, transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, does not intersect <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> ### Example @@ -2369,13 +2457,13 @@ Use to check if an area to be drawn is clipped out, to skip subsequent draw call ### Parameters <table> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to compare with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to compare with <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a></td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, does not intersect <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>. +true if <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, transformed by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, does not intersect <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> ### Example @@ -2407,7 +2495,7 @@ is anti-aliased. ### Return Value -bounds of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in local coordinates. +bounds of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in local coordinates ### Example @@ -2440,13 +2528,13 @@ is anti-aliased. ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in local coordinates.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in local coordinates</td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> is not empty. +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> is not empty ### Example @@ -2477,7 +2565,7 @@ Unlike <a href="bmh_SkCanvas_Reference?cl=9919#getLocalClipBounds">getLocalClipB ### Return Value -bounds of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in <a href="bmh_undocumented?cl=9919#Device">Device</a> coordinates. +bounds of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in <a href="bmh_undocumented?cl=9919#Device">Device</a> coordinates ### Example @@ -2509,13 +2597,13 @@ Unlike <a href="bmh_SkCanvas_Reference?cl=9919#getLocalClipBounds">getLocalClipB ### Parameters <table> <tr> <td><code><strong>bounds </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in device coordinates.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> in device coordinates</td> </tr> </table> ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> is not empty. +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> <a href="bmh_SkCanvas_Reference?cl=9919#bounds">bounds</a> is not empty ### Example @@ -2545,9 +2633,9 @@ Fill <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with <a href="bmh_un ### Parameters <table> <tr> <td><code><strong>color </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Unpremultiplied">Unpremultiplied</a> <a href="bmh_undocumented?cl=9919#ARGB">Color ARGB</a>.</td> +<a href="bmh_undocumented?cl=9919#Unpremultiplied">Unpremultiplied</a> <a href="bmh_undocumented?cl=9919#ARGB">Color ARGB</a></td> </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#SkBlendMode">SkBlendMode</a> used to combine source <a href="bmh_SkCanvas_Reference?cl=9919#color">color</a> and destination.</td> +<a href="bmh_undocumented?cl=9919#SkBlendMode">SkBlendMode</a> used to combine source <a href="bmh_SkCanvas_Reference?cl=9919#color">color</a> and destination</td> </tr> </table> @@ -2570,7 +2658,7 @@ This has the effect of replacing all pixels contained by <a href="bmh_SkCanvas_R ### Parameters <table> <tr> <td><code><strong>color </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Unpremultiplied">Unpremultiplied</a> <a href="bmh_undocumented?cl=9919#ARGB">Color ARGB</a>.</td> +<a href="bmh_undocumented?cl=9919#Unpremultiplied">Unpremultiplied</a> <a href="bmh_undocumented?cl=9919#ARGB">Color ARGB</a></td> </tr> </table> @@ -2608,14 +2696,14 @@ any cached data is deleted when owning <a href="bmh_undocumented?cl=9919#Surface void drawPaint(const SkPaint& paint) </pre> -Fill <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. <a href="bmh_SkCanvas_Reference?cl=9919#drawPaint">drawPaint</a> is affected by <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> components -<a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>; but not by -<a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>. +Fill <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> with <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> components <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> affect drawing; +<a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a> in <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is ignored. ### Parameters <table> <tr> <td><code><strong>paint </strong></code></td> <td> -Used to fill the canvas.</td> +graphics state used to fill <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a></td> </tr> </table> @@ -2669,13 +2757,14 @@ void drawPoints(PointMode mode, size_t count, const SkPoint pts[], </pre> Draw <a href="bmh_SkCanvas_Reference?cl=9919#pts">pts</a> using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> is the number of points; if <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> is less than one, <a href="bmh_SkCanvas_Reference?cl=9919#drawPoints">drawPoints</a> has no effect. +<a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> is the number of points; if <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> is less than one, has no effect. <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> may be one of: <a href="bmh_SkCanvas_Reference?cl=9919#kPoints_PointMode">kPoints PointMode</a>, <a href="bmh_SkCanvas_Reference?cl=9919#kLines_PointMode">kLines PointMode</a>, or <a href="bmh_SkCanvas_Reference?cl=9919#kPolygon_PointMode">kPolygon PointMode</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> is <a href="bmh_SkCanvas_Reference?cl=9919#kPoints_PointMode">kPoints PointMode</a>, the shape of point drawn depends on <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kRound_Cap">SkPaint::kRound Cap</a>, each point draws a circle of diameter <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">SkPaint::kSquare Cap</a> or <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">SkPaint::kButt Cap</a>, -each point draws a square of width and height <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> is <a href="bmh_SkCanvas_Reference?cl=9919#kPoints_PointMode">kPoints PointMode</a>, the shape of point drawn depends on <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kRound_Cap">SkPaint::kRound Cap</a>, each point draws a +circle of diameter <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">SkPaint::kSquare Cap</a> +or <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">SkPaint::kButt Cap</a>, each point draws a square of width and height +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> is <a href="bmh_SkCanvas_Reference?cl=9919#kLines_PointMode">kLines PointMode</a>, each pair of points draws a line segment. One line is drawn for every two points; each point is used once. If <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> is odd, @@ -2687,20 +2776,20 @@ If <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> is <a href="bmh_SkCanv Each line segment respects <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> and <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> is ignored, as if were set to <a href="bmh_SkPaint_Reference?cl=9919#kStroke_Style">SkPaint::kStroke Style</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#drawPoints">drawPoints</a> always draws each element one at a time; <a href="bmh_SkCanvas_Reference?cl=9919#drawPoints">drawPoints</a> is not affected by -<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a>, and unlike <a href="bmh_SkCanvas_Reference?cl=9919#drawPath">drawPath</a>, does not create a mask from all points and lines -before drawing. +Always draws each element one at a time; is not affected by +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a>, and unlike <a href="bmh_SkCanvas_Reference?cl=9919#drawPath">drawPath</a>, does not create a mask from all points +and lines before drawing. ### Parameters <table> <tr> <td><code><strong>mode </strong></code></td> <td> -Whether <a href="bmh_SkCanvas_Reference?cl=9919#pts">pts</a> draws points or lines.</td> +Whether <a href="bmh_SkCanvas_Reference?cl=9919#pts">pts</a> draws points or lines</td> </tr> <tr> <td><code><strong>count </strong></code></td> <td> -The number of points in the array.</td> +The number of points in the array</td> </tr> <tr> <td><code><strong>pts </strong></code></td> <td> -Array of points to draw.</td> +Array of points to draw</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke, blend, color, and so on, used to draw.</td> +Stroke, blend, color, and so on, used to draw</td> </tr> </table> @@ -2733,19 +2822,19 @@ void drawPoint(SkScalar x, SkScalar y, const SkPaint& paint) Draw point at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>) using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. The shape of point drawn depends on <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kRound_Cap">SkPaint::kRound Cap</a>, draw a circle of diameter <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">SkPaint::kSquare Cap</a> or <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">SkPaint::kButt Cap</a>, +If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kRound_Cap">SkPaint::kRound Cap</a>, draw a circle of diameter +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">SkPaint::kSquare Cap</a> or <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">SkPaint::kButt Cap</a>, draw a square of width and height <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> is ignored, as if were set to <a href="bmh_SkPaint_Reference?cl=9919#kStroke_Style">SkPaint::kStroke Style</a>. ### Parameters <table> <tr> <td><code><strong>x </strong></code></td> <td> -Left edge of circle or square.</td> +left edge of circle or square</td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Top edge of circle or square.</td> +top edge of circle or square</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke, blend, color, and so on, used to draw.</td> +stroke, blend, color, and so on, used to draw</td> </tr> </table> @@ -2755,6 +2844,37 @@ Stroke, blend, color, and so on, used to draw.</td> --- +<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0"> +void drawPoint(SkPoint p, const SkPaint& paint) +</pre> + +Draw point <a href="bmh_SkCanvas_Reference?cl=9919#p">p</a> using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + +The shape of point drawn depends on <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kRound_Cap">SkPaint::kRound Cap</a>, draw a circle of diameter +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">SkPaint::kSquare Cap</a> or <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">SkPaint::kButt Cap</a>, +draw a square of width and height <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a>. +<a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> is ignored, as if were set to <a href="bmh_SkPaint_Reference?cl=9919#kStroke_Style">SkPaint::kStroke Style</a>. + +### Parameters + +<table> <tr> <td><code><strong>p </strong></code></td> <td> +top-left edge of circle or square</td> + </tr> <tr> <td><code><strong>paint </strong></code></td> <td> +stroke, blend, color, and so on, used to draw</td> + </tr> +</table> + +### Example + +<div><fiddle-embed name="1a0a839061c69d870acca2bcfbdf1a41"></fiddle-embed></div> + +### See Also + +<a href="bmh_SkCanvas_Reference?cl=9919#drawPoints">drawPoints</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawCircle">drawCircle</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawRect">drawRect</a> + +--- + <a name="drawLine"></a> ## drawLine @@ -2763,22 +2883,23 @@ void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint& paint) </pre> -Draw line segment from (<a href="bmh_SkCanvas_Reference?cl=9919#x0">x0</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y0">y0</a>) to (<a href="bmh_SkCanvas_Reference?cl=9919#x1">x1</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y1">y1</a>) using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness; <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> draws the end rounded or square; +Draws line segment from (<a href="bmh_SkCanvas_Reference?cl=9919#x0">x0</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y0">y0</a>) to (<a href="bmh_SkCanvas_Reference?cl=9919#x1">x1</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y1">y1</a>) using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness; +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> draws the end rounded or square; <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> is ignored, as if were set to <a href="bmh_SkPaint_Reference?cl=9919#kStroke_Style">SkPaint::kStroke Style</a>. ### Parameters <table> <tr> <td><code><strong>x0 </strong></code></td> <td> -Start of line segment on x-axis.</td> +start of line segment on x-axis</td> </tr> <tr> <td><code><strong>y0 </strong></code></td> <td> -Start of line segment on y-axis.</td> +start of line segment on y-axis</td> </tr> <tr> <td><code><strong>x1 </strong></code></td> <td> -End of line segment on x-axis.</td> +end of line segment on x-axis</td> </tr> <tr> <td><code><strong>y1 </strong></code></td> <td> -End of line segment on y-axis.</td> +end of line segment on y-axis</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke, blend, color, and so on, used to draw.</td> +stroke, blend, color, and so on, used to draw</td> </tr> </table> @@ -2788,6 +2909,32 @@ Stroke, blend, color, and so on, used to draw.</td> --- +<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0"> +void drawLine(SkPoint p0, SkPoint p1, const SkPaint& paint) +</pre> + +Draws line segment from <a href="bmh_SkCanvas_Reference?cl=9919#p0">p0</a> to <a href="bmh_SkCanvas_Reference?cl=9919#p1">p1</a> using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness; +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> draws the end rounded or square; +<a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> is ignored, as if were set to <a href="bmh_SkPaint_Reference?cl=9919#kStroke_Style">SkPaint::kStroke Style</a>. + +### Parameters + +<table> <tr> <td><code><strong>p0 </strong></code></td> <td> +start of line segment</td> + </tr> <tr> <td><code><strong>p1 </strong></code></td> <td> +end of line segment</td> + </tr> <tr> <td><code><strong>paint </strong></code></td> <td> +stroke, blend, color, and so on, used to draw</td> + </tr> +</table> + +### Example + +<div><fiddle-embed name="f8525816cb596dde1a3855446792c8e0"></fiddle-embed></div> + +--- + <a name="drawRect"></a> ## drawRect @@ -2803,9 +2950,9 @@ if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Wi ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -The rectangle to be drawn.</td> +rectangle to be drawn</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke or fill, blend, color, and so on, used to draw.</td> +stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2830,9 +2977,9 @@ if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Wi ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -The rectangle to be drawn.</td> +rectangle to be drawn</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke or fill, blend, color, and so on, used to draw.</td> +stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2857,9 +3004,9 @@ if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Wi ### Parameters <table> <tr> <td><code><strong>region </strong></code></td> <td> -The <a href="bmh_SkCanvas_Reference?cl=9919#region">region</a> to be drawn.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#region">region</a> to be drawn</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2883,9 +3030,9 @@ if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Wi ### Parameters <table> <tr> <td><code><strong>oval </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Oval">Oval</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Oval">Oval</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2906,15 +3053,15 @@ Draw <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> <a href="bmh_S In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> determines if <a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> is stroked or filled; if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness. -<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> may represent a rectangle, circle, oval, uniformly rounded rectangle, or may have -any combination of positive non-square radii for the four corners. +<a href="bmh_SkCanvas_Reference?cl=9919#rrect">rrect</a> may represent a rectangle, circle, oval, uniformly rounded rectangle, or +may have any combination of positive non-square radii for the four corners. ### Parameters <table> <tr> <td><code><strong>rrect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> with up to eight corner radii to draw.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> with up to eight corner radii to draw</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2936,21 +3083,21 @@ using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCan <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> must contain <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a> or the drawing is undefined. In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> determines if rrect is stroked or filled; if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness. -If stroked and <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> corner has zero length radii, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a> can draw -corners rounded or square. +If stroked and <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> corner has zero length radii, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a> can +draw corners rounded or square. -<a href="bmh_undocumented?cl=9919#GPU_backed">GPU-backed</a> platforms take advantage of <a href="bmh_SkCanvas_Reference?cl=9919#drawDRRect">drawDRRect</a> since both <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> and <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a> are +<a href="bmh_undocumented?cl=9919#GPU_backed">GPU-backed</a> platforms optimize drawing when both <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> and <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a> are concave and <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> contains <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a>. These platforms may not be able to draw <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> built with identical data as fast. ### Parameters <table> <tr> <td><code><strong>outer </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> bounds to draw.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#outer">outer</a> bounds to draw</td> </tr> <tr> <td><code><strong>inner </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a> bounds to draw.</td> +<a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#inner">inner</a> bounds to draw</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2981,13 +3128,13 @@ if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Wi ### Parameters <table> <tr> <td><code><strong>cx </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Circle">Circle</a> center on the x-axis.</td> +<a href="bmh_undocumented?cl=9919#Circle">Circle</a> center on the x-axis</td> </tr> <tr> <td><code><strong>cy </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Circle">Circle</a> center on the y-axis.</td> +<a href="bmh_undocumented?cl=9919#Circle">Circle</a> center on the y-axis</td> </tr> <tr> <td><code><strong>radius </strong></code></td> <td> -Half the diameter of <a href="bmh_undocumented?cl=9919#Circle">Circle</a>.</td> +half the diameter of <a href="bmh_undocumented?cl=9919#Circle">Circle</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -2997,6 +3144,32 @@ Half the diameter of <a href="bmh_undocumented?cl=9919#Circle">Circle</a>.</td> --- +<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0"> +void drawCircle(SkPoint center, SkScalar radius, const SkPaint& paint) +</pre> + +Draw <a href="bmh_undocumented?cl=9919#Circle">Circle</a> at (cx, cy) with <a href="bmh_SkCanvas_Reference?cl=9919#radius">radius</a> using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#radius">radius</a> is zero or less, nothing is drawn. +In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> determines if <a href="bmh_undocumented?cl=9919#Circle">Circle</a> is stroked or filled; +if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness. + +### Parameters + +<table> <tr> <td><code><strong>center </strong></code></td> <td> +<a href="bmh_undocumented?cl=9919#Circle">Circle</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a></td> + </tr> <tr> <td><code><strong>radius </strong></code></td> <td> +half the diameter of <a href="bmh_undocumented?cl=9919#Circle">Circle</a></td> + </tr> <tr> <td><code><strong>paint </strong></code></td> <td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> + </tr> +</table> + +### Example + +<div><fiddle-embed name="9303ffae45ddd0b0a1f93d816a1762f4"></fiddle-embed></div> + +--- + <a name="drawArc"></a> ## drawArc @@ -3006,8 +3179,10 @@ void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, </pre> Draw <a href="bmh_undocumented?cl=9919#Arc">Arc</a> using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + <a href="bmh_undocumented?cl=9919#Arc">Arc</a> is part of <a href="bmh_undocumented?cl=9919#Oval">Oval</a> bounded by <a href="bmh_SkCanvas_Reference?cl=9919#oval">oval</a>, sweeping from <a href="bmh_SkCanvas_Reference?cl=9919#startAngle">startAngle</a> to <a href="bmh_SkCanvas_Reference?cl=9919#startAngle">startAngle</a> plus <a href="bmh_SkCanvas_Reference?cl=9919#sweepAngle">sweepAngle</a>. <a href="bmh_SkCanvas_Reference?cl=9919#startAngle">startAngle</a> and <a href="bmh_SkCanvas_Reference?cl=9919#sweepAngle">sweepAngle</a> are in degrees. + <a href="bmh_SkCanvas_Reference?cl=9919#startAngle">startAngle</a> of zero places start point at the right middle edge of <a href="bmh_SkCanvas_Reference?cl=9919#oval">oval</a>. A positive <a href="bmh_SkCanvas_Reference?cl=9919#sweepAngle">sweepAngle</a> places <a href="bmh_undocumented?cl=9919#Arc">Arc</a> end point clockwise from start point; a negative <a href="bmh_SkCanvas_Reference?cl=9919#sweepAngle">sweepAngle</a> places <a href="bmh_undocumented?cl=9919#Arc">Arc</a> end point counterclockwise from start point. @@ -3020,15 +3195,15 @@ If <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Refere ### Parameters <table> <tr> <td><code><strong>oval </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Oval">Oval</a> containing <a href="bmh_undocumented?cl=9919#Arc">Arc</a> to draw.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Oval">Oval</a> containing <a href="bmh_undocumented?cl=9919#Arc">Arc</a> to draw</td> </tr> <tr> <td><code><strong>startAngle </strong></code></td> <td> -Angle in degrees where <a href="bmh_undocumented?cl=9919#Arc">Arc</a> begins.</td> +angle in degrees where <a href="bmh_undocumented?cl=9919#Arc">Arc</a> begins</td> </tr> <tr> <td><code><strong>sweepAngle </strong></code></td> <td> -Sweep angle in degrees; positive is clockwise.</td> +sweep angle in degrees; positive is clockwise</td> </tr> <tr> <td><code><strong>useCenter </strong></code></td> <td> -If true include the center of the <a href="bmh_SkCanvas_Reference?cl=9919#oval">oval</a>.</td> +if true, include the center of the <a href="bmh_SkCanvas_Reference?cl=9919#oval">oval</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td> </tr> </table> @@ -3050,24 +3225,26 @@ void drawRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, const SkPaint& paint) </pre> -Draw <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> bounded by <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a>, with corner radii (<a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a>, <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a>) using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, -and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +Draw <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> bounded by <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a>, with corner radii (<a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a>, <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a>) using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> determines if <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> is stroked or filled; if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness. If <a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a> or <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a> are less than zero, they are treated as if they are zero. If <a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a> plus <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a> exceeds <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a> width or <a href="bmh_SkCanvas_Reference?cl=9919#rect">rect</a> height, radii are scaled down to fit. -If <a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a> and <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a> are zero, <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> is drawn as <a href="bmh_undocumented?cl=9919#Rect">Rect</a> and if stroked is affected by <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#rx">rx</a> and <a href="bmh_SkCanvas_Reference?cl=9919#ry">ry</a> are zero, <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> is drawn as <a href="bmh_undocumented?cl=9919#Rect">Rect</a> and if stroked is affected by +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a>. ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to draw.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> to draw</td> </tr> <tr> <td><code><strong>rx </strong></code></td> <td> -Semiaxis length in x of oval describing rounded corners.</td> +semiaxis length in x of oval describing rounded corners</td> </tr> <tr> <td><code><strong>ry </strong></code></td> <td> -Semiaxis length in y of oval describing rounded corners.</td> +semiaxis length in y of oval describing rounded corners</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke, blend, color, and so on, used to draw.</td> +stroke, blend, color, and so on, used to draw</td> </tr> </table> @@ -3091,16 +3268,17 @@ Draw <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> <a href="bmh_SkCanvas_ <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> contains an array of <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a>, each of which may be open or closed. In <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_SkPaint_Reference?cl=9919#Style">Paint Style</a> determines if <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a> is stroked or filled: -if filled, <a href="bmh_SkPath_Reference?cl=9919#Fill_Type">Path Fill Type</a> determines whether <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a> describes inside or outside of fill; -if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> describes line ends, -and <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a> describes how corners are drawn. +if filled, <a href="bmh_SkPath_Reference?cl=9919#Fill_Type">Path Fill Type</a> determines whether <a href="bmh_SkPath_Reference?cl=9919#Contour">Path Contour</a> describes inside or +outside of fill; if stroked, <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Width">Paint Stroke Width</a> describes the line thickness, +<a href="bmh_SkPaint_Reference?cl=9919#Stroke_Cap">Paint Stroke Cap</a> describes line ends, and <a href="bmh_SkPaint_Reference?cl=9919#Stroke_Join">Paint Stroke Join</a> describes how +corners are drawn. ### Parameters <table> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to draw.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> to draw</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Stroke, blend, color, and so on, used to draw.</td> +stroke, blend, color, and so on, used to draw</td> </tr> </table> @@ -3116,8 +3294,8 @@ Third bottom column shows inverse winding fills area outside both contours.</div --- # <a name="Draw_Image"></a> Draw Image -<a href="bmh_SkCanvas_Reference?cl=9919#drawImage">drawImage</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">drawImageRect</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">drawImageNine</a> can be called with a bare pointer or a smart pointer as a convenience. -The pairs of calls are otherwise identical. +<a href="bmh_SkCanvas_Reference?cl=9919#drawImage">drawImage</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">drawImageRect</a>, and <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">drawImageNine</a> can be called with a bare pointer or +a smart pointer as a convenience. The pairs of calls are otherwise identical. <a name="drawImage"></a> ## drawImage @@ -3128,25 +3306,26 @@ void drawImage(const SkImage* image, SkScalar left, SkScalar top, </pre> Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, with its top-left corner at (<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a>, <a href="bmh_SkCanvas_Reference?cl=9919#top">top</a>), -using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImage">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImage">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, +and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImage">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated +mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> +made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the +<a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -Uncompressed rectangular map of pixels.</td> +uncompressed rectangular map of pixels</td> </tr> <tr> <td><code><strong>left </strong></code></td> <td> -Left side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a> side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a></td> </tr> <tr> <td><code><strong>top </strong></code></td> <td> -Top side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#top">top</a> side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3162,25 +3341,26 @@ void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top, </pre> Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, with its top-left corner at (<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a>, <a href="bmh_SkCanvas_Reference?cl=9919#top">top</a>), -using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. +using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImage_2">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImage_2">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImage_2">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated +mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> +made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the +<a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -Uncompressed rectangular map of pixels.</td> +uncompressed rectangular map of pixels</td> </tr> <tr> <td><code><strong>left </strong></code></td> <td> -Left side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a> side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a></td> </tr> <tr> <td><code><strong>top </strong></code></td> <td> -Top side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>.</td> +pop side of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3198,12 +3378,12 @@ enum <a href="bmh_SkCanvas_Reference?cl=9919#SrcRectConstraint">SrcRectConstrain <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a>, };</pre> -<a href="bmh_SkCanvas_Reference?cl=9919#SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of the <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src, provided to <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">drawImageRect</a>, -trading off speed for precision. +<a href="bmh_SkCanvas_Reference?cl=9919#SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of the <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src, provided to +<a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">drawImageRect</a>, trading off speed for precision. -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> in <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> may sample multiple pixels in the image. -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> src restricts the bounds of pixels that may be read. <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> may slow -down if it cannot read outside the bounds, when sampling near the edge of <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src. +<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> in <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> may sample multiple pixels in the image. <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src +restricts the bounds of pixels that may be read. <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> may slow down if +it cannot read outside the bounds, when sampling near the edge of <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src. <a href="bmh_SkCanvas_Reference?cl=9919#SrcRectConstraint">SrcRectConstraint</a> specifies whether an <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> is allowed to read pixels outside <a href="bmh_undocumented?cl=9919#Rect">Rect</a> src. @@ -3239,28 +3419,33 @@ void drawImageRect(const SkImage* image, const SkRect& src, const SkRect& dst, </pre> Draw <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> of <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>src </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from.</td> +source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster.</td> +filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster</td> </tr> </table> @@ -3281,29 +3466,35 @@ void drawImageRect(const SkImage* image, const SkIRect& isrc, const SkRect& dst, </pre> Draw <a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> of <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Note that <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within src; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +Note that <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional +boundaries. Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> +<a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_2">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_2">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_2">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>isrc </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from.</td> +source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +filter strictly within src or draw faster</td> </tr> </table> @@ -3318,26 +3509,32 @@ void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint SrcRectConstraint constraint = kStrict_SrcRectConstraint) </pre> -Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>, -using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -Use constaint to choose <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> or <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a>. +Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, +and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_3">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_3">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_3">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +filter strictly within src or draw faster</td> </tr> </table> @@ -3354,28 +3551,33 @@ void drawImageRect(const sk_sp<SkImage>& image, const SkRect& src, </pre> Draw <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> of <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_4">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_4">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_4">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>src </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from.</td> +source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster.</td> +filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster</td> </tr> </table> @@ -3393,29 +3595,34 @@ void drawImageRect(const sk_sp<SkImage>& image, const SkIRect& isrc, </pre> Draw <a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> of <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Note that <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -cons set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within src; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +<a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_5">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_5">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_5">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>isrc </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from.</td> +source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +filter strictly within src or draw faster</td> </tr> </table> @@ -3432,26 +3639,31 @@ void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst, </pre> Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>, -using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within src; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_6">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_6">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageRect_6">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +filter strictly within src or draw faster</td> </tr> </table> @@ -3470,27 +3682,31 @@ void drawImageNine(const SkImage* image, const SkIRect& center, </pre> Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> stretched differentially to fit into <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> into nine sections: four sides, four corners, and the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. -corners are unscaled or scaled down proportionately if their sides are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; -<a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining space, if any. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> into nine sections: four sides, four corners, and +the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. Corners are unscaled or scaled down proportionately if their sides +are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining space, if any. + +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>center </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> corners and sides.</td> +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> corners and sides</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3509,27 +3725,31 @@ void drawImageNine(const sk_sp<SkImage>& image, const SkIRect& center, </pre> Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> stretched differentially to fit into <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> into nine sections: four sides, four corners, and the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. -corners are unscaled or scaled down proportionately if their sides are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; -<a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining space, if any. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> into nine sections: four sides, four corners, and +the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. Corners are unscaled or scaled down proportionately if their sides +are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining space, if any. + +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine_2">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine_2">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine_2">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just +as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#makeShader">SkImage::makeShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set +replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge color when it samples outside of its bounds. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>center </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> corners and sides.</td> +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> corners and sides</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3553,24 +3773,28 @@ void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, </pre> Draw <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, with its top-left corner at (<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a>, <a href="bmh_SkCanvas_Reference?cl=9919#top">top</a>), -using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. +using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmap">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmap">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmap">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>left </strong></code></td> <td> -Left side of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#left">left</a> side of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a></td> </tr> <tr> <td><code><strong>top </strong></code></td> <td> -Top side of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#top">top</a> side of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3590,28 +3814,34 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkRect& src, const SkRect& dst </pre> Draw <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> of <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a>; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>src </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw from.</td> +source <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster.</td> +filter strictly within <a href="bmh_SkCanvas_Reference?cl=9919#src">src</a> or draw faster</td> </tr> </table> @@ -3628,29 +3858,35 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc, </pre> Draw <a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> of <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Note that <a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within src; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +<a href="bmh_SkCanvas_Reference?cl=9919#isrc">isrc</a> is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_2">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_2">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_2">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>isrc </strong></code></td> <td> -Source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of image to draw from.</td> +source <a href="bmh_undocumented?cl=9919#IRect">IRect</a> of image to draw from</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +Filter strictly within src or draw faster</td> </tr> </table> @@ -3667,27 +3903,33 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst, </pre> Draw <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>, scaled and translated to fill <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -Note that isrc is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. -<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to sample within src; -set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to improve performance. +isrc is on integer pixel boundaries; <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a> may include fractional boundaries. +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_3">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_3">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapRect_3">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. + +<a href="bmh_SkCanvas_Reference?cl=9919#constraint">constraint</a> set to <a href="bmh_SkCanvas_Reference?cl=9919#kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a> to +sample within src; set to <a href="bmh_SkCanvas_Reference?cl=9919#kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to +improve performance. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> <tr> <td><code><strong>constraint </strong></code></td> <td> -Filter strictly within src or draw faster.</td> +filter strictly within src or draw faster</td> </tr> </table> @@ -3706,27 +3948,33 @@ void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, </pre> Draw <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> stretched differentially to fit into <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>. -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> into nine sections: four sides, four corners, and the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. -corners are unscaled or scaled down proportionately if their sides are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; -<a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining space, if any. -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> divides the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> into nine sections: four sides, four corners, +and the <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a>. Corners are unscaled or scaled down proportionately if their +sides are larger than <a href="bmh_SkCanvas_Reference?cl=9919#dst">dst</a>; <a href="bmh_SkCanvas_Reference?cl=9919#center">center</a> and four sides are scaled to fit remaining +space, if any. + +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>center </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of image corners and sides.</td> +<a href="bmh_undocumented?cl=9919#IRect">IRect</a> edge of image corners and sides</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3783,31 +4031,35 @@ Optional setting per rectangular grid entry to make it transparent. <code><strong>const int* fXDivs</strong></code> Array of x-coordinates that divide the bitmap vertically. -Array entries must be unique, increasing, greater than or equal to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> left edge, -and less than <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> right edge. -Set the first element to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> left to collapse the left column of fixed grid entries. +Array entries must be unique, increasing, greater than or equal to +<a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> left edge, and less than <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> right edge. +Set the first element to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> left to collapse the left column of +fixed grid entries. <code><strong>const int* fYDivs</strong></code> Array of y-coordinates that divide the bitmap horizontally. -Array entries must be unique, increasing, greater than or equal to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> top edge, -and less than <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> bottom edge. -Set the first element to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> top to collapse the top row of fixed grid entries. +Array entries must be unique, increasing, greater than or equal to +<a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> top edge, and less than <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> bottom edge. +Set the first element to <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fBounds">fBounds</a> top to collapse the top row of fixed +grid entries. <code><strong>const Flags* fFlags</strong></code> Optional array of <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_Flags">Flags</a>, one per rectangular grid entry: -array length must be (<a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fXCount">fXCount</a> + 1) * (<a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fYCount">fYCount</a> + 1). +array length must be( <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fXCount">fXCount</a> + 1) * (<a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fYCount">fYCount</a> + 1). Array entries correspond to the rectangular grid entries, ascending left to right and then top to bottom. <code><strong>int fXCount</strong></code> -Number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fXDivs">fXDivs</a> array; one less than the number of horizontal divisions. +Number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fXDivs">fXDivs</a> array; one less than the number of +horizontal divisions. <code><strong>int fYCount</strong></code> -Number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fYDivs">fYDivs</a> array; one less than the number of vertical divisions. +Number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#Lattice_fYDivs">fYDivs</a> array; one less than the number of vertical +divisions. <code><strong>const SkIRect* fBounds</strong></code> @@ -3826,28 +4078,32 @@ Draw <a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> <a href="bmh_SkCanvas_ <a href="bmh_SkCanvas_Reference?cl=9919#Lattice">Lattice</a> <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> divides <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> into a rectangular grid. Each intersection of an even-numbered row and column is fixed; like the corners -of <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">drawBitmapNine</a>, fixed <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> elements never scale larger than their initial size -and shrink proportionately when all fixed elements exceed the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s dimension. -All other grid elements scale to fill the available space, if any. - -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge -color when it samples outside of its bounds. +of <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">drawBitmapNine</a>, fixed <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> elements never scale larger than their initial +size and shrink proportionately when all fixed elements exceed the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s +dimension. All other grid elements scale to fill the available space, if any. + +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapLattice">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapLattice">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapLattice">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds. + +If generated mask extends beyond <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a>'s edge color when it samples +outside of its bounds. ### Parameters <table> <tr> <td><code><strong>bitmap </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>lattice </strong></code></td> <td> -Division of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> into fixed and variable rectangles.</td> +division of <a href="bmh_SkCanvas_Reference?cl=9919#bitmap">bitmap</a> into fixed and variable rectangles</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of image to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3874,28 +4130,32 @@ Draw <a href="bmh_undocumented?cl=9919#Image">Image</a> <a href="bmh_SkCanvas_Re <a href="bmh_SkCanvas_Reference?cl=9919#Lattice">Lattice</a> <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> divides <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> into a rectangular grid. Each intersection of an even-numbered row and column is fixed; like the corners -of <a href="bmh_SkCanvas_Reference?cl=9919#drawImageNine">drawImageNine</a>, fixed <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> elements never scale larger than their initial size -and shrink proportionately when all fixed elements exceed the bitmap's dimension. -All other grid elements scale to fill the available space, if any. - -Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. -If <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. -if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds. If generated mask extends -beyond <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> bounds, replicate <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> edge colors, just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from -<a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with <a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a>'s edge -color when it samples outside of its bounds. +of <a href="bmh_SkCanvas_Reference?cl=9919#drawBitmapNine">drawBitmapNine</a>, fixed <a href="bmh_SkCanvas_Reference?cl=9919#lattice">lattice</a> elements never scale larger than their initial +size and shrink proportionately when all fixed elements exceed the bitmap's +dimension. All other grid elements scale to fill the available space, if any. + +Additionally transform draw using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageLattice">paint</a>. + +If <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawImageLattice">paint</a> is supplied, apply <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>. If bitmap is <a href="bmh_undocumented?cl=9919#SkColorType">kAlpha 8 SkColorType</a>, apply <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_SkCanvas_Reference?cl=9919#drawImageLattice">paint</a> contains <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, generate mask from bitmap bounds. + +If generated mask extends beyond bitmap bounds, replicate bitmap edge colors, +just as <a href="bmh_undocumented?cl=9919#Shader">Shader</a> made from <a href="bmh_undocumented?cl=9919#MakeBitmapShader">SkShader::MakeBitmapShader</a> with +<a href="bmh_undocumented?cl=9919#kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the bitmap's edge color when it samples +outside of its bounds. ### Parameters <table> <tr> <td><code><strong>image </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing pixels, dimensions, and format</td> </tr> <tr> <td><code><strong>lattice </strong></code></td> <td> -Division of bitmap into fixed and variable rectangles.</td> +division of bitmap into fixed and variable rectangles</td> </tr> <tr> <td><code><strong>dst </strong></code></td> <td> -Destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to.</td> +destination <a href="bmh_undocumented?cl=9919#Rect">Rect</a> of <a href="bmh_SkCanvas_Reference?cl=9919#image">image</a> to draw to</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> containing <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, +and so on; or nullptr</td> </tr> </table> @@ -3917,27 +4177,30 @@ void drawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, </pre> Draw <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>, with origin at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> -draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and its -baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawText">drawText</a> draws filled 12 point black -glyphs. +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. + +<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> +and its baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. + +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on x-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on x-axis</td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on y-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on y-axis</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -3955,28 +4218,32 @@ Start of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on y-axis.</td> void drawString(const char* string, SkScalar x, SkScalar y, const SkPaint& paint) </pre> -Draw null terminated <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>, with origin at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -Other values of <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired results, since -zero bytes may be embedded in the <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> -draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and its -baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. +Draw null terminated <a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a>, with origin at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawString">drawString</a> draws filled 12 point black -glyphs. +<a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. Other values of <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired +results, since zero bytes may be embedded in the <a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a>. + +<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default +<a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a> draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> +and its baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. + +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to text. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>string </strong></code></td> <td> -Character code points or glyphs drawn, ending with a char value of zero.</td> +character code points or glyphs drawn, +ending with a char value of zero</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> on x-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a> on x-axis</td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> on y-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#drawString">string</a> on y-axis</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +text size, blend, color, and so on, used to draw</td> </tr> </table> @@ -3995,28 +4262,32 @@ void drawString(const SkString& string, SkScalar x, SkScalar y, const SkPaint& paint) </pre> -Draw null terminated <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>, with origin at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -Other values of <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired results, since -zero bytes may be embedded in the <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> -draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and its -baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. +Draw null terminated <a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a>, with origin at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + +<a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. Other values of <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired +results, since zero bytes may be embedded in the <a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawString">drawString</a> draws filled 12 point black -glyphs. +<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> and <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a> meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default +<a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a> draws left to right, positioning the first glyph's left side bearing at <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a> +and its baseline at <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. + +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to text. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>string </strong></code></td> <td> -Character code points or glyphs drawn, ending with a char value of zero.</td> +character code points or glyphs drawn, +ending with a char value of zero</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> on x-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a> on x-axis</td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Start of <a href="bmh_SkCanvas_Reference?cl=9919#string">string</a> on y-axis.</td> +start of <a href="bmh_SkCanvas_Reference?cl=9919#drawString_2">string</a> on y-axis</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +text size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4038,30 +4309,33 @@ void drawPosText(const void* text, size_t byteLength, const SkPoint pos[], const SkPaint& paint) </pre> -Draw each glyph in <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> with the origin in <a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> array, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -The number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> array must match the number of glyphs described by <a href="bmh_SkCanvas_Reference?cl=9919#byteLength">byteLength</a> of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> elements' meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default each -glyph's left side bearing is positioned at x and its -baseline is positioned at y. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. +Draw each glyph in <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> with the origin in <a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> array, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. The number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> array must match the number of glyphs +described by <a href="bmh_SkCanvas_Reference?cl=9919#byteLength">byteLength</a> of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. + +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. <a href="bmh_SkCanvas_Reference?cl=9919#pos">pos</a> elements' meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; +by default each glyph's left side bearing is positioned at x and its +baseline is positioned at y. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and +<a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawPosText">drawPosText</a> draws filled 12 point black -glyphs. +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. -Layout engines such as <a href="bmh_undocumented?cl=9919#Harfbuzz">Harfbuzz</a> typically use <a href="bmh_SkCanvas_Reference?cl=9919#drawPosText">drawPosText</a> to position each glyph +Layout engines such as <a href="bmh_undocumented?cl=9919#Harfbuzz">Harfbuzz</a> typically position each glyph rather than using the font's advance widths. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>pos </strong></code></td> <td> -Array of glyph origins.</td> +array of glyph origins</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4079,32 +4353,36 @@ void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY, const SkPaint& paint) </pre> -Draw each glyph in <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> with its (x, y) origin composed from <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> array and <a href="bmh_SkCanvas_Reference?cl=9919#constY">constY</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -The number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> array must match the number of glyphs described by <a href="bmh_SkCanvas_Reference?cl=9919#byteLength">byteLength</a> of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -pos elements' meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default each -glyph's left side bearing is positioned at an <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> element and its -baseline is positioned at <a href="bmh_SkCanvas_Reference?cl=9919#constY">constY</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. +Draw each glyph in <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> with its (x, y) origin composed from <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> array and +<a href="bmh_SkCanvas_Reference?cl=9919#constY">constY</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. The number of entries in <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> array +must match the number of glyphs described by <a href="bmh_SkCanvas_Reference?cl=9919#byteLength">byteLength</a> of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawPosTextH">drawPosTextH</a> draws filled 12 point black -glyphs. +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. pos elements' meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; +by default each glyph's left side bearing is positioned at an <a href="bmh_SkCanvas_Reference?cl=9919#xpos">xpos</a> element and +its baseline is positioned at <a href="bmh_SkCanvas_Reference?cl=9919#constY">constY</a>. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and +<a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. -Layout engines such as <a href="bmh_undocumented?cl=9919#Harfbuzz">Harfbuzz</a> typically use <a href="bmh_SkCanvas_Reference?cl=9919#drawPosTextH">drawPosTextH</a> to position each glyph -rather than using the font's advance widths if all glyphs share the same baseline. +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. + +Layout engines such as <a href="bmh_undocumented?cl=9919#Harfbuzz">Harfbuzz</a> typically position each glyph +rather than using the font's advance widths if all glyphs share the same +baseline. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>xpos </strong></code></td> <td> -Array of x positions, used to position each glyph.</td> +array of x positions, used to position each glyph</td> </tr> <tr> <td><code><strong>constY </strong></code></td> <td> -Shared y coordinate for all of x positions.</td> +shared y coordinate for all of x positions</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4123,34 +4401,36 @@ void drawTextOnPathHV(const void* text, size_t byteLength, const SkPath& path, </pre> Draw <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -Origin of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is at distance <a href="bmh_SkCanvas_Reference?cl=9919#hOffset">hOffset</a> along the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, offset by a perpendicular vector of -length <a href="bmh_SkCanvas_Reference?cl=9919#vOffset">vOffset</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> section corresponding the glyph advance is curved, the glyph -is drawn curved to match; control points in the glyph are mapped to projected points parallel -to the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s advance is larger than the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> length, the excess <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is clipped. - -<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -Origin meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> -positions the first glyph's left side bearing at origin x and its + +Origin of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is at distance <a href="bmh_SkCanvas_Reference?cl=9919#hOffset">hOffset</a> along the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, offset by a perpendicular +vector of length <a href="bmh_SkCanvas_Reference?cl=9919#vOffset">vOffset</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> section corresponding the glyph advance is +curved, the glyph is drawn curved to match; control points in the glyph are +mapped to projected points parallel to the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s advance is larger +than the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> length, the excess <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is clipped. + +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. Origin meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by +default <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> positions the first glyph's left side bearing at origin x and its baseline at origin y. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawTextOnPathHV">drawTextOnPathHV</a> draws filled 12 point black -glyphs. +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> providing <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> baseline.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> providing <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> baseline</td> </tr> <tr> <td><code><strong>hOffset </strong></code></td> <td> -Distance along <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> to offset origin.</td> +distance along <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> to offset origin</td> </tr> <tr> <td><code><strong>vOffset </strong></code></td> <td> -Offset of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> above (if negative) or below (if positive) the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>.</td> +offset of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> above (if negative) or below (if positive) the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4169,32 +4449,35 @@ void drawTextOnPath(const void* text, size_t byteLength, const SkPath& path, </pre> Draw <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> on <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -Origin of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is at beginning of <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> offset by <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, if provided, before it is mapped to <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. -If the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> section corresponding the glyph advance is curved, the glyph -is drawn curved to match; control points in the glyph are mapped to projected points parallel -to the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s advance is larger than the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> length, the excess <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is clipped. - -<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is <a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. -Origin meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by default <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> -positions the first glyph's left side bearing at origin x and its + +Origin of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is at beginning of <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> offset by <a href="bmh_SkCanvas_Reference?cl=9919#drawTextOnPath">matrix</a>, if provided, before it +is mapped to <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> section corresponding the glyph advance is +curved, the glyph is drawn curved to match; control points in the glyph are +mapped to projected points parallel to the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>. If the <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s advance is larger +than the <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a> length, the excess <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> is clipped. + +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>'s meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Paint Text Encoding</a>; by default, <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> encoding is +<a href="bmh_undocumented?cl=9919#UTF_8">UTF-8</a>. Origin meaning depends on <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a> and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>; by +default <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> positions the first glyph's left side bearing at origin x and its baseline at origin y. <a href="bmh_undocumented?cl=9919#Text">Text</a> size is affected by <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawTextOnPath">drawTextOnPath</a> draws filled 12 point black -glyphs. +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>path </strong></code></td> <td> -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> providing <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> baseline.</td> +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> providing <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> baseline</td> </tr> <tr> <td><code><strong>matrix </strong></code></td> <td> -Optional transform of glyphs before mapping to <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>; or nullptr.</td> +transform of glyphs before mapping to <a href="bmh_SkCanvas_Reference?cl=9919#path">path</a>; may be nullptr +to use identity <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>.</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4215,28 +4498,29 @@ void drawTextRSXform(const void* text, size_t byteLength, Draw <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>, transforming each glyph by the corresponding <a href="bmh_undocumented?cl=9919#SkRSXform">SkRSXform</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> array specifies a separate square scale, rotation, and translation for each glyph. -Optional <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>, -taking into account <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> and <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, canvas can -skip drawing. -All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, <a href="bmh_SkCanvas_Reference?cl=9919#drawTextRSXform">drawTextRSXform</a> draws filled 12 point black -glyphs. +Optional <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>, taking into account +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> and <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, canvas can skip drawing. + +All elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, +<a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a>. By default, draws +filled 12 point black glyphs. ### Parameters <table> <tr> <td><code><strong>text </strong></code></td> <td> -Character code points or glyphs drawn.</td> +character code points or glyphs drawn</td> </tr> <tr> <td><code><strong>byteLength </strong></code></td> <td> -Byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array.</td> +byte length of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> array</td> </tr> <tr> <td><code><strong>xform </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> rotates, scales, and translates each glyph individually.</td> +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> rotates, scales, and translates each glyph individually</td> </tr> <tr> <td><code><strong>cullRect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> for efficient clipping; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of <a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> for efficient clipping; or nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Text">Text</a> size, blend, color, and so on, used to draw.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#text">text</a> size, blend, color, and so on, used to draw</td> </tr> </table> @@ -4255,10 +4539,12 @@ void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, </pre> Draw <a href="bmh_undocumented?cl=9919#Text_Blob">Text Blob</a> <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a> at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a> contains glyphs, their positions, and <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> attributes specific to text: -<a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Paint Text Scale X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Paint Text Skew X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a>, -<a href="bmh_SkPaint_Reference?cl=9919#Hinting">Paint Hinting</a>, <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Paint Fake Bold</a>, <a href="bmh_SkPaint_Reference?cl=9919#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="bmh_SkPaint_Reference?cl=9919#Full_Hinting_Spacing">Full Hinting Spacing</a>, -<a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Linear_Text">Linear Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Subpixel_Text">Subpixel Text</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>. +<a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Paint Text Scale X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Paint Text Skew X</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a>, <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Paint Hinting</a>, <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Paint Fake Bold</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="bmh_SkPaint_Reference?cl=9919#Full_Hinting_Spacing">Full Hinting Spacing</a>, <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Linear_Text">Linear Text</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Subpixel_Text">Subpixel Text</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>. Elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>. @@ -4266,13 +4552,13 @@ Elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="b ### Parameters <table> <tr> <td><code><strong>blob </strong></code></td> <td> -Glyphs, positions, and their paints' text size, typeface, and so on.</td> +glyphs, positions, and their paints' text size, typeface, and so on</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Horizontal offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>.</td> +horizontal offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a></td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Vertical offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>.</td> +vertical offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Blend, color, stroking, and so on, used to draw.</td> +blend, color, stroking, and so on, used to draw</td> </tr> </table> @@ -4288,10 +4574,12 @@ void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, </pre> Draw <a href="bmh_undocumented?cl=9919#Text_Blob">Text Blob</a> <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a> at (<a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>, <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>), using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. + <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a> contains glyphs, their positions, and <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> attributes specific to text: -<a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Paint Text Scale X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Paint Text Skew X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a>, -<a href="bmh_SkPaint_Reference?cl=9919#Hinting">Paint Hinting</a>, <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Paint Fake Bold</a>, <a href="bmh_SkPaint_Reference?cl=9919#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="bmh_SkPaint_Reference?cl=9919#Full_Hinting_Spacing">Full Hinting Spacing</a>, -<a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Linear_Text">Linear Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Subpixel_Text">Subpixel Text</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>. +<a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Paint Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Paint Text Scale X</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Paint Text Skew X</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Paint Text Align</a>, <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Paint Hinting</a>, <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Paint Fake Bold</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="bmh_SkPaint_Reference?cl=9919#Full_Hinting_Spacing">Full Hinting Spacing</a>, <a href="bmh_SkPaint_Reference?cl=9919#LCD_Text">LCD Text</a>, <a href="bmh_SkPaint_Reference?cl=9919#Linear_Text">Linear Text</a>, +<a href="bmh_SkPaint_Reference?cl=9919#Subpixel_Text">Subpixel Text</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Vertical_Text">Paint Vertical Text</a>. Elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>; apply to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>. @@ -4299,13 +4587,13 @@ Elements of <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>: <a href="b ### Parameters <table> <tr> <td><code><strong>blob </strong></code></td> <td> -Glyphs, positions, and their paints' text size, typeface, and so on.</td> +glyphs, positions, and their paints' text size, typeface, and so on</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Horizontal offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>.</td> +horizontal offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a></td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Vertical offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a>.</td> +vertical offset applied to <a href="bmh_SkCanvas_Reference?cl=9919#blob">blob</a></td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Blend, color, stroking, and so on, used to draw.</td> +blend, color, stroking, and so on, used to draw</td> </tr> </table> @@ -4332,7 +4620,7 @@ Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanva ### Parameters <table> <tr> <td><code><strong>picture </strong></code></td> <td> -Recorded drawing commands to play.</td> +recorded drawing commands to play</td> </tr> </table> @@ -4355,7 +4643,7 @@ Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanva ### Parameters <table> <tr> <td><code><strong>picture </strong></code></td> <td> -Recorded drawing commands to play.</td> +recorded drawing commands to play</td> </tr> </table> @@ -4370,9 +4658,9 @@ void drawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint) </pre> -Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>; -transforming <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a> with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, if provided; -and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, if provided. +Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>; transforming <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a> with +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, if provided; and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, +<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, if provided. <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> transformation is equivalent to: <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawPicture">drawPicture</a>, <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> use is equivalent to: <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawPicture">drawPicture</a>, <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. @@ -4380,11 +4668,11 @@ and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkC ### Parameters <table> <tr> <td><code><strong>picture </strong></code></td> <td> -Recorded drawing commands to play.</td> +recorded drawing commands to play</td> </tr> <tr> <td><code><strong>matrix </strong></code></td> <td> -Optional <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> to rotate, scale, translate, and so on; or nullptr.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> to rotate, scale, translate, and so on; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to apply transparency, filtering, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to apply transparency, filtering, and so on; may be nullptr</td> </tr> </table> @@ -4399,9 +4687,9 @@ void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint) </pre> -Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>; -transforming <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a> with <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, if provided; -and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, if provided. +Draw <a href="bmh_undocumented?cl=9919#Picture">Picture</a> <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>; transforming <a href="bmh_SkCanvas_Reference?cl=9919#picture">picture</a> with +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a>, if provided; and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, +<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, if provided. <a href="bmh_SkCanvas_Reference?cl=9919#matrix">matrix</a> transformation is equivalent to: <a href="bmh_SkCanvas_Reference?cl=9919#save">save</a>, <a href="bmh_SkCanvas_Reference?cl=9919#concat">concat</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawPicture">drawPicture</a>, <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> use is equivalent to: <a href="bmh_SkCanvas_Reference?cl=9919#saveLayer">saveLayer</a>, <a href="bmh_SkCanvas_Reference?cl=9919#drawPicture">drawPicture</a>, <a href="bmh_SkCanvas_Reference?cl=9919#restore">restore</a>. @@ -4409,11 +4697,11 @@ and use <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkC ### Parameters <table> <tr> <td><code><strong>picture </strong></code></td> <td> -Recorded drawing commands to play.</td> +recorded drawing commands to play</td> </tr> <tr> <td><code><strong>matrix </strong></code></td> <td> -Optional <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> to rotate, scale, translate, and so on; or nullptr.</td> +<a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a> to rotate, scale, translate, and so on; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to apply transparency, filtering, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to apply transparency, filtering, and so on; may be nullptr</td> </tr> </table> @@ -4432,17 +4720,17 @@ void drawVertices(const SkVertices* vertices, SkBlendMode mode, </pre> Draw <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, a triangle mesh, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -If <a href="bmh_undocumented?cl=9919#Texs">Vertices Texs</a> and <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> are defined in <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, -<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_undocumented?cl=9919#Texs">Vertices Texs</a> and <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> are defined in <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> +contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. ### Parameters <table> <tr> <td><code><strong>vertices </strong></code></td> <td> -The triangle mesh to draw.</td> +triangle mesh to draw</td> </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -Combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, if both are present.</td> +combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, if both are present</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Specifies the <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, used as <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> texture, if present.</td> +specifies the <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, used as <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> texture; may be nullptr</td> </tr> </table> @@ -4458,17 +4746,17 @@ void drawVertices(const sk_sp<SkVertices>& vertices, SkBlendMode mode, </pre> Draw <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, a triangle mesh, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>. -If <a href="bmh_undocumented?cl=9919#Texs">Vertices Texs</a> and <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> are defined in <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, -<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. +If <a href="bmh_undocumented?cl=9919#Texs">Vertices Texs</a> and <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> are defined in <a href="bmh_SkCanvas_Reference?cl=9919#vertices">vertices</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> +contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>. ### Parameters <table> <tr> <td><code><strong>vertices </strong></code></td> <td> -The triangle mesh to draw.</td> +triangle mesh to draw</td> </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -Combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, if both are present.</td> +combines <a href="bmh_undocumented?cl=9919#Colors">Vertices Colors</a> with <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, if both are present</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -Specifies the <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, used as <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> texture, if present.</td> +specifies the <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, used as <a href="bmh_undocumented?cl=9919#Vertices">Vertices</a> texture, may be nullptr</td> </tr> </table> @@ -4487,25 +4775,38 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPaint& paint) </pre> -Draw a cubic <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch: the interpolation of four <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">cubics</a> with shared corners, +Draw a cubic <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch: the interpolation of four <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> with shared corners, associating a color, and optionally a texture coordinate, with each corner. -The <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch uses <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>'s <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. If <a href="bmh_undocumented?cl=9919#Shader">Shader</a> is provided it is treated as the <a href="bmh_undocumented?cl=9919#Coons">Coons</a> -patch texture; <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Color">Color</a> <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">colors</a> and <a href="bmh_undocumented?cl=9919#Shader">Shader</a> if both are provided. +The <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch uses <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>'s <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, +<a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. If <a href="bmh_undocumented?cl=9919#Shader">Shader</a> is provided it is treated +as the <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch texture; <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> <a href="bmh_SkCanvas_Reference?cl=9919#mode">mode</a> combines <a href="bmh_undocumented?cl=9919#Color">Color</a> <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and <a href="bmh_undocumented?cl=9919#Shader">Shader</a> if +both are provided. + +<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> specifies four <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> starting at the top left corner, +in clockwise order, sharing every fourth point. The last cubic ends at the +first point. + +<a href="bmh_undocumented?cl=9919#Color">Color</a> array color associates <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> with corners in top left, top right, +bottom right, bottom left order. + +If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">texCoords</a> maps <a href="bmh_undocumented?cl=9919#Shader">Shader</a> as texture to +corners in top left, top right, bottom right, bottom left order. ### Parameters <table> <tr> <td><code><strong>cubics </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">cubics</a> specifying the four <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">cubics</a> starting at the top left corner,</td> +Cubic array, sharing common points</td> </tr> <tr> <td><code><strong>colors </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Color">Color</a> array color associating <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">colors</a> with corners in top left, top right, bottom right,</td> +<a href="bmh_undocumented?cl=9919#Color">Color</a> array, one for each corner</td> </tr> <tr> <td><code><strong>texCoords </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">texCoords</a> mapping <a href="bmh_undocumented?cl=9919#Shader">Shader</a> as texture to corners in same order, if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a></td> - </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> for <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch">colors</a> and <a href="bmh_undocumented?cl=9919#Shader">Shader</a> if present.</td> +<a href="bmh_undocumented?cl=9919#Point">Point</a> array of texure coordinates, mapping <a href="bmh_undocumented?cl=9919#Shader">Shader</a> to corners; +may be nullptr</td> + </tr> +# <tr> <td><code><strong>mode </strong></code></td> <td> +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> for <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a>, and for <a href="bmh_undocumented?cl=9919#Shader">Shader</a> if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> has one</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, used to draw.</td> +<a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, used to draw</td> </tr> </table> @@ -4520,23 +4821,36 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], const SkPaint& paint) </pre> -Draw a cubic <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch: the interpolation of four <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">cubics</a> with shared corners, -associating a color, a texture coordinate, or both, with each corner. +Draw a cubic <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch: the interpolation of four <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> with shared corners, +associating a color, and optionally a texture coordinate, with each corner. + +The <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch uses <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>'s <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, +<a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. If <a href="bmh_undocumented?cl=9919#Shader">Shader</a> is provided it is treated +as the <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch texture; <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> mode combines <a href="bmh_undocumented?cl=9919#Color">Color</a> <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and <a href="bmh_undocumented?cl=9919#Shader">Shader</a> if +both are provided. -The <a href="bmh_undocumented?cl=9919#Coons">Coons</a> patch uses <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> and <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>'s <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, -<a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, (?) and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. If <a href="bmh_undocumented?cl=9919#Shader">Shader</a> is provided it is treated as the <a href="bmh_undocumented?cl=9919#Coons">Coons</a> -patch texture. +<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> specifies four <a href="bmh_SkCanvas_Reference?cl=9919#cubics">cubics</a> starting at the top left corner, +in clockwise order, sharing every fourth point. The last cubic ends at the +first point. + +<a href="bmh_undocumented?cl=9919#Color">Color</a> array color associates <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> with corners in top left, top right, +bottom right, bottom left order. + +If <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> contains <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">texCoords</a> maps <a href="bmh_undocumented?cl=9919#Shader">Shader</a> as texture to +corners in top left, top right, bottom right, bottom left order. ### Parameters <table> <tr> <td><code><strong>cubics </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">cubics</a> specifying the four <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">cubics</a> starting at the top left corner,</td> +Cubic array, sharing common points</td> </tr> <tr> <td><code><strong>colors </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Color">Color</a> array color associating <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">colors</a> with corners in top left, top right, bottom right,</td> +<a href="bmh_undocumented?cl=9919#Color">Color</a> array, one for each corner</td> </tr> <tr> <td><code><strong>texCoords </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Point">Point</a> array <a href="bmh_SkCanvas_Reference?cl=9919#drawPatch_2">texCoords</a> mapping <a href="bmh_undocumented?cl=9919#Shader">Shader</a> as texture to corners in same order, if <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a></td> - </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, used to draw.</td> +<a href="bmh_undocumented?cl=9919#Point">Point</a> array of texure coordinates, mapping <a href="bmh_undocumented?cl=9919#Shader">Shader</a> to corners; +may be nullptr</td> + </tr> +# <tr> <td><code><strong>paint </strong></code></td> <td> +<a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, used to draw</td> </tr> </table> @@ -4560,32 +4874,33 @@ void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[] </pre> Draw a set of sprites from <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> to draw, if present. -For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it -into destination space. +<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> +to draw, if present. For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in +<a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it into destination space. + <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a>, text, and <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> if present, must contain <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> entries. -Optional <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> is applied for each sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. +Optional <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> are applied for each sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. Optional <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of all transformed sprites. If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, canvas can skip drawing. ### Parameters <table> <tr> <td><code><strong>atlas </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites</td> </tr> <tr> <td><code><strong>xform </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>tex </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>colors </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Color">Color</a>, one per sprite, blended with sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Color">Color</a>, one per sprite, blended with sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>; may be nullptr</td> </tr> <tr> <td><code><strong>count </strong></code></td> <td> -Number of sprites to draw.</td> +number of sprites to draw</td> </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> combining <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and sprites.</td> +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> combining <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and sprites</td> </tr> <tr> <td><code><strong>cullRect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; may be nullptr</td> </tr> </table> @@ -4602,9 +4917,10 @@ void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[], </pre> Draw a set of sprites from <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> to draw, if present. -For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it -into destination space. +<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> +to draw, if present. For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in +<a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it into destination space. + <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a>, text, and <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> if present, must contain <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> entries. Optional <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> is applied for each sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. Optional <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of all transformed sprites. @@ -4613,21 +4929,21 @@ If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> ### Parameters <table> <tr> <td><code><strong>atlas </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites</td> </tr> <tr> <td><code><strong>xform </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>tex </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>colors </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Color">Color</a>, one per sprite, blended with sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Color">Color</a>, one per sprite, blended with sprite using <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>; may be nullptr</td> </tr> <tr> <td><code><strong>count </strong></code></td> <td> -Number of sprites to draw.</td> +number of sprites to draw</td> </tr> <tr> <td><code><strong>mode </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> combining <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and sprites.</td> +<a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> combining <a href="bmh_SkCanvas_Reference?cl=9919#colors">colors</a> and sprites</td> </tr> <tr> <td><code><strong>cullRect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; may be nullptr</td> </tr> </table> @@ -4643,9 +4959,10 @@ void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[] </pre> Draw a set of sprites from <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> to draw, if present. -For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it -into destination space. +<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> +to draw, if present. For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in +<a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it into destination space. + <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> and text must contain <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> entries. Optional <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of all transformed sprites. If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, canvas can skip drawing. @@ -4653,17 +4970,17 @@ If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> ### Parameters <table> <tr> <td><code><strong>atlas </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites</td> </tr> <tr> <td><code><strong>xform </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>tex </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>count </strong></code></td> <td> -Number of sprites to draw.</td> +number of sprites to draw</td> </tr> <tr> <td><code><strong>cullRect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; may be nullptr</td> </tr> </table> @@ -4680,9 +4997,10 @@ void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[], </pre> Draw a set of sprites from <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, using <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, <a href="bmh_SkCanvas_Reference?cl=9919#Matrix">Matrix</a>, and optional <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a>. -<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> to draw, if present. -For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it -into destination space. +<a href="bmh_SkCanvas_Reference?cl=9919#paint">paint</a> uses <a href="bmh_SkPaint_Reference?cl=9919#Anti_alias">Anti-alias</a>, <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, and <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> +to draw, if present. For each entry in the array, <a href="bmh_undocumented?cl=9919#Rect">Rect</a> <a href="bmh_SkCanvas_Reference?cl=9919#tex">tex</a> locates sprite in +<a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>, and <a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> transforms it into destination space. + <a href="bmh_SkCanvas_Reference?cl=9919#xform">xform</a> and text must contain <a href="bmh_SkCanvas_Reference?cl=9919#count">count</a> entries. Optional <a href="bmh_SkCanvas_Reference?cl=9919#cullRect">cullRect</a> is a conservative bounds of all transformed sprites. If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a>, canvas can skip drawing. @@ -4690,17 +5008,17 @@ If cullrect is outside of <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> ### Parameters <table> <tr> <td><code><strong>atlas </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites.</td> +<a href="bmh_undocumented?cl=9919#Image">Image</a> containing sprites</td> </tr> <tr> <td><code><strong>xform </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#RSXform">RSXform</a> mappings for sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>tex </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a>.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> locations of sprites in <a href="bmh_SkCanvas_Reference?cl=9919#atlas">atlas</a></td> </tr> <tr> <td><code><strong>count </strong></code></td> <td> -Number of sprites to draw.</td> +number of sprites to draw</td> </tr> <tr> <td><code><strong>cullRect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; or nullptr.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> bounds of transformed sprites for efficient clipping; may be nullptr</td> </tr> <tr> <td><code><strong>paint </strong></code></td> <td> -<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; or nullptr.</td> +<a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>, <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>, and so on; may be nullptr</td> </tr> </table> @@ -4728,9 +5046,9 @@ immediate drawing, call <a href="bmh_undocumented?cl=9919#draw">SkDrawable::draw ### Parameters <table> <tr> <td><code><strong>drawable </strong></code></td> <td> -Custom struct encapsulating drawing commands.</td> +custom struct encapsulating drawing commands</td> </tr> <tr> <td><code><strong>matrix </strong></code></td> <td> -Transformation applied to drawing; or nullptr.</td> +transformation applied to drawing; may be nullptr</td> </tr> </table> @@ -4754,11 +5072,11 @@ immediate drawing, call <a href="bmh_undocumented?cl=9919#draw">SkDrawable::draw ### Parameters <table> <tr> <td><code><strong>drawable </strong></code></td> <td> -Custom struct encapsulating drawing commands.</td> +custom struct encapsulating drawing commands</td> </tr> <tr> <td><code><strong>x </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#x">x</a></td> </tr> <tr> <td><code><strong>y </strong></code></td> <td> -Offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a>.</td> +offset into <a href="bmh_SkCanvas_Reference?cl=9919#Canvas">Canvas</a> writable pixels in <a href="bmh_SkCanvas_Reference?cl=9919#y">y</a></td> </tr> </table> @@ -4784,11 +5102,11 @@ Only some canvas implementations, such as recording to <a href="bmh_undocumented ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> extent of canvas to annotate.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> extent of canvas to annotate</td> </tr> <tr> <td><code><strong>key </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#String">String</a> used for lookup.</td> +string used for lookup</td> </tr> <tr> <td><code><strong>value </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Data">Data</a> holding <a href="bmh_SkCanvas_Reference?cl=9919#value">value</a> stored in annotation.</td> +data holding <a href="bmh_SkCanvas_Reference?cl=9919#value">value</a> stored in annotation</td> </tr> </table> @@ -4812,11 +5130,11 @@ Only some canvas implementations, such as recording to <a href="bmh_undocumented ### Parameters <table> <tr> <td><code><strong>rect </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Rect">Rect</a> extent of canvas to annotate.</td> +<a href="bmh_undocumented?cl=9919#Rect">Rect</a> extent of canvas to annotate</td> </tr> <tr> <td><code><strong>key </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#String">String</a> used for lookup.</td> +string used for lookup</td> </tr> <tr> <td><code><strong>value </strong></code></td> <td> -<a href="bmh_undocumented?cl=9919#Data">Data</a> holding <a href="bmh_SkCanvas_Reference?cl=9919#value">value</a> stored in annotation.</td> +data holding <a href="bmh_SkCanvas_Reference?cl=9919#value">value</a> stored in annotation</td> </tr> </table> @@ -4857,13 +5175,13 @@ virtual bool isClipEmpty() const Returns true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is empty; that is, nothing will draw. -<a href="bmh_SkCanvas_Reference?cl=9919#isClipEmpty">isClipEmpty</a> may do work when called; it should not be called +May do work when called; it should not be called more often than needed. However, once called, subsequent calls perform no work until <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> changes. ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is empty. +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is empty ### Example @@ -4892,7 +5210,7 @@ Returns false if the clip is empty, or if it is not <a href="bmh_undocumented?cl ### Return Value -true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is <a href="bmh_undocumented?cl=9919#Rect">Rect</a> and not empty. +true if <a href="bmh_SkCanvas_Reference?cl=9919#Clip">Clip</a> is <a href="bmh_undocumented?cl=9919#Rect">Rect</a> and not empty ### Example diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md index ae938fbffe..52ab245f55 100644 --- a/site/user/api/SkPaint_Reference.md +++ b/site/user/api/SkPaint_Reference.md @@ -21,7 +21,8 @@ algorithms that alter the drawing geometry, color, and transparency. For instanc The objects contained by <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> are opaque, and cannot be edited outside of the <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> to affect it. The implementation is free to defer computations associated with the <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a>, or ignore them altogether. For instance, some <a href="bmh_undocumented?cl=9919#GPU">GPU</a> implementations draw all -<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> geometries with anti-aliasing, regardless of <a href="bmh_SkPaint_Reference?cl=9919#kAntiAlias_Flag">SkPaint::kAntiAlias Flag</a> setting. +<a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> geometries with anti-aliasing, regardless of how <a href="bmh_SkPaint_Reference?cl=9919#kAntiAlias_Flag">SkPaint::kAntiAlias Flag</a> +is set in <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a>. <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> describes a single color, a single font, a single image quality, and so on. Multiple colors are drawn either by using multiple paints or with objects like @@ -291,7 +292,8 @@ SkPaint(const SkPaint& paint) Makes a shallow copy of <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a>. <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, and <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> are shared -between the original <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> and the copy. These objects' <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> are increased. +between the original <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> and the copy. Objects containing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> increment +their references by one. The referenced objects <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, and <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> cannot be modified after they are created. @@ -395,7 +397,7 @@ paint1 == paint2 Decreases <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> of owned objects: <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, and <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a>. If the -objects' reference count goes to zero, they are deleted. +objects containing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> go to zero, they are deleted. --- @@ -410,10 +412,10 @@ SkPaint& operator=(const SkPaint& paint) Makes a shallow copy of <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a>. <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>, <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>, <a href="bmh_undocumented?cl=9919#Shader">Shader</a>, <a href="bmh_undocumented?cl=9919#Mask_Filter">Mask Filter</a>, <a href="bmh_undocumented?cl=9919#Color_Filter">Color Filter</a>, <a href="bmh_undocumented?cl=9919#Rasterizer">Rasterizer</a>, <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a>, and <a href="bmh_undocumented?cl=9919#Image_Filter">Image Filter</a> are shared -between the original <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> and the copy. The objects' <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> are in the +between the original <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> and the copy. Objects containing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> in the prior destination are decreased by one, and the referenced objects are deleted if the -resulting count is zero. The objects' <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> in the parameter <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> are increased -by one. <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> is unmodified. +resulting count is zero. Objects containing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> in the parameter <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> +are increased by one. <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> is unmodified. ### Parameters @@ -449,9 +451,9 @@ SkPaint& operator=(SkPaint&& paint) </pre> Moves the <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> to avoid incrementing the reference counts -of objects referenced by the <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> parameter. The objects' <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> are in the -prior destination are decreased by one, and the referenced objects are deleted if the -resulting count is zero. +of objects referenced by the <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> parameter. Objects containing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> in the +prior destination are decreased by one; those objects are deleted if the resulting count +is zero. After the call, <a href="bmh_SkPaint_Reference?cl=9919#paint">paint</a> is undefined, and can be safely destructed. @@ -656,7 +658,7 @@ enum <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> { <a href="bmh_SkPaint_Reference?cl=9919#kNo_Hinting">kNo Hinting</a> = 0, <a href="bmh_SkPaint_Reference?cl=9919#kSlight_Hinting">kSlight Hinting</a> = 1, <a href="bmh_SkPaint_Reference?cl=9919#kNormal_Hinting">kNormal Hinting</a> = 2, -<a href="bmh_SkPaint_Reference?cl=9919#kFull_Hinting">kFull Hinting</a> = 3 +<a href="bmh_SkPaint_Reference?cl=9919#kFull_Hinting">kFull Hinting</a> = 3, };</pre> <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> adjusts the glyph outlines so that the shape provides a uniform @@ -1030,7 +1032,7 @@ Dithering is always enabled for linear gradients drawing into <a href="bmh_SkPaint_Reference?cl=9919#Dither">Dither</a> can be enabled by default by setting <a href="bmh_undocumented?cl=9919#SkPaintDefaults_Flags">SkPaintDefaults Flags</a> to <a href="bmh_SkPaint_Reference?cl=9919#kDither_Flag">kDither Flag</a> at compile time. -Some platform implementations may ignore dithering. Setto ignore <a href="bmh_SkPaint_Reference?cl=9919#Dither">Dither</a> on <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>. +Some platform implementations may ignore dithering. Setto ignore <a href="bmh_SkPaint_Reference?cl=9919#Dither">Dither</a> on <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>. ### Example @@ -1430,7 +1432,7 @@ paint1 == paint2 # <a name="Automatic_Hinting"></a> Automatic Hinting If <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kNormal_Hinting">kNormal Hinting</a> or <a href="bmh_SkPaint_Reference?cl=9919#kFull_Hinting">kFull Hinting</a>, <a href="bmh_SkPaint_Reference?cl=9919#Automatic_Hinting">Automatic Hinting</a> -instructs the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> to always hint Glyphs. +instructs the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> to always hint glyphs. <a href="bmh_SkPaint_Reference?cl=9919#Automatic_Hinting">Automatic Hinting</a> has no effect if <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kNo_Hinting">kNo Hinting</a> or <a href="bmh_SkPaint_Reference?cl=9919#kSlight_Hinting">kSlight Hinting</a>. @@ -1445,7 +1447,7 @@ bool isAutohinted() const If true, and if <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kNormal_Hinting">kNormal Hinting</a> or <a href="bmh_SkPaint_Reference?cl=9919#kFull_Hinting">kFull Hinting</a>, and if platform uses <a href="bmh_undocumented?cl=9919#FreeType">FreeType</a> as the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a>, instruct the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> to always hint -Glyphs. +glyphs. Equivalent to <a href="bmh_SkPaint_Reference?cl=9919#getFlags">getFlags</a> masked with <a href="bmh_SkPaint_Reference?cl=9919#kAutoHinting_Flag">kAutoHinting Flag</a>. @@ -1480,11 +1482,11 @@ void setAutohinted(bool useAutohinter) </pre> If <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kNormal_Hinting">kNormal Hinting</a> or <a href="bmh_SkPaint_Reference?cl=9919#kFull_Hinting">kFull Hinting</a> and <a href="bmh_SkPaint_Reference?cl=9919#useAutohinter">useAutohinter</a> is set, -instruct the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> to always hint Glyphs. +instruct the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> to always hint glyphs. <a href="bmh_SkPaint_Reference?cl=9919#Automatic_Hinting">Automatic Hinting</a> has no effect if <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a> is set to <a href="bmh_SkPaint_Reference?cl=9919#kNo_Hinting">kNo Hinting</a> or <a href="bmh_SkPaint_Reference?cl=9919#kSlight_Hinting">kSlight Hinting</a>. -<a href="bmh_SkPaint_Reference?cl=9919#setAutohinted">setAutohinted</a> only affects platforms that use <a href="bmh_undocumented?cl=9919#FreeType">FreeType</a> as the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a>. +Only affects platforms that use <a href="bmh_undocumented?cl=9919#FreeType">FreeType</a> as the <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a>. Sets <a href="bmh_SkPaint_Reference?cl=9919#kAutoHinting_Flag">kAutoHinting Flag</a> if <a href="bmh_SkPaint_Reference?cl=9919#useAutohinter">useAutohinter</a> is true. Clears <a href="bmh_SkPaint_Reference?cl=9919#kAutoHinting_Flag">kAutoHinting Flag</a> if <a href="bmh_SkPaint_Reference?cl=9919#useAutohinter">useAutohinter</a> is false. @@ -1802,7 +1804,7 @@ void setFilterQuality(SkFilterQuality quality) Sets <a href="bmh_undocumented?cl=9919#Filter_Quality">Filter Quality</a>, the image filtering level. A lower setting draws faster; a higher setting looks better when the image is scaled. -<a href="bmh_SkPaint_Reference?cl=9919#setFilterQuality">setFilterQuality</a> does not check to see if <a href="bmh_SkPaint_Reference?cl=9919#setFilterQuality">quality</a> is valid. +Does not check to see if <a href="bmh_SkPaint_Reference?cl=9919#setFilterQuality">quality</a> is valid. ### Parameters @@ -2111,7 +2113,7 @@ and the set <a href="bmh_SkPath_Reference?cl=9919#Fill_Type">Path Fill Type</a> <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> enum { -<a href="bmh_SkPaint_Reference?cl=9919#kStyleCount">kStyleCount</a> = <a href="bmh_SkPaint_Reference?cl=9919#kStrokeAndFill_Style">kStrokeAndFill Style</a> + 1 +<a href="bmh_SkPaint_Reference?cl=9919#kStyleCount">kStyleCount</a> = <a href="bmh_SkPaint_Reference?cl=9919#kStrokeAndFill_Style">kStrokeAndFill Style</a> + 1, };</pre> ### Constants @@ -2381,7 +2383,7 @@ enum <a href="bmh_SkPaint_Reference?cl=9919#Cap">Cap</a> { <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">kSquare Cap</a>, <a href="bmh_SkPaint_Reference?cl=9919#kLast_Cap">kLast Cap</a> = <a href="bmh_SkPaint_Reference?cl=9919#kSquare_Cap">kSquare Cap</a>, -<a href="bmh_SkPaint_Reference?cl=9919#kDefault_Cap">kDefault Cap</a> = <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">kButt Cap</a> +<a href="bmh_SkPaint_Reference?cl=9919#kDefault_Cap">kDefault Cap</a> = <a href="bmh_SkPaint_Reference?cl=9919#kButt_Cap">kButt Cap</a>, }; static constexpr int <a href="bmh_SkPaint_Reference?cl=9919#kCapCount">kCapCount</a> = <a href="bmh_SkPaint_Reference?cl=9919#kLast_Cap">kLast Cap</a> + 1;</pre> @@ -2525,11 +2527,11 @@ enum <a href="bmh_SkPaint_Reference?cl=9919#Join">Join</a> { <a href="bmh_SkPaint_Reference?cl=9919#kBevel_Join">kBevel Join</a>, <a href="bmh_SkPaint_Reference?cl=9919#kLast_Join">kLast Join</a> = <a href="bmh_SkPaint_Reference?cl=9919#kBevel_Join">kBevel Join</a>, -<a href="bmh_SkPaint_Reference?cl=9919#kDefault_Join">kDefault Join</a> = <a href="bmh_SkPaint_Reference?cl=9919#kMiter_Join">kMiter Join</a> +<a href="bmh_SkPaint_Reference?cl=9919#kDefault_Join">kDefault Join</a> = <a href="bmh_SkPaint_Reference?cl=9919#kMiter_Join">kMiter Join</a>, }; static constexpr int <a href="bmh_SkPaint_Reference?cl=9919#kJoinCount">kJoinCount</a> = <a href="bmh_SkPaint_Reference?cl=9919#kLast_Join">kLast Join</a> + 1;</pre> -<a href="bmh_SkPaint_Reference?cl=9919#Join">Join</a> specifies how corners are drawn when a shape is stroked. The paint's <a href="bmh_SkPaint_Reference?cl=9919#Join">Join</a> setting +<a href="bmh_SkPaint_Reference?cl=9919#Join">Join</a> specifies how corners are drawn when a shape is stroked. <a href="bmh_SkPaint_Reference?cl=9919#Join">Join</a> affects the four corners of a stroked rectangle, and the connected segments in a stroked path. @@ -2621,7 +2623,7 @@ The geometry drawn at the corners of strokes. <table> <tr> <td><code><strong>join </strong></code></td> <td> one of: <a href="bmh_SkPaint_Reference?cl=9919#kMiter_Join">kMiter Join</a>, <a href="bmh_SkPaint_Reference?cl=9919#kRound_Join">kRound Join</a>, <a href="bmh_SkPaint_Reference?cl=9919#kBevel_Join">kBevel Join</a>; -otherwise, <a href="bmh_SkPaint_Reference?cl=9919#setStrokeJoin">setStrokeJoin</a> has no effect</td> +otherwise, has no effect</td> </tr> </table> @@ -2954,7 +2956,7 @@ SkBlendMode getBlendMode() const </pre> Returns <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a>. -By default, <a href="bmh_SkPaint_Reference?cl=9919#getBlendMode">getBlendMode</a> returns <a href="bmh_undocumented?cl=9919#kSrcOver">SkBlendMode::kSrcOver</a>. +By default, returns <a href="bmh_undocumented?cl=9919#kSrcOver">SkBlendMode::kSrcOver</a>. ### Return Value @@ -3610,7 +3612,7 @@ void setDrawLooper(sk_sp<SkDrawLooper> drawLooper) Sets <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a> to <a href="bmh_SkPaint_Reference?cl=9919#drawLooper">drawLooper</a>, decrementing <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a> of the previous <a href="bmh_SkPaint_Reference?cl=9919#drawLooper">drawLooper</a>. Pass nullptr to clear <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a> and leave <a href="bmh_undocumented?cl=9919#Draw_Looper">Draw Looper</a> effect on drawing unaltered. -<a href="bmh_SkPaint_Reference?cl=9919#setDrawLooper">setDrawLooper</a> does not alter <a href="bmh_SkPaint_Reference?cl=9919#drawLooper">drawLooper</a> <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a>. +Does not alter <a href="bmh_SkPaint_Reference?cl=9919#drawLooper">drawLooper</a> <a href="bmh_undocumented?cl=9919#Reference_Count">Reference Count</a>. ### Parameters @@ -3695,7 +3697,7 @@ and by its height if <a href="bmh_SkPaint_Reference?cl=9919#Flags">Flags</a> has <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> enum { -<a href="bmh_SkPaint_Reference?cl=9919#kAlignCount">kAlignCount</a> = 3 +<a href="bmh_SkPaint_Reference?cl=9919#kAlignCount">kAlignCount</a> = 3, };</pre> ### Constants @@ -3936,7 +3938,7 @@ enum <a href="bmh_SkPaint_Reference?cl=9919#TextEncoding">TextEncoding</a> { <a href="bmh_SkPaint_Reference?cl=9919#kUTF8_TextEncoding">kUTF8 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF16_TextEncoding">kUTF16 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF32_TextEncoding">kUTF32 TextEncoding</a>, -<a href="bmh_SkPaint_Reference?cl=9919#kGlyphID_TextEncoding">kGlyphID TextEncoding</a> +<a href="bmh_SkPaint_Reference?cl=9919#kGlyphID_TextEncoding">kGlyphID TextEncoding</a>, };</pre> <a href="bmh_SkPaint_Reference?cl=9919#TextEncoding">TextEncoding</a> determines whether text specifies character codes and their encoded size, @@ -4026,8 +4028,11 @@ Invalid values for <a href="bmh_SkPaint_Reference?cl=9919#setTextEncoding">encod ### Parameters <table> <tr> <td><code><strong>encoding </strong></code></td> <td> -one of: <a href="bmh_SkPaint_Reference?cl=9919#kUTF8_TextEncoding">kUTF8 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF16_TextEncoding">kUTF16 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF32_TextEncoding">kUTF32 TextEncoding</a>, or</td> +one of: <a href="bmh_SkPaint_Reference?cl=9919#kUTF8_TextEncoding">kUTF8 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF16_TextEncoding">kUTF16 TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#kUTF32_TextEncoding">kUTF32 TextEncoding</a>, or +<a href="bmh_SkPaint_Reference?cl=9919#kGlyphID_TextEncoding">kGlyphID TextEncoding</a></td> </tr> +# + </table> ### Example @@ -4370,7 +4375,7 @@ Returns the recommended spacing between lines: the sum of metrics descent, ascent, and leading. Result is scaled by <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Text Size</a> but does not take into account dimensions required by stroking and <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>. -<a href="bmh_SkPaint_Reference?cl=9919#getFontSpacing">getFontSpacing</a> returns the same result as <a href="bmh_SkPaint_Reference?cl=9919#getFontMetrics">getFontMetrics</a>. +Returns the same result as <a href="bmh_SkPaint_Reference?cl=9919#getFontMetrics">getFontMetrics</a>. ### Return Value @@ -4402,11 +4407,11 @@ SkRect getFontBounds() const Returns the union of bounds of all glyphs. Returned dimensions are computed by <a href="bmh_undocumented?cl=9919#Font_Manager">Font Manager</a> from font data, -ignoring <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a>. <a href="bmh_SkPaint_Reference?cl=9919#getFontBounds">getFontBounds</a> includes <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Text Scale X</a>, +ignoring <a href="bmh_SkPaint_Reference?cl=9919#Hinting">Hinting</a>. Includes <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Text Scale X</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Text Skew X</a>, but not <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Fake Bold</a> or <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a>. If <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Text Size</a> is large, <a href="bmh_SkPaint_Reference?cl=9919#Text_Scale_X">Text Scale X</a> is one, and <a href="bmh_SkPaint_Reference?cl=9919#Text_Skew_X">Text Skew X</a> is zero, -<a href="bmh_SkPaint_Reference?cl=9919#getFontBounds">getFontBounds</a> returns the same bounds as <a href="bmh_SkPaint_Reference?cl=9919#Font_Metrics">Font Metrics</a> { <a href="bmh_SkPaint_Reference?cl=9919#FontMetrics_fXMin">FontMetrics::fXMin</a>, +returns the same bounds as <a href="bmh_SkPaint_Reference?cl=9919#Font_Metrics">Font Metrics</a> { <a href="bmh_SkPaint_Reference?cl=9919#FontMetrics_fXMin">FontMetrics::fXMin</a>, <a href="bmh_SkPaint_Reference?cl=9919#FontMetrics_fTop">FontMetrics::fTop</a>, <a href="bmh_SkPaint_Reference?cl=9919#FontMetrics_fXMax">FontMetrics::fXMax</a>, <a href="bmh_SkPaint_Reference?cl=9919#FontMetrics_fBottom">FontMetrics::fBottom</a> }. ### Return Value @@ -4443,7 +4448,7 @@ Returns the number of glyph indices represented by <a href="bmh_SkPaint_Referenc Does not check <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> for valid character encoding or valid glyph indices. -If <a href="bmh_SkPaint_Reference?cl=9919#byteLength">byteLength</a> equals zero, <a href="bmh_SkPaint_Reference?cl=9919#textToGlyphs">textToGlyphs</a> returns zero. +If <a href="bmh_SkPaint_Reference?cl=9919#byteLength">byteLength</a> equals zero, returns zero. If <a href="bmh_SkPaint_Reference?cl=9919#byteLength">byteLength</a> includes a partial character, the partial character is ignored. If <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Text Encoding</a> is <a href="bmh_SkPaint_Reference?cl=9919#kUTF8_TextEncoding">kUTF8 TextEncoding</a> and @@ -4519,8 +4524,8 @@ Returns true if all <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> corres Returns false if any characters in <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> are not supported in <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>. -If <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Text Encoding</a> is <a href="bmh_SkPaint_Reference?cl=9919#kGlyphID_TextEncoding">kGlyphID TextEncoding</a>, <a href="bmh_SkPaint_Reference?cl=9919#containsText">containsText</a> -returns true if all glyph indices in <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> are non-zero; <a href="bmh_SkPaint_Reference?cl=9919#containsText">containsText</a> +If <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Text Encoding</a> is <a href="bmh_SkPaint_Reference?cl=9919#kGlyphID_TextEncoding">kGlyphID TextEncoding</a>, +returns true if all glyph indices in <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> are non-zero; does not check to see if <a href="bmh_SkPaint_Reference?cl=9919#text">text</a> contains valid glyph indices for <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a>. Returns true if bytelength is zero. @@ -4784,7 +4789,7 @@ Returns the geometry as <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> equ Uses <a href="bmh_SkPaint_Reference?cl=9919#Text_Encoding">Text Encoding</a> to decode <a href="bmh_SkPaint_Reference?cl=9919#text">text</a>, <a href="bmh_undocumented?cl=9919#Typeface">Typeface</a> to get the glyph paths, and <a href="bmh_SkPaint_Reference?cl=9919#Text_Size">Text Size</a>, <a href="bmh_SkPaint_Reference?cl=9919#Fake_Bold">Fake Bold</a>, and <a href="bmh_undocumented?cl=9919#Path_Effect">Path Effect</a> to scale and modify the glyph paths. All of the glyph paths are stored in <a href="bmh_SkPaint_Reference?cl=9919#path">path</a>. -<a href="bmh_SkPaint_Reference?cl=9919#getTextPath">getTextPath</a> uses <a href="bmh_SkPaint_Reference?cl=9919#x">x</a>, <a href="bmh_SkPaint_Reference?cl=9919#y">y</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Text Align</a> to position <a href="bmh_SkPaint_Reference?cl=9919#path">path</a>. +Uses <a href="bmh_SkPaint_Reference?cl=9919#x">x</a>, <a href="bmh_SkPaint_Reference?cl=9919#y">y</a>, and <a href="bmh_SkPaint_Reference?cl=9919#Text_Align">Text Align</a> to position <a href="bmh_SkPaint_Reference?cl=9919#path">path</a>. ### Parameters @@ -5027,8 +5032,8 @@ number of intersections; may be zero bool nothingToDraw() const </pre> -Returns true if <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> prevents all drawing. -If <a href="bmh_SkPaint_Reference?cl=9919#nothingToDraw">nothingToDraw</a> returns false, the <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> may or may not allow drawing. +Returns true if <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> prevents all drawing; +otherwise, the <a href="bmh_SkPaint_Reference?cl=9919#Paint">Paint</a> may or may not allow drawing. Returns true if <a href="bmh_undocumented?cl=9919#Blend_Mode">Blend Mode</a> and <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a> are enabled, and computed <a href="bmh_undocumented?cl=9919#Alpha">Color Alpha</a> is zero. diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md index c4eb275438..897e92cbff 100644 --- a/site/user/api/SkPath_Reference.md +++ b/site/user/api/SkPath_Reference.md @@ -832,7 +832,7 @@ enum <a href="bmh_SkPath_Reference?cl=9919#Convexity">Convexity</a> { <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> is convex if it contains one <a href="bmh_SkPath_Reference?cl=9919#Contour">Contour</a> and <a href="bmh_SkPath_Reference?cl=9919#Contour">Contour</a> loops no more than 360 degrees, and <a href="bmh_SkPath_Reference?cl=9919#Contour">Contour</a> angles all have same <a href="bmh_SkPath_Reference?cl=9919#Direction">Direction</a>. Convex <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> -may have better performance and require fewer resources on <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a>. +may have better performance and require fewer resources on <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a>. <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> is concave when either at least one <a href="bmh_SkPath_Reference?cl=9919#Direction">Direction</a> change is clockwise and another is counterclockwise, or the sum of the changes in <a href="bmh_SkPath_Reference?cl=9919#Direction">Direction</a> is not 360 @@ -998,7 +998,7 @@ bool isOval(SkRect* rect, Direction* dir = nullptr, unsigned* start = nullptr) c <a href="bmh_SkPath_Reference?cl=9919#addRoundRect">addRoundRect</a>, <a href="bmh_SkPath_Reference?cl=9919#addRRect">addRRect</a>. <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> constructed with <a href="bmh_SkPath_Reference?cl=9919#conicTo">conicTo</a> or <a href="bmh_SkPath_Reference?cl=9919#rConicTo">rConicTo</a> will not return true though <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws <a href="bmh_undocumented?cl=9919#Oval">Oval</a>. -<a href="bmh_SkPath_Reference?cl=9919#isOval">isOval</a> triggers performance optimizations on some <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a> implementations. +<a href="bmh_SkPath_Reference?cl=9919#isOval">isOval</a> triggers performance optimizations on some <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a> implementations. ### Parameters @@ -1039,7 +1039,7 @@ bool isRRect(SkRRect* rrect, Direction* dir = nullptr, unsigned* start = nullptr is not empty, not <a href="bmh_undocumented?cl=9919#Rect">Rect</a>, and not <a href="bmh_undocumented?cl=9919#Oval">Oval</a>. <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> constructed with other other calls will not return true though <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws <a href="bmh_undocumented?cl=9919#Round_Rect">Round Rect</a>. -<a href="bmh_SkPath_Reference?cl=9919#isRRect">isRRect</a> triggers performance optimizations on some <a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a> implementations. +<a href="bmh_SkPath_Reference?cl=9919#isRRect">isRRect</a> triggers performance optimizations on some <a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a> implementations. ### Parameters @@ -1274,8 +1274,8 @@ to inform <a href="bmh_undocumented?cl=9919#Device">Device</a> that the path nee Mark animating <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> volatile to improve performance. Mark unchanging <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> non-volative to improve repeated rendering. -<a href="bmh_undocumented?cl=9919#Raster">Raster Surface</a> <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws are affected by volatile for some shadows. -<a href="bmh_undocumented?cl=9919#GPU">GPU Surface</a> <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws are affected by volatile for some shadows and concave geometries. +<a href="bmh_undocumented?cl=9919#Raster_Surface">Raster Surface</a> <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws are affected by volatile for some shadows. +<a href="bmh_undocumented?cl=9919#GPU_Surface">GPU Surface</a> <a href="bmh_SkPath_Reference?cl=9919#Path">Path</a> draws are affected by volatile for some shadows and concave geometries. ### Parameters diff --git a/site/user/api/undocumented.md b/site/user/api/undocumented.md index 2a50f14246..379c1d4ec1 100644 --- a/site/user/api/undocumented.md +++ b/site/user/api/undocumented.md @@ -1,4 +1,4 @@ -(to be documented) +undocumented === # <a name="Glyph"></a> Glyph @@ -302,6 +302,10 @@ static std::unique_ptr<SkCanvas> # <a name="Font_Manager"></a> Font Manager +# <a name="GPU_Context"></a> GPU Context + +# <a name="GPU_Surface"></a> GPU Surface + # <a name="Image"></a> Image ## <a name="Alpha_Type"></a> Alpha Type @@ -503,6 +507,8 @@ SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL, # <a name="SkPixmap"></a> Class SkPixmap +# <a name="Raster_Surface"></a> Raster Surface + # <a name="Rasterizer"></a> Rasterizer # <a name="SkRasterizer"></a> Class SkRasterizer @@ -596,6 +602,8 @@ static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo&, void* pixels, # <a name="SkSurfaceProps"></a> Class SkSurfaceProps +# <a name="Legacy_Font_Host"></a> Legacy Font Host + ## <a name="SkSurfaceProps::InitType"></a> Enum SkSurfaceProps::InitType ### Constants @@ -607,10 +615,6 @@ static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo&, void* pixels, </table> -## <a name="GPU"></a> GPU - -## <a name="Raster"></a> Raster - # <a name="SVG"></a> SVG ## <a name="Canvas"></a> Canvas diff --git a/site/user/api/usingBookmaker.md b/site/user/api/usingBookmaker.md index d98f52bc79..eb8541b664 100644 --- a/site/user/api/usingBookmaker.md +++ b/site/user/api/usingBookmaker.md @@ -1,4 +1,4 @@ -using Bookmaker +usingBookmaker === # <a name="Bookmaker"></a> Bookmaker @@ -9,10 +9,9 @@ Get the fiddle command line interface tool. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> $ go get go.skia.org/infra/fiddle/go/fiddlecli</pre> -Get the <a href="bmh_usingBookmaker?cl=9919#Bookmaker">Bookmaker</a> <a href="bmh_usingBookmaker?cl=9919#CL">CL</a> and build it. +Build <a href="bmh_usingBookmaker?cl=9919#Bookmaker">Bookmaker</a>. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> -$ git cl patch 9919 $ ninja -<a href="bmh_usingBookmaker?cl=9919#C">C</a> out/dir bookmaker</pre> Generate an starter <a href="bmh_usingBookmaker?cl=9919#Bookmaker">Bookmaker</a> file from an existing include. @@ -22,7 +21,8 @@ out/dir/obj/ from an IDE. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> $ ./out/dir/bookmaker -t -i include/core/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.h</pre> -Use your favorite editor to fill out <a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.bmh. +Copy <a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.bmh to docs. +Use your favorite editor to fill out docs/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.bmh. Generate fiddle.json from all examples, including the ones you just wrote. Error checking is syntatic: starting keywords are closed, keywords have the @@ -31,7 +31,7 @@ If you run <a href="bmh_usingBookmaker?cl=9919#Bookmaker">Bookmaker</a> inside < will take you to the source line in question. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> -$ ./out/dir/bookmaker -e fiddle.json -b current_directory</pre> +$ ./out/dir/bookmaker -e fiddle.json -b docs</pre> Once complete, run fiddlecli to generate the example hashes. Errors are contained by the output but aren't reported yet. @@ -45,35 +45,21 @@ missing or mismatched printf output. Again, you can click on any errors inside <a href="bmh_usingBookmaker?cl=9919#Visual_Studio">Visual Studio</a>. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> -$ ./out/dir/bookmaker -r site/user/api -b current_directory -f fiddleout.json</pre> +$ ./out/dir/bookmaker -r site/user/api -b docs -f fiddleout.json</pre> The original include may have changed since you started creating the markdown. Check to see if it is up to date. This reports if a method no longer exists or its parameters have changed. <pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> -$ ./out/dir/bookmaker -x -b current_directory/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.bmh -i include/core/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.h</pre> - -# <a name="Bugs"></a> Bugs - -<table> -overaggressive reference finding in code block -missing examples -redundant examples -- got tired so used the same one more than once -some examples need vertical resizing -list doesn't work (ironic, huh)</table> - -# <a name="To_Do"></a> To Do - -<table> -check that all methods have one line descriptions in overview -see also -- anything that can be done automatically? maybe any ref shows up everywhere -index by example png -generate pdf or pdf-like out -generate b/w out instead of color -- have b/w versions of examples? -formalize voice / syntax for parts of topic and method -write bmh data back into include -have a way to write one block that covers multiple nearly indentical methods? -may want to do this for pdf view as well -write a one-method-per-page online view?</table> +$ ./out/dir/bookmaker -x -b docs/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.bmh -i include/core/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.h</pre> +Generate an updated include header. +This writes the updated <a href="bmh_undocumented?cl=9919#SkXXX.h">SkXXX.h</a> to the current directory. + +<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0"> +$ ./out/dir/bookmaker -p -b docs -i include/core/<a href="bmh_usingBookmaker?cl=9919#SkXXX">SkXXX</a>.h</pre> + +## <a name="Bugs"></a> Bugs + +<a href="bmh_usingBookmaker?cl=9919#Bookmaker">Bookmaker</a> bugs are trackedherebug.skia.org/6898. |