aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-08-03 17:14:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-03 21:36:08 +0000
commitbad5ad7d601b217396ed17ba914172323d62cfe5 (patch)
tree6bb5437585bb79fb9ec182ae606b77f7c5de0c4d
parent161f9a6dc65ff04bb63ef29815b8af881963571b (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>
-rw-r--r--docs/SkCanvas_Reference.bmh4875
-rw-r--r--docs/SkPaint_Reference.bmh32
-rw-r--r--docs/undocumented.bmh26
-rw-r--r--docs/usingBookmaker.bmh42
-rw-r--r--site/user/api/SkCanvas_Reference.md2074
-rw-r--r--site/user/api/SkPaint_Reference.md75
-rw-r--r--site/user/api/SkPath_Reference.md10
-rw-r--r--site/user/api/undocumented.md14
-rw-r--r--site/user/api/usingBookmaker.md46
-rw-r--r--tools/bookmaker/bookmaker.cpp31
-rw-r--r--tools/bookmaker/bookmaker.h53
-rw-r--r--tools/bookmaker/includeParser.cpp23
-rw-r--r--tools/bookmaker/includeWriter.cpp272
-rw-r--r--tools/bookmaker/mdOut.cpp20
14 files changed, 4254 insertions, 3339 deletions
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index 338f2c3f9d..f5bd893563 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -5,24 +5,23 @@ Canvas provides an interface for drawing, and how the drawing is clipped and tra
Canvas contains a stack of Matrix and Clip values.
Canvas and Paint together provide the state to draw into Surface or Device.
-Each Canvas draw call transforms the geometry of the object by the concatenation of all Matrix
-values in the stack.
-The transformed geometry is clipped by the intersection of all of Clip values in the stack.
-The Canvas draw calls take Paint parameter for drawing state.
-Create Paint to supply the drawing state, such as Color,
-Typeface, Paint_Text_Size, Paint_Stroke_Width, Shader and so on.
+Each Canvas draw call transforms the geometry of the object by the concatenation of all
+Matrix values in the stack. The transformed geometry is clipped by the intersection
+of all of Clip values in the stack. The Canvas draw calls use Paint to supply drawing
+state such as Color, Typeface, text size, stroke width, Shader and so on.
To draw to a pixel-based destination, create Raster_Surface or GPU_Surface.
Request Canvas from Surface to obtain the interface to draw.
Canvas generated by Raster_Surface draws to memory visible to the CPU.
Canvas generated by GPU_Surface uses Vulkan or OpenGL to draw to the GPU.
+To draw to a document, obtain Canvas from SVG_Canvas, Document_PDF, or Picture_Recorder.
+Document-based Canvas and other Canvas subclasses reference Device describing the
+destination.
+
Canvas can be constructed to draw to Bitmap without first creating Raster_Surface.
This approach may be deprecated in the future.
-To draw to a document, obtain Canvas from SVG_Canvas, Document_PDF, or Picture_Recorder.
-Document-based Canvas and other Canvas subclasses reference Device describing the destination.
-
#Class SkCanvas
#Topic Overview
@@ -173,52 +172,57 @@ when no Surface is required, and some helpers implicitly create Raster_Surface.
#Method static std::unique_ptr<SkCanvas> MakeRasterDirect(const SkImageInfo& info,
void* pixels, size_t rowBytes)
-Allocates raster canvas that will draw directly into pixels.
+Allocates raster Canvas that will draw directly into pixels.
To access pixels after drawing, call flush() or peekPixels.
-#Param info Width, height, Image_Color_Type, Image_Alpha_Type, Color_Space, of Raster_Surface.
- Width, or height, or both, may be zero.
+Canvas is returned if all parameters are valid.
+Valid parameters include:
+info dimensions are zero or positive;
+info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
+pixels is not nullptr;
+rowBytes is zero or large enough to contain info width pixels of Image_Color_Type.
+
+pixel buffer size should be info height times rowBytes times bytes required for
+Image_Color_Type.
+
+#Param info width, height, Image_Color_Type, Image_Alpha_Type, Color_Space, of Raster_Surface;
+ width, or height, or both, may be zero
##
-#Param pixels Pointer to destination pixels buffer. Buffer size should be info height
- times rowBytes times bytes required for Image_Color_Type.
+#Param pixels pointer to destination pixels buffer; buffer size should be height
+ times rowBytes times four
##
-#Param rowBytes The interval from one Surface row to the next; equal to or greater than
- info width times bytes required for Image_Color_Type.
+#Param rowBytes interval from one Surface row to the next; equal to or greater than
+ info width times bytes required for Image_Color_Type
##
-#Return Canvas if all parameters are valid; otherwise, nullptr.
- Valid parameters include: info dimensions must be zero or positive, and other checks;
- info must contain Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
- pixels must be not be nullptr;
- rowBytes must be zero or large enough to contain width pixels of Image_Color_Type.
-##
+#Return Canvas if all parameters are valid; otherwise, nullptr ##
#Example
#Description
Allocates a three by three bitmap, clears it to white, and draws a black pixel
in the center.
##
-void draw(SkCanvas* ) {
- SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, premultipled
- const size_t minRowBytes = info.minRowBytes(); // bytes used by one bitmap row
- const size_t size = info.getSafeSize(minRowBytes); // bytes used by all rows
- SkAutoTMalloc<SkPMColor> storage(size); // allocate storage for pixels
- SkPMColor* pixels = storage.get(); // get pointer to allocated storage
- // create a SkCanvas backed by a raster device, and delete it when the
- // function goes out of scope.
- std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirect(info, pixels, minRowBytes);
- canvas->clear(SK_ColorWHITE); // white is unpremultiplied, in ARGB order
- canvas->flush(); // ensure that pixels are cleared
- SkPMColor pmWhite = pixels[0]; // the premultiplied format may vary
- SkPaint paint; // by default, draws black
- canvas->drawPoint(1, 1, paint); // draw in the center
- canvas->flush(); // ensure that point was drawn
- for (int y = 0; y < info.height(); ++y) {
- for (int x = 0; x < info.width(); ++x) {
- SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x');
- }
- SkDebugf("\n");
- }
+void draw(SkCanvas* ) {
+ SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, premultipled
+ const size_t minRowBytes = info.minRowBytes(); // bytes used by one bitmap row
+ const size_t size = info.getSafeSize(minRowBytes); // bytes used by all rows
+ SkAutoTMalloc<SkPMColor> storage(size); // allocate storage for pixels
+ SkPMColor* pixels = storage.get(); // get pointer to allocated storage
+ // create a SkCanvas backed by a raster device, and delete it when the
+ // function goes out of scope.
+ std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirect(info, pixels, minRowBytes);
+ canvas->clear(SK_ColorWHITE); // white is unpremultiplied, in ARGB order
+ canvas->flush(); // ensure that pixels are cleared
+ SkPMColor pmWhite = pixels[0]; // the premultiplied format may vary
+ SkPaint paint; // by default, draws black
+ canvas->drawPoint(1, 1, paint); // draw in the center
+ canvas->flush(); // ensure that point was drawn
+ for (int y = 0; y < info.height(); ++y) {
+ for (int x = 0; x < info.width(); ++x) {
+ SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x');
+ }
+ SkDebugf("\n");
+ }
}
#StdOut
---
@@ -237,25 +241,32 @@ void draw(SkCanvas* ) {
#Method static std::unique_ptr<SkCanvas> MakeRasterDirectN32(int width, int height, SkPMColor* pixels,
size_t rowBytes)
-Creates Canvas with Raster_Surface with inline image specification that draws into pixels.
+Allocates raster Canvas specified by inline image specification. Subsequent Canvas
+calls draw into pixels.
Image_Color_Type is set to kN32_SkColorType.
Image_Alpha_Type is set to kPremul_SkAlphaType.
To access pixels after drawing, call flush() or peekPixels.
-#Param width Pixel column count on Raster_Surface created. Must be zero or greater. ##
-#Param height Pixel row count on Raster_Surface created. Must be zero or greater. ##
-#Param pixels Pointer to destination pixels buffer. Buffer size should be height
- times rowBytes times four.
+Canvas is returned if all parameters are valid.
+Valid parameters include:
+info dimensions are zero or positive;
+info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
+pixels is not nullptr;
+rowBytes is zero or large enough to contain width pixels of Image_Color_Type.
+
+pixel buffer size should be info height times rowBytes times bytes required for
+Image_Color_Type.
+
+#Param width pixel column count on Raster_Surface created; must be zero or greater ##
+#Param height pixel row count on Raster_Surface created.; must be zero or greater ##
+#Param pixels pointer to destination pixels buffer; buffer size should be height
+ times rowBytes times four
##
-#Param rowBytes The interval from one Surface row to the next; equal to or greater than
- width times four.
+#Param rowBytes interval from one Surface row to the next; equal to or greater than
+ width times four
##
-#Return Canvas if all parameters are valid; otherwise, nullptr.
- Valid parameters include: width and height must be zero or positive;
- pixels must be not be nullptr;
- rowBytes must be zero or large enough to contain width pixels of Image_Color_Type.
-##
+#Return Canvas if all parameters are valid; otherwise, nullptr ##
#Example
#Description
@@ -304,7 +315,7 @@ void draw(SkCanvas* ) {
Creates an empty canvas with no backing device/pixels, and zero
dimensions.
-#Return An empty canvas. ##
+#Return empty canvas ##
#Example
@@ -313,30 +324,30 @@ Passes a placeholder to a function that requires one.
##
#Function
-// Returns true if either the canvas rotates the text by 90 degrees, or the paint does.
-static void check_for_up_and_down_text(const SkCanvas* canvas, const SkPaint& paint) {
- bool paintHasVertical = paint.isVerticalText();
- const SkMatrix& matrix = canvas->getTotalMatrix();
- bool matrixIsVertical = matrix.preservesRightAngles() && !matrix.isScaleTranslate();
- SkDebugf("paint draws text %s\n", paintHasVertical != matrixIsVertical ?
- "top to bottom" : "left to right");
-}
-
-static void check_for_up_and_down_text(const SkPaint& paint) {
- SkCanvas canvas; // placeholder only, does not have an associated device
- check_for_up_and_down_text(&canvas, paint);
-}
-
+// Returns true if either the canvas rotates the text by 90 degrees, or the paint does.
+static void check_for_up_and_down_text(const SkCanvas* canvas, const SkPaint& paint) {
+ bool paintHasVertical = paint.isVerticalText();
+ const SkMatrix& matrix = canvas->getTotalMatrix();
+ bool matrixIsVertical = matrix.preservesRightAngles() && !matrix.isScaleTranslate();
+ SkDebugf("paint draws text %s\n", paintHasVertical != matrixIsVertical ?
+ "top to bottom" : "left to right");
+}
+
+static void check_for_up_and_down_text(const SkPaint& paint) {
+ SkCanvas canvas; // placeholder only, does not have an associated device
+ check_for_up_and_down_text(&canvas, paint);
+}
+
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- check_for_up_and_down_text(paint); // paint draws text left to right
- paint.setVerticalText(true);
- check_for_up_and_down_text(paint); // paint draws text top to bottom
- paint.setVerticalText(false);
- canvas->rotate(90);
- check_for_up_and_down_text(canvas, paint); // paint draws text top to bottom
-}
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ check_for_up_and_down_text(paint); // paint draws text left to right
+ paint.setVerticalText(true);
+ check_for_up_and_down_text(paint); // paint draws text top to bottom
+ paint.setVerticalText(false);
+ canvas->rotate(90);
+ check_for_up_and_down_text(canvas, paint); // paint draws text top to bottom
+}
#StdOut
paint draws text left to right
@@ -356,13 +367,19 @@ void draw(SkCanvas* canvas) {
Creates Canvas of the specified dimensions without a Surface.
Used by subclasses with custom implementations for draw methods.
-#Param width Zero or greater. ##
-#Param height Zero or greater. ##
-#Param props The LCD striping orientation and setting for device independent fonts.
- If nullptr, use Legacy_Font_Host settings.
-#Param ##
+If props equals nullptr, Surface_Properties are created with Surface_Properties_Legacy_Font_Host 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.
-#Return Canvas placeholder with dimensions. ##
+#Param width zero or greater ##
+#Param height zero or greater ##
+#Param props LCD striping orientation and setting for device independent fonts;
+ may be nullptr
+##
+
+#Return Canvas placeholder with dimensions ##
#Example
SkCanvas canvas(10, 20); // 10 units wide, 20 units high
@@ -374,7 +391,7 @@ Used by subclasses with custom implementations for draw methods.
##
##
-#ToDo incomplete ##
+#SeeAlso SkSurfaceProps SkPixelGeometry
##
@@ -387,9 +404,9 @@ Used by child classes of SkCanvas.
#ToDo Since SkBaseDevice is private, shouldn't this be private also? ##
-#Param device Specifies a device for the canvas to draw into. ##
+#Param device specifies a device for the canvas to draw into ##
-#Return Canvas that can be used to draw into device. ##
+#Return Canvas that can be used to draw into device ##
#Example
#Error "Unsure how to create a meaningful example."
@@ -408,14 +425,18 @@ Used by child classes of SkCanvas.
Construct a canvas that draws into bitmap.
Sets SkSurfaceProps::kLegacyFontHost_InitType in constructed Surface.
+Bitmap is copied so that subsequently editing bitmap will not affect
+constructed Canvas.
+
+May be deprecated in the future.
+
#ToDo Should be deprecated? ##
-#Param bitmap Width, height, Image_Color_Type, Image_Alpha_Type, and pixel storage of Raster_Surface.
- Bitmap is copied so that subsequently editing bitmap will not affect
- constructed Canvas.
+#Param bitmap width, height, Image_Color_Type, Image_Alpha_Type, and pixel
+ storage of Raster_Surface
##
-#Return Canvas that can be used to draw into bitmap. ##
+#Return Canvas that can be used to draw into bitmap ##
#Example
#Description
@@ -460,11 +481,7 @@ The actual output depends on the installed fonts.
##
-#Enum ColorBehavior
-
-#ToDo exclude this during build phase
- (use SK_BUILD_FOR_ANDROID_FRAMEWORK as exclude directive)
-##
+#EnumClass ColorBehavior
#Private
Android framework only.
@@ -476,9 +493,23 @@ Android framework only.
};
##
#Const kLegacy 0
+ Is a placeholder to allow specialized constructor; has no meaning.
##
##
+#Method SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior)
+
+#Private
+Android framework only.
+##
+
+#Param bitmap specifies a bitmap for the canvas to draw into ##
+#Param behavior specializes this constructor; value is unused ##
+#Return Canvas that can be used to draw into bitmap ##
+
+#NoExample
+##
+##
# ------------------------------------------------------------------------------
@@ -487,15 +518,17 @@ Android framework only.
Construct a canvas that draws into bitmap.
Use props to match the device characteristics, like LCD striping.
-#Param bitmap Width, height, Image_Color_Type, Image_Alpha_Type, and pixel storage of Raster_Surface.
- Bitmap is copied so that subsequently editing bitmap will not affect
- constructed Canvas.
+bitmap is copied so that subsequently editing bitmap will not affect
+constructed Canvas.
+
+#Param bitmap width, height, Image_Color_Type, Image_Alpha_Type,
+ and pixel storage of Raster_Surface
##
-#Param props The order and orientation of RGB striping; and whether to use
- device independent fonts.
+#Param props order and orientation of RGB striping; and whether to use
+ device independent fonts
##
-#Return Canvas that can be used to draw into bitmap. ##
+#Return Canvas that can be used to draw into bitmap ##
#Example
#Description
@@ -544,14 +577,34 @@ The actual output depends on the installed fonts.
#Method virtual ~SkCanvas()
-Draws State_Stack_Layer, if any.
+Draw saved layers, if any.
Free up resources used by Canvas.
#Example
-#Error "Haven't thought of a useful example to put here."
+#Description
+Canvas offscreen draws into bitmap. saveLayerAlpha 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.
+##
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(200, 200));
+ {
+ SkCanvas offscreen(bitmap);
+ SkPaint paint;
+ paint.setTextSize(100);
+ offscreen.drawString("ABC", 20, 160, paint);
+ SkRect layerBounds = SkRect::MakeXYWH(32, 32, 192, 192);
+ offscreen.saveLayerAlpha(&layerBounds, 128);
+ offscreen.clear(SK_ColorWHITE);
+ offscreen.drawString("DEF", 20, 160, paint);
+ }
+ canvas->drawBitmap(bitmap, 0, 0, nullptr);
+}
##
-#ToDo create example to show how draw happens when canvas goes out of scope ##
+#SeeAlso State_Stack
##
@@ -562,7 +615,7 @@ Free up resources used by Canvas.
Associates additional data with the canvas.
The storage is freed when Canvas is deleted.
-#Return storage that can be read from and written to. ##
+#Return storage that can be read from and written to ##
#Example
const char* kHelloMetaData = "HelloMetaData";
@@ -590,15 +643,19 @@ The storage is freed when Canvas is deleted.
#Method SkImageInfo imageInfo() const
Returns Image_Info for Canvas. If Canvas is not associated with Raster_Surface or
-GPU_Surface, returns SkImageInfo::SkImageInfo() is returned Image_Color_Type is set to kUnknown_SkColorType.
+GPU_Surface, returned Image_Color_Type is set to kUnknown_SkColorType.
-#Return dimensions and Image_Color_Type of Canvas. ##
+#Return dimensions and Image_Color_Type of Canvas ##
#Example
- SkCanvas canvas;
- SkImageInfo canvasInfo = canvas.imageInfo();
- SkImageInfo emptyInfo;
- SkDebugf("emptyInfo %c= canvasInfo\n", emptyInfo == canvasInfo ? '=' : '!');
+ SkCanvas emptyCanvas;
+ SkImageInfo canvasInfo = emptyCanvas.imageInfo();
+ SkImageInfo emptyInfo;
+ SkDebugf("emptyInfo %c= canvasInfo\n", emptyInfo == canvasInfo ? '=' : '!');
+
+ #StdOut
+ emptyInfo == canvasInfo
+ ##
##
#ToDo incomplete ##
@@ -613,9 +670,9 @@ If Canvas is associated with Raster_Surface or
GPU_Surface, copies Surface_Properties and returns true. Otherwise,
return false and leave props unchanged.
-#Param props Pointer to writable SkSurfaceProps. ##
+#Param props storage for writable SkSurfaceProps ##
-#Return true if Surface_Properties was copied. ##
+#Return true if Surface_Properties was copied ##
#ToDo This seems old style. Deprecate? ##
@@ -644,7 +701,7 @@ return false and leave props unchanged.
#Method void flush()
Triggers the immediate execution of all pending draw operations.
-If Canvas is associated with GPU_Surface, resolve all pending GPU operations.
+If Canvas is associated with GPU_Surface, resolves all pending GPU operations.
#Example
#Error "haven't thought of a useful example to put here"
@@ -662,7 +719,7 @@ Gets the size of the base or root layer in global canvas coordinates. The
origin of the base layer is always (0,0). The current drawable area may be
smaller (due to clipping or saveLayer).
-#Return Integral width and height of base layer. ##
+#Return integral width and height of base layer ##
#Example
SkBitmap bitmap;
@@ -692,12 +749,15 @@ smaller (due to clipping or saveLayer).
#Method sk_sp<SkSurface> makeSurface(const SkImageInfo& info, const SkSurfaceProps* props = nullptr)
Creates Surface matching info and props, and associates it with Canvas.
-If Canvas is already associated with Surface, it cannot create a new Surface.
+Returns nullptr if no match found.
-#Param info Initialize Surface with width, height, Image_Color_Type, Image_Alpha_Type, and Color_Space. ##
-#Param props Use to match if provided, or use the Surface_Properties in Canvas otherwise. ##
+If props is nullptr, matches Surface_Properties in Canvas. If props is nullptr and Canvas
+does not have Surface_Properties, creates Surface with default Surface_Properties.
-#Return Surface matching info and props, or nullptr if no match is available. ##
+#Param info width, height, Image_Color_Type, Image_Alpha_Type, and Color_Space ##
+#Param props Surface_Properties to match; may be nullptr to match Canvas ##
+
+#Return Surface matching info and props, or nullptr if no match is available ##
#Example
sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(5, 6);
@@ -708,7 +768,7 @@ If Canvas is already associated with Surface, it cannot create a new Surface.
SkDebugf("size = %d, %d\n", compatible->width(), compatible->height());
#StdOut
- compatible != nullptr
+ compatible != nullptr
size = 3, 4
##
##
@@ -723,7 +783,7 @@ If Canvas is already associated with Surface, it cannot create a new Surface.
Returns GPU_Context of the GPU_Surface associated with Canvas.
-#Return GPU_Context, if available; nullptr otherwise. ##
+#Return GPU_Context, if available; nullptr otherwise ##
#Example
void draw(SkCanvas* canvas) {
@@ -744,18 +804,19 @@ void draw(SkCanvas* canvas) {
#Method void* accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin = NULL)
Returns the pixel base address, Image_Info, rowBytes, and origin if the pixels
-can be read directly.
-The returned address is only valid
+can be read directly. The returned address is only valid
while Canvas is in scope and unchanged. Any Canvas call or Surface call
may invalidate the returned address and other returned values.
If pixels are inaccessible, info, rowBytes, and origin are unchanged.
-#Param info If not nullptr, copies writable pixels' Image_Info. ##
-#Param rowBytes If not nullptr, copies writable pixels' row bytes. ##
-#Param origin If not nullptr, copies Canvas top layer origin, its top left corner. ##
+#Param info storage for writable pixels' Image_Info; may be nullptr ##
+#Param rowBytes storage for writable pixels' row bytes; may be nullptr ##
+#Param origin storage for Canvas top layer origin, its top left corner;
+ may be nullptr
+##
-#Return Address of pixels, or nullptr if inaccessible. ##
+#Return Address of pixels, or nullptr if inaccessible ##
#Example
void draw(SkCanvas* canvas) {
@@ -777,38 +838,38 @@ The offscreen and blended result appear on the CPU and GPU but the large dotted
"DEF" appear only on the CPU.
##
void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setTextSize(100);
- canvas->drawString("ABC", 20, 160, paint);
- SkRect layerBounds = SkRect::MakeXYWH(32, 32, 192, 192);
- canvas->saveLayerAlpha(&layerBounds, 128);
- canvas->clear(SK_ColorWHITE);
- canvas->drawString("DEF", 20, 160, paint);
- SkImageInfo imageInfo;
- size_t rowBytes;
- SkIPoint origin;
- uint32_t* access = (uint32_t*) canvas->accessTopLayerPixels(&imageInfo, &rowBytes, &origin);
- if (access) {
- int h = imageInfo.height();
- int v = imageInfo.width();
- int rowWords = rowBytes / sizeof(uint32_t);
- for (int y = 0; y < h; ++y) {
- int newY = (y - h / 2) * 2 + h / 2;
- if (newY < 0 || newY >= h) {
- continue;
- }
- for (int x = 0; x < v; ++x) {
- int newX = (x - v / 2) * 2 + v / 2;
- if (newX < 0 || newX >= v) {
- continue;
- }
- if (access[y * rowWords + x] == SK_ColorBLACK) {
- access[newY * rowWords + newX] = SK_ColorGRAY;
- }
- }
- }
-
- }
+ SkPaint paint;
+ paint.setTextSize(100);
+ canvas->drawString("ABC", 20, 160, paint);
+ SkRect layerBounds = SkRect::MakeXYWH(32, 32, 192, 192);
+ canvas->saveLayerAlpha(&layerBounds, 128);
+ canvas->clear(SK_ColorWHITE);
+ canvas->drawString("DEF", 20, 160, paint);
+ SkImageInfo imageInfo;
+ size_t rowBytes;
+ SkIPoint origin;
+ uint32_t* access = (uint32_t*) canvas->accessTopLayerPixels(&imageInfo, &rowBytes, &origin);
+ if (access) {
+ int h = imageInfo.height();
+ int v = imageInfo.width();
+ int rowWords = rowBytes / sizeof(uint32_t);
+ for (int y = 0; y < h; ++y) {
+ int newY = (y - h / 2) * 2 + h / 2;
+ if (newY < 0 || newY >= h) {
+ continue;
+ }
+ for (int x = 0; x < v; ++x) {
+ int newX = (x - v / 2) * 2 + v / 2;
+ if (newX < 0 || newX >= v) {
+ continue;
+ }
+ if (access[y * rowWords + x] == SK_ColorBLACK) {
+ access[newY * rowWords + newX] = SK_ColorGRAY;
+ }
+ }
+ }
+
+ }
canvas->restore();
}
##
@@ -825,11 +886,11 @@ void draw(SkCanvas* canvas) {
Returns custom context that tracks the Matrix and Clip.
Use Raster_Handle_Allocator to blend Skia drawing with custom drawing, typically performed
-by the host platform's user interface. This accessor returns the custom context created
-when SkRasterHandleAllocator::MakeCanvas creates a custom canvas with raster storage for
+by the host platform's user interface. This accessor returns the custom context generated by
+SkRasterHandleAllocator::MakeCanvas, which creates a custom canvas with raster storage for
the drawing destination.
-#Return Context of custom allocator. ##
+#Return context of custom allocator ##
#Example
#Description
@@ -883,16 +944,19 @@ the drawing destination.
Returns true if Canvas has direct access to its pixels.
-Pixels are readable when Device is raster. Pixels are not readable when SkCanvas is returned from
-GPU_Surface, returned by SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
-or SkCanvas is the base of a utility class like SkDumpCanvas.
+Pixels are readable when Device is raster. Pixels are not readable when SkCanvas
+is returned from GPU_Surface, returned by SkDocument::beginPage, returned by
+SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility class
+like SkDumpCanvas.
-pixmap pixel address is only valid while Canvas is in scope and unchanged. Any Canvas or Surface call may
-invalidate the pixmap values.
+pixmap pixel address is only valid while Canvas is in scope and unchanged. Any
+Canvas or Surface call may invalidate the pixmap values.
-#Param pixmap storage for Canvas pixel state if Canvas pixels are readable; otherwise, ignored. ##
+#Param pixmap storage for Canvas pixel state if Canvas pixels are readable;
+ otherwise, ignored
+##
-#Return true if Canvas has direct access to pixels. ##
+#Return true if Canvas has direct access to pixels ##
#Example
SkPixmap pixmap;
@@ -911,14 +975,15 @@ invalidate the pixmap values.
#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY)
-Copies rectangle of pixels from Canvas into dstPixels, converting their Image_Color_Type and Image_Alpha_Type.
-Pixels are readable when Device is raster. Pixels are not readable when SkCanvas is returned from
-GPU_Surface, returned by SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
+Copies rectangle of pixels from Canvas into dstPixels, converting their
+Image_Color_Type and Image_Alpha_Type. Pixels are readable when Device is
+raster. Pixels are not readable when SkCanvas is returned from GPU_Surface,
+returned by SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
or SkCanvas is the base of a utility class like SkDumpCanvas.
-Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type does not match dstInfo.
-Only pixels within the rectangle that intersect Canvas pixels are copied.
-dstPixels outside the rectangle intersection are unchanged.
+Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type
+does not match dstInfo. Only pixels within the rectangle that intersect Canvas
+pixels are copied. dstPixels outside the rectangle intersection are unchanged.
#Table
#Legend
@@ -949,13 +1014,13 @@ Does not copy, and returns false if:
# dstRowBytes is too small to contain one row of pixels. ##
##
-#Param dstInfo Dimensions, Image_Color_Type, and Image_Alpha_Type of dstPixels. ##
-#Param dstPixels Storage for pixels, of size dstInfo.height() times dstRowBytes. ##
-#Param dstRowBytes Size of one destination row, dstInfo.width() times pixel size. ##
-#Param srcX Offset into readable pixels in x. ##
-#Param srcY Offset into readable pixels in y. ##
+#Param dstInfo dimensions, Image_Color_Type, and Image_Alpha_Type of dstPixels ##
+#Param dstPixels storage for pixels, of size dstInfo.height() times dstRowBytes ##
+#Param dstRowBytes size of one destination row, dstInfo.width() times pixel size ##
+#Param srcX offset into readable pixels in x ##
+#Param srcY offset into readable pixels in y ##
-#Return true if pixels were copied. ##
+#Return true if pixels were copied ##
#Example
#Description
@@ -988,14 +1053,16 @@ Does not copy, and returns false if:
#Method bool readPixels(const SkPixmap& pixmap, int srcX, int srcY)
-Copies rectangle of pixels from Canvas into Pixmap, converting their Image_Color_Type and Image_Alpha_Type.
-Pixels are readable when Device is raster. Pixels are not readable when SkCanvas is returned from
-GPU_Surface, returned by SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
+Copies rectangle of pixels from Canvas into Pixmap, converting their
+Image_Color_Type and Image_Alpha_Type. Pixels are readable when Device is raster.
+Pixels are not readable when SkCanvas is returned from GPU_Surface, returned by
+SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
or SkCanvas is the base of a utility class like SkDumpCanvas.
-Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type does not match bitmap Image_Info.
-Only Pixmap pixels within the rectangle that intersect Canvas pixels are copied.
-Pixmap pixels outside the rectangle intersection are unchanged.
+Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type
+does not match bitmap Image_Info. Only Pixmap pixels within the rectangle that
+intersect Canvas pixels are copied. Pixmap pixels outside the rectangle
+intersection are unchanged.
#Table
#Legend
@@ -1027,17 +1094,17 @@ Does not copy, and returns false if:
# Bitmap_Row_Bytes is too small to contain one row of pixels. ##
##
-#Param pixmap Receives pixels copied from Canvas. ##
-#Param srcX Offset into readable pixels in x. ##
-#Param srcY Offset into readable pixels in y. ##
+#Param pixmap storage for pixels copied from Canvas ##
+#Param srcX offset into readable pixels in x ##
+#Param srcY offset into readable pixels in y ##
-#Return true if pixels were copied. ##
+#Return true if pixels were copied ##
#Example
void draw(SkCanvas* canvas) {
canvas->clear(0x8055aaff);
uint32_t pixels[1] = { 0 };
- SkPixmap pixmap(SkImageInfo::MakeN32Premul(1, 1), pixels, 4);
+ SkPixmap pixmap(SkImageInfo::MakeN32Premul(1, 1), pixels, 4);
canvas->readPixels(pixmap, 0, 0);
SkDebugf("pixel = %08x\n", pixels[0]);
}
@@ -1054,17 +1121,19 @@ void draw(SkCanvas* canvas) {
#Method bool readPixels(const SkBitmap& bitmap, int srcX, int srcY)
-Copies pixels enclosed by bitmap offset to (x, y) from Canvas into bitmap, converting their Image_Color_Type and Image_Alpha_Type.
-Pixels are readable when Device is raster. Pixels are not readable when SkCanvas is returned from
-GPU_Surface, returned by SkDocument::beginPage, returned by SkPictureRecorder::beginRecording,
-or SkCanvas is the base of a utility class like SkDumpCanvas.
-Allocates pixel storage in bitmap if needed.
+Copies pixels enclosed by bitmap offset to (x, y) from Canvas into bitmap,
+converting their Image_Color_Type and Image_Alpha_Type.
+Pixels are readable when Device is raster. Pixels are not readable when SkCanvas
+is returned from GPU_Surface, returned by SkDocument::beginPage, returned by
+SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility class
+like SkDumpCanvas. Allocates pixel storage in bitmap if needed.
-Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type does not match bitmap Image_Info.
-Only pixels within the rectangle that intersect Canvas pixels are copied.
-Bitamp pixels outside the rectangle intersection are unchanged.
+Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type
+does not match bitmap Image_Info. Only pixels within the rectangle that intersect
+Canvas pixels are copied. Bitamp pixels outside the rectangle intersection are
+unchanged.
- #Table
+#Table
#Legend
# canvas pixel bounds # value ##
##
@@ -1084,11 +1153,11 @@ Does not copy, and returns false if:
# Bitmap_Row_Bytes is too small to contain one row of pixels. ##
##
-#Param bitmap Receives pixels copied from Canvas. ##
-#Param srcX Offset into readable pixels in x. ##
-#Param srcY Offset into readable pixels in y. ##
+#Param bitmap storage for pixels copied from Canvas ##
+#Param srcX offset into readable pixels in x ##
+#Param srcY offset into readable pixels in y ##
-#Return true if pixels were copied. ##
+#Return true if pixels were copied ##
#Example
void draw(SkCanvas* canvas) {
@@ -1114,9 +1183,10 @@ void draw(SkCanvas* canvas) {
Copies to Canvas pixels, ignoring the Matrix and Clip, converting to match
info Image_Color_Type and info Image_Alpha_Type.
-Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type does not match info.
-Only pixels within the source rectangle that intersect Canvas pixel bounds are copied.
-Canvas pixels outside the rectangle intersection are unchanged.
+Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type
+does not match info. Only pixels within the source rectangle that intersect
+Canvas pixel bounds are copied. Canvas pixels outside the rectangle intersection
+are unchanged.
#Table
#Legend
@@ -1147,13 +1217,13 @@ Does not copy, and returns false if:
# rowBytes is too small to contain one row of pixels. ##
##
-#Param info Dimensions, Image_Color_Type, and Image_Alpha_Type of pixels. ##
-#Param pixels Pixels to copy, of size info.height() times rowBytes. ##
-#Param rowBytes Offset from one row to the next, usually info.width() times pixel size. ##
-#Param x Offset into Canvas writable pixels in x. ##
-#Param y Offset into Canvas writable pixels in y. ##
+#Param info dimensions, Image_Color_Type, and Image_Alpha_Type of pixels ##
+#Param pixels pixels to copy, of size info.height() times rowBytes ##
+#Param rowBytes offset from one row to the next, usually info.width() times pixel size ##
+#Param x offset into Canvas writable pixels in x ##
+#Param y offset into Canvas writable pixels in y ##
-#Return true if pixels were written to Canvas. ##
+#Return true if pixels were written to Canvas ##
#Example
SkImageInfo imageInfo = SkImageInfo::MakeN32(256, 1, kPremul_SkAlphaType);
@@ -1177,9 +1247,10 @@ Does not copy, and returns false if:
Writes to Canvas pixels, ignoring the Matrix and Clip, converting to match
bitmap Image_Color_Type and bitmap Image_Alpha_Type.
-Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type does not match bitmap.
-Only pixels within the source rectangle that intersect Canvas pixel bounds are copied.
-Canvas pixels outside the rectangle intersection are unchanged.
+Pixel values are converted only if Canvas Image_Color_Type and Image_Alpha_Type
+does not match bitmap. Only pixels within the source rectangle that intersect
+Canvas pixel bounds are copied. Canvas pixels outside the rectangle intersection
+are unchanged.
#Table
#Legend
@@ -1211,11 +1282,11 @@ Does not copy, and returns false if:
# bitmap pixels are inaccessible; for instance, bitmap wraps a texture. ##
##
-#Param bitmap Provides pixels copied to Canvas. ##
-#Param x Offset into Canvas writable pixels in x. ##
-#Param y Offset into Canvas writable pixels in y. ##
+#Param bitmap contains pixels copied to Canvas ##
+#Param x offset into Canvas writable pixels in x ##
+#Param y offset into Canvas writable pixels in y ##
-#Return true if pixels were written to Canvas. ##
+#Return true if pixels were written to Canvas ##
#Example
void draw(SkCanvas* canvas) {
@@ -1244,9 +1315,9 @@ void draw(SkCanvas* canvas) {
#Topic State_Stack
Canvas 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
-Canvas Surface or Device.
+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 Canvas Surface or Device.
Canvas savable state consists of Clip, Matrix, and Draw_Filter.
Clip describes the area that may be drawn to.
@@ -1256,7 +1327,7 @@ Draw_Filter (deprecated on most platforms) modifies the paint before drawing.
save(), saveLayer, saveLayerPreserveLCDTextRequests, and saveLayerAlpha
save state and return the depth of the stack.
-restore() and restoreToCount revert state to its value when saved.
+restore(), restoreToCount, and ~SkCanvas() revert state to its value when saved.
Each state on the stack intersects Clip with the previous Clip,
and concatenates Matrix with the previous Matrix.
@@ -1277,18 +1348,18 @@ Draw to ever smaller clips; then restore drawing to full canvas.
Note that the second clipRect is not permitted to enlarge Clip.
##
#Height 160
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- canvas->save(); // records stack depth to restore
- canvas->clipRect(SkRect::MakeWH(100, 100)); // constrains drawing to clip
- canvas->clear(SK_ColorRED); // draws to limit of clip
- canvas->save(); // records stack depth to restore
- canvas->clipRect(SkRect::MakeWH(50, 150)); // Rect below 100 is ignored
- canvas->clear(SK_ColorBLUE); // draws to smaller clip
- canvas->restore(); // enlarges clip
- canvas->drawLine(20, 20, 150, 150, paint); // line below 100 is not drawn
- canvas->restore(); // enlarges clip
- canvas->drawLine(150, 20, 50, 120, paint); // line below 100 is drawn
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ canvas->save(); // records stack depth to restore
+ canvas->clipRect(SkRect::MakeWH(100, 100)); // constrains drawing to clip
+ canvas->clear(SK_ColorRED); // draws to limit of clip
+ canvas->save(); // records stack depth to restore
+ canvas->clipRect(SkRect::MakeWH(50, 150)); // Rect below 100 is ignored
+ canvas->clear(SK_ColorBLUE); // draws to smaller clip
+ canvas->restore(); // enlarges clip
+ canvas->drawLine(20, 20, 150, 150, paint); // line below 100 is not drawn
+ canvas->restore(); // enlarges clip
+ canvas->drawLine(150, 20, 50, 120, paint); // line below 100 is drawn
}
##
@@ -1300,12 +1371,12 @@ While clipRect is given the same rectangle twice, Matrix makes the second
clipRect draw at half the size of the first.
##
#Height 128
-void draw(SkCanvas* canvas) {
- canvas->clipRect(SkRect::MakeWH(100, 100));
- canvas->clear(SK_ColorRED);
- canvas->scale(.5, .5);
- canvas->clipRect(SkRect::MakeWH(100, 100));
- canvas->clear(SK_ColorBLUE);
+void draw(SkCanvas* canvas) {
+ canvas->clipRect(SkRect::MakeWH(100, 100));
+ canvas->clear(SK_ColorRED);
+ canvas->scale(.5, .5);
+ canvas->clipRect(SkRect::MakeWH(100, 100));
+ canvas->clear(SK_ColorBLUE);
}
##
@@ -1317,15 +1388,15 @@ Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms).
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
restoring the Matrix, Clip, and Draw_Filter to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix,
+and resetMatrix. Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
-Saved Canvas state is put on a stack; multiple calls to save() should be balance by an equal number of
-calls to restore().
+Saved Canvas state is put on a stack; multiple calls to save() should be balance
+by an equal number of calls to restore().
Call restoreToCount with result to restore this and subsequent saves.
-#Return Depth of saved stack. ##
+#Return depth of saved stack ##
#Example
#Description
@@ -1354,15 +1425,15 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Subtopic Layer
-Layer allocates a temporary offscreen Bitmap to draw into. When the drawing is complete,
-the Bitmap is drawn into the Canvas.
+Layer allocates a temporary offscreen Bitmap to draw into. When the drawing is
+complete, the Bitmap is drawn into the Canvas.
Layer is saved in a stack along with other saved state. When state with a Layer
is restored, the offscreen Bitmap is drawn into the previous layer.
Layer may be initialized with the contents of the previous layer. When Layer is
-restored, its Bitmap can be modified by Paint passed to Layer to apply Color_Alpha,
-Color_Filter, Image_Filter, and Blend_Mode.
+restored, its Bitmap can be modified by Paint passed to Layer to apply
+Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode.
#Method int saveLayer(const SkRect* bounds, const SkPaint* paint)
@@ -1370,26 +1441,28 @@ Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
and allocates an offscreen Bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and draws the offscreen bitmap.
-The Matrix, Clip, and Draw_Filter are restored to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+clipPath, clipRegion.
-Rect bounds suggests but does not define the offscreen size. To clip drawing to a specific rectangle,
-use clipRect.
+Rect bounds suggests but does not define the offscreen size. To clip drawing to
+a specific rectangle, use clipRect.
-Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode when restore() is called.
+Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
+Blend_Mode when restore() is called.
-Call restoreToCount with result to restore this and subsequent saves.
+Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds Used as a hint to limit the size of the offscreen; may be nullptr. ##
-#Param paint Used when restore() is called to draw the offscreen; may be nullptr. ##
+#Param bounds hint to limit the size of the offscreen; may be nullptr ##
+#Param paint graphics state for offscreen; may be nullptr ##
-#Return Depth of saved stack. ##
+#Return depth of saved stack ##
#Example
#Description
-Rectangles are blurred by Image_Filter when restore() draws offscreen to main Canvas.
+Rectangles are blurred by Image_Filter when restore() draws offscreen to main
+Canvas.
##
#Height 128
void draw(SkCanvas* canvas) {
@@ -1415,22 +1488,23 @@ Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
and allocates an offscreen Bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and draws the offscreen Bitmap.
-The Matrix, Clip, and Draw_Filter are restored to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+clipPath, clipRegion.
-bounds suggests but does not define the offscreen size. To clip drawing to a specific rectangle,
-use clipRect.
+Rect bounds suggests but does not define the offscreen size. To clip drawing to
+a specific rectangle, use clipRect.
-Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode when restore() is called.
+Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
+Blend_Mode when restore() is called.
-Call restoreToCount with result to restore this and subsequent saves.
+Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds Used as a hint to limit the size of the offscreen; may be nullptr. ##
-#Param paint Used when restore() is called to draw the offscreen; may be nullptr. ##
+#Param bounds hint to limit the size of the offscreen; may be nullptr ##
+#Param paint graphics state for offscreen; may be nullptr ##
-#Return Depth of saved stack. ##
+#Return depth of saved stack ##
#Example
#Description
@@ -1462,50 +1536,50 @@ Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
and allocates an offscreen bitmap for subsequent drawing.
LCD_Text is preserved when the offscreen is drawn to the prior layer.
-Draw text on an opaque background so that LCD_Text blends correctly with the prior layer.
-
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and draws the offscreen bitmap.
-The Matrix, Clip, and Draw_Filter are restored to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+clipPath, clipRegion.
-Draw LCD_Text on an opaque background to get good results.
+Rect bounds suggests but does not define the offscreen size. To clip drawing to
+a specific rectangle, use clipRect.
-bounds suggests but does not define the offscreen size. To clip drawing to a specific rectangle,
-use clipRect.
+Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
+Blend_Mode when restore() is called.
-paint modifies how the offscreen overlays the prior layer. Color_Alpha, Blend_Mode,
-Color_Filter, Draw_Looper, Image_Filter, and Mask_Filter, affect the offscreen draw.
+Call restoreToCount with returned value to restore this and subsequent saves.
-Call restoreToCount with result to restore this and subsequent saves.
+Draw text on an opaque background so that LCD_Text blends correctly with the
+prior layer. LCD_Text drawn on a background with transparency may result in
+incorrect banding.
-#Param bounds Used as a hint to limit the size of the offscreen; may be nullptr. ##
-#Param paint Used when restore() is called to draw the offscreen; may be nullptr. ##
+#Param bounds hint to limit the size of the offscreen; may be nullptr ##
+#Param paint graphics state for offscreen; may be nullptr ##
-#Return Depth of saved stack. ##
+#Return depth of saved stack ##
#Example
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setLCDRenderText(true);
- paint.setTextSize(20);
- for (auto preserve : { false, true } ) {
- preserve ? canvas->saveLayerPreserveLCDTextRequests(nullptr, nullptr)
- : canvas->saveLayer(nullptr, nullptr);
- SkPaint p;
- p.setColor(SK_ColorWHITE);
- // Comment out the next line to draw on a non-opaque background.
- canvas->drawRect(SkRect::MakeLTRB(25, 40, 200, 70), p);
- canvas->drawString("Hamburgefons", 30, 60, paint);
-
- p.setColor(0xFFCCCCCC);
- canvas->drawRect(SkRect::MakeLTRB(25, 70, 200, 100), p);
- canvas->drawString("Hamburgefons", 30, 90, paint);
-
- canvas->restore();
- canvas->translate(0, 80);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setLCDRenderText(true);
+ paint.setTextSize(20);
+ for (auto preserve : { false, true } ) {
+ preserve ? canvas->saveLayerPreserveLCDTextRequests(nullptr, nullptr)
+ : canvas->saveLayer(nullptr, nullptr);
+ SkPaint p;
+ p.setColor(SK_ColorWHITE);
+ // Comment out the next line to draw on a non-opaque background.
+ canvas->drawRect(SkRect::MakeLTRB(25, 40, 200, 70), p);
+ canvas->drawString("Hamburgefons", 30, 60, paint);
+
+ p.setColor(0xFFCCCCCC);
+ canvas->drawRect(SkRect::MakeLTRB(25, 70, 200, 100), p);
+ canvas->drawString("Hamburgefons", 30, 90, paint);
+
+ canvas->restore();
+ canvas->translate(0, 80);
}
##
@@ -1520,31 +1594,33 @@ and allocates an offscreen bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and blends the offscreen bitmap with alpha opacity onto the prior layer.
-The Matrix, Clip, and Draw_Filter are restored to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+clipPath, clipRegion.
-bounds suggests but does not define the offscreen size. To clip drawing to a specific rectangle,
-use clipRect.
+Rect bounds suggests but does not define the offscreen size. To clip drawing to
+a specific rectangle, use clipRect.
-Call restoreToCount with result to restore this and subsequent saves.
+alpha of zero is fully transparent, 255 is fully opaque.
+
+Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds Used as a hint to limit the size of the offscreen; may be nullptr. ##
-#Param alpha The opacity of the offscreen; zero is fully transparent, 255 is fully opaque. ##
+#Param bounds hint to limit the size of the offscreen; may be nullptr ##
+#Param alpha opacity of the offscreen ##
-#Return Depth of saved stack. ##
+#Return depth of saved stack ##
#Example
- SkPaint paint;
- paint.setColor(SK_ColorRED);
- canvas->drawCircle(50, 50, 50, paint);
- canvas->saveLayerAlpha(nullptr, 128);
- paint.setColor(SK_ColorBLUE);
- canvas->drawCircle(100, 50, 50, paint);
- paint.setColor(SK_ColorGREEN);
- paint.setAlpha(128);
- canvas->drawCircle(75, 90, 50, paint);
+ SkPaint paint;
+ paint.setColor(SK_ColorRED);
+ canvas->drawCircle(50, 50, 50, paint);
+ canvas->saveLayerAlpha(nullptr, 128);
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawCircle(100, 50, 50, paint);
+ paint.setColor(SK_ColorGREEN);
+ paint.setAlpha(128);
+ canvas->drawCircle(75, 90, 50, paint);
canvas->restore();
##
@@ -1552,13 +1628,14 @@ Call restoreToCount with result to restore this and subsequent saves.
##
-#Enum SaveLayerFlags
+#Enum
#Code
enum {
kIsOpaque_SaveLayerFlag = 1 << 0,
kPreserveLCDText_SaveLayerFlag = 1 << 1,
kInitWithPrevious_SaveLayerFlag = 1 << 2,
+ kDontClipToLayer_Legacy_SaveLayerFlag = kDontClipToLayer_PrivateSaveLayerFlag,
};
typedef uint32_t SaveLayerFlags;
@@ -1581,27 +1658,35 @@ defining how the offscreen allocated by saveLayer operates.
Initializes offscreen with the contents of the previous layer.
##
+#Const kDontClipToLayer_Legacy_SaveLayerFlag 0x80000000
+#Private
+ to be deprecated: bug.skia.org/2440
+##
+ Only present on Android.
+ Skips setting a clip to the layer bounds.
+##
+
#Example
#Height 160
#Description
Canvas layer captures red and blue circles scaled up by four.
scalePaint blends offscreen back with transparency.
##
-void draw(SkCanvas* canvas) {
- SkPaint redPaint, bluePaint, scalePaint;
- redPaint.setColor(SK_ColorRED);
- canvas->drawCircle(21, 21, 8, redPaint);
- bluePaint.setColor(SK_ColorBLUE);
- canvas->drawCircle(31, 21, 8, bluePaint);
- SkMatrix matrix;
- matrix.setScale(4, 4);
- scalePaint.setAlpha(0x40);
- scalePaint.setImageFilter(
- SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
- SkCanvas::SaveLayerRec saveLayerRec(nullptr, &scalePaint,
- SkCanvas::kInitWithPrevious_SaveLayerFlag);
- canvas->saveLayer(saveLayerRec);
- canvas->restore();
+void draw(SkCanvas* canvas) {
+ SkPaint redPaint, bluePaint, scalePaint;
+ redPaint.setColor(SK_ColorRED);
+ canvas->drawCircle(21, 21, 8, redPaint);
+ bluePaint.setColor(SK_ColorBLUE);
+ canvas->drawCircle(31, 21, 8, bluePaint);
+ SkMatrix matrix;
+ matrix.setScale(4, 4);
+ scalePaint.setAlpha(0x40);
+ scalePaint.setImageFilter(
+ SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
+ SkCanvas::SaveLayerRec saveLayerRec(nullptr, &scalePaint,
+ SkCanvas::kInitWithPrevious_SaveLayerFlag);
+ canvas->saveLayer(saveLayerRec);
+ canvas->restore();
}
##
@@ -1626,55 +1711,60 @@ SaveLayerRec contains the state used to create the layer offscreen.
#Member const SkRect* fBounds
fBounds is used as a hint to limit the size of the offscreen; may be nullptr.
- fBounds suggests but does not define the offscreen size. To clip drawing to a specific rectangle,
- use clipRect.
+ fBounds suggests but does not define the offscreen size. To clip drawing to
+ a specific rectangle, use clipRect.
##
#Member const SkPaint* fPaint
- fPaint modifies how the offscreen overlays the prior layer; may be nullptr. Color_Alpha, Blend_Mode,
- Color_Filter, Draw_Looper, Image_Filter, and Mask_Filter affect the offscreen draw.
+ fPaint modifies how the offscreen overlays the prior layer; may be nullptr.
+ Color_Alpha, Blend_Mode, Color_Filter, Draw_Looper, Image_Filter, and
+ Mask_Filter affect the offscreen draw.
##
#Member const SkImageFilter* fBackdrop
- fBackdrop applies Image_Filter to the prior layer when copying to the layer offscreen; may be nullptr.
- Use kInitWithPrevious_SaveLayerFlag to copy the prior layer without a Image_Filter.
+ fBackdrop applies Image_Filter to the prior layer when copying to the layer
+ offscreen; may be nullptr. Use kInitWithPrevious_SaveLayerFlag to copy the
+ prior layer without an Image_Filter.
##
#Member const SkImage* fClipMask
-#ToDo header documentation is incomplete ##
- may be nullptr.
+ restore() clips the layer offscreen by the alpha channel of fClipMask when
+ the offscreen is copied to Device. fClipMask may be nullptr. .
##
#Member const SkMatrix* fClipMatrix
-#ToDo header documentation is incomplete ##
- may be nullptr.
+ fClipMatrix transforms fClipMask before it clips the layer offscreen. If
+ fClipMask describes a translucent gradient, it may be scaled and rotated
+ without introducing artifacts. fClipMatrix may be nullptr.
##
#Member SaveLayerFlags fSaveLayerFlags
- fSaveLayerFlags are used to create layer offscreen without transparency, create layer offscreen for
- LCD text, and to create layer offscreen with the contents of the previous layer.
+ fSaveLayerFlags are used to create layer offscreen without transparency,
+ create layer offscreen for LCD text, and to create layer offscreen with the
+ contents of the previous layer.
##
#Example
#Height 160
#Description
-Canvas 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.
+Canvas 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.
##
-void draw(SkCanvas* canvas) {
- SkPaint redPaint, bluePaint;
- redPaint.setAntiAlias(true);
- redPaint.setColor(SK_ColorRED);
- canvas->drawCircle(21, 21, 8, redPaint);
- bluePaint.setColor(SK_ColorBLUE);
- canvas->drawCircle(31, 21, 8, bluePaint);
- SkMatrix matrix;
- matrix.setScale(4, 4);
- auto scaler = SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr);
- SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);
- canvas->saveLayer(saveLayerRec);
- canvas->drawCircle(125, 85, 8, redPaint);
- canvas->restore();
+void draw(SkCanvas* canvas) {
+ SkPaint redPaint, bluePaint;
+ redPaint.setAntiAlias(true);
+ redPaint.setColor(SK_ColorRED);
+ canvas->drawCircle(21, 21, 8, redPaint);
+ bluePaint.setColor(SK_ColorBLUE);
+ canvas->drawCircle(31, 21, 8, bluePaint);
+ SkMatrix matrix;
+ matrix.setScale(4, 4);
+ auto scaler = SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr);
+ SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);
+ canvas->saveLayer(saveLayerRec);
+ canvas->drawCircle(125, 85, 8, redPaint);
+ canvas->restore();
}
##
@@ -1682,15 +1772,15 @@ void draw(SkCanvas* canvas) {
Sets fBounds, fPaint, and fBackdrop to nullptr. Clears fSaveLayerFlags.
-#Return empty SaveLayerRec. ##
+#Return empty SaveLayerRec ##
#Example
- SkCanvas::SaveLayerRec rec1;
- rec1.fSaveLayerFlags = SkCanvas::kIsOpaque_SaveLayerFlag;
- SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kIsOpaque_SaveLayerFlag);
- SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
- && rec1.fPaint == rec2.fPaint
- && rec1.fBackdrop == rec2.fBackdrop
+ SkCanvas::SaveLayerRec rec1;
+ rec1.fSaveLayerFlags = SkCanvas::kIsOpaque_SaveLayerFlag;
+ SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kIsOpaque_SaveLayerFlag);
+ SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
+ && rec1.fPaint == rec2.fPaint
+ && rec1.fBackdrop == rec2.fBackdrop
&& rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');
#StdOut
rec1 == rec2
@@ -1703,18 +1793,18 @@ Sets fBounds, fPaint, and fBackdrop to nullptr. Clears fSaveLayerFlags.
Sets fBounds, fPaint, and fSaveLayerFlags; sets fBackdrop to nullptr.
-#Param bounds Offscreen dimensions; may be nullptr. ##
-#Param paint Applied to offscreen when overlaying prior layer; may be nullptr. ##
-#Param saveLayerFlags SaveLayerRec options to modify offscreen. ##
+#Param bounds offscreen dimensions; may be nullptr ##
+#Param paint applied to offscreen when overlaying prior layer; may be nullptr ##
+#Param saveLayerFlags SaveLayerRec options to modify offscreen ##
-#Return SaveLayerRec with empty backdrop. ##
+#Return SaveLayerRec with empty backdrop ##
#Example
- SkCanvas::SaveLayerRec rec1;
- SkCanvas::SaveLayerRec rec2(nullptr, nullptr);
- SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
- && rec1.fPaint == rec2.fPaint
- && rec1.fBackdrop == rec2.fBackdrop
+ SkCanvas::SaveLayerRec rec1;
+ SkCanvas::SaveLayerRec rec2(nullptr, nullptr);
+ SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
+ && rec1.fPaint == rec2.fPaint
+ && rec1.fBackdrop == rec2.fBackdrop
&& rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');
#StdOut
rec1 == rec2
@@ -1728,19 +1818,23 @@ Sets fBounds, fPaint, and fSaveLayerFlags; sets fBackdrop to nullptr.
Sets fBounds, fPaint, fBackdrop, and fSaveLayerFlags.
-#Param bounds Offscreen dimensions; may be nullptr. ##
-#Param paint Applied to offscreen when overlaying prior layer; may be nullptr. ##
-#Param backdrop Copies prior layer to offscreen with Image_Filter; may be nullptr. ##
-#Param saveLayerFlags SaveLayerRec options to modify offscreen. ##
+#Param bounds offscreen dimensions; may be nullptr ##
+#Param paint applied to offscreen when overlaying prior layer;
+ may be nullptr
+##
+#Param backdrop prior layer copied to offscreen with Image_Filter;
+ may be nullptr
+##
+#Param saveLayerFlags SaveLayerRec options to modify offscreen ##
-#Return SaveLayerRec fully specified. ##
+#Return SaveLayerRec fully specified ##
#Example
- SkCanvas::SaveLayerRec rec1;
- SkCanvas::SaveLayerRec rec2(nullptr, nullptr, nullptr, 0);
- SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
- && rec1.fPaint == rec2.fPaint
- && rec1.fBackdrop == rec2.fBackdrop
+ SkCanvas::SaveLayerRec rec1;
+ SkCanvas::SaveLayerRec rec2(nullptr, nullptr, nullptr, 0);
+ SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
+ && rec1.fPaint == rec2.fPaint
+ && rec1.fBackdrop == rec2.fBackdrop
&& rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');
#StdOut
rec1 == rec2
@@ -1757,14 +1851,26 @@ Sets fBounds, fPaint, fBackdrop, and fSaveLayerFlags.
Not ready for general use.
##
-#Param bounds Offscreen dimensions; may be nullptr. ##
-#Param paint Applied to offscreen when overlaying prior layer; may be nullptr. ##
-#Param backdrop Copies prior layer to offscreen with Image_Filter; may be nullptr. ##
-#Param clipMask May be nullptr. ##
-#Param clipMatrix May be nullptr. ##
-#Param saveLayerFlags SaveLayerRec options to modify offscreen. ##
+Sets fBounds, fPaint, fBackdrop, fClipMask, fClipMatrix, and fSaveLayerFlags.
+clipMatrix uses alpha channel of image, transformed by clipMatrix, to clip layer
+when drawn to Canvas.
-#Return SaveLayerRec fully specified. ##
+Implementation is incomplete; has no effect if Device is GPU-backed.
+
+#Param bounds offscreen dimensions; may be nullptr ##
+#Param paint graphics state applied to offscreen when overlaying prior
+ layer; may be nullptr
+##
+#Param backdrop prior layer copied to offscreen with Image_Filter;
+ may be nullptr
+##
+#Param clipMask clip applied to layer; may be nullptr ##
+#Param clipMatrix matrix applied to clipMask; may be nullptr to use
+ identity matrix
+##
+#Param saveLayerFlags SaveLayerRec options to modify offscreen ##
+
+#Return SaveLayerRec fully specified ##
#ToDo incomplete ##
@@ -1779,18 +1885,18 @@ and allocates an offscreen bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and blends the offscreen bitmap with alpha opacity onto the prior layer.
-The Matrix, Clip, and Draw_Filter are restored to their state when save() was called.
-Matrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix, and resetMatrix.
-Clip may be changed by clipRect, clipRRect, clipPath, clipRegion.
+Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+clipPath, clipRegion.
SaveLayerRec contains the state used to create the layer offscreen.
-Call restoreToCount with result to restore this and subsequent saves.
+Call restoreToCount with returned value to restore this and subsequent saves.
-#Param layerRec offscreen state. ##
+#Param layerRec offscreen state ##
-#Return depth of save state stack. ##
+#Return depth of save state stack ##
#Example
#Description
@@ -1829,11 +1935,11 @@ last saved. The state is removed from the stack.
Does nothing if the stack is empty.
#Example
-void draw(SkCanvas* canvas) {
- SkCanvas simple;
- SkDebugf("depth = %d\n", simple.getSaveCount());
- simple.restore();
- SkDebugf("depth = %d\n", simple.getSaveCount());
+void draw(SkCanvas* canvas) {
+ SkCanvas simple;
+ SkDebugf("depth = %d\n", simple.getSaveCount());
+ simple.restore();
+ SkDebugf("depth = %d\n", simple.getSaveCount());
}
##
@@ -1847,20 +1953,20 @@ Returns the number of saved states, each containing: Matrix, Clip, and Draw_Filt
Equals the number of save() calls less the number of restore() calls plus one.
The save count of a new canvas is one.
-#Return depth of save state stack. ##
+#Return depth of save state stack ##
#Example
-void draw(SkCanvas* canvas) {
- SkCanvas simple;
- SkDebugf("depth = %d\n", simple.getSaveCount());
- simple.save();
- SkDebugf("depth = %d\n", simple.getSaveCount());
- simple.restore();
- SkDebugf("depth = %d\n", simple.getSaveCount());
+void draw(SkCanvas* canvas) {
+ SkCanvas simple;
+ SkDebugf("depth = %d\n", simple.getSaveCount());
+ simple.save();
+ SkDebugf("depth = %d\n", simple.getSaveCount());
+ simple.restore();
+ SkDebugf("depth = %d\n", simple.getSaveCount());
}
#StdOut
-depth = 1
-depth = 2
+depth = 1
+depth = 2
depth = 1
##
##
@@ -1871,27 +1977,26 @@ depth = 1
#Method void restoreToCount(int saveCount)
-Restores state to Matrix, Clip, and Draw_Filter
-values when save(), saveLayer, saveLayerPreserveLCDTextRequests, or saveLayerAlpha
-returned saveCount.
+Restores state to Matrix, Clip, and Draw_Filter values when save(), saveLayer,
+saveLayerPreserveLCDTextRequests, or saveLayerAlpha returned saveCount.
Does nothing if saveCount is greater than state stack count.
Restores state to initial values if saveCount is less than or equal to one.
-#Param saveCount The depth of state stack to restore. ##
+#Param saveCount depth of state stack to restore ##
#Example
-void draw(SkCanvas* canvas) {
- SkDebugf("depth = %d\n", canvas->getSaveCount());
- canvas->save();
- canvas->save();
- SkDebugf("depth = %d\n", canvas->getSaveCount());
- canvas->restoreToCount(0);
- SkDebugf("depth = %d\n", canvas->getSaveCount());
+void draw(SkCanvas* canvas) {
+ SkDebugf("depth = %d\n", canvas->getSaveCount());
+ canvas->save();
+ canvas->save();
+ SkDebugf("depth = %d\n", canvas->getSaveCount());
+ canvas->restoreToCount(0);
+ SkDebugf("depth = %d\n", canvas->getSaveCount());
}
#StdOut
-depth = 1
-depth = 3
+depth = 1
+depth = 3
depth = 1
##
##
@@ -1913,8 +2018,8 @@ pre-multiplied with Matrix.
This has the effect of moving the drawing by (dx, dy) before transforming
the result with Matrix.
-#Param dx The distance to translate in x. ##
-#Param dy The distance to translate in y. ##
+#Param dx distance to translate in x ##
+#Param dy distance to translate in y ##
#Example
#Height 128
@@ -1927,23 +2032,23 @@ fill follows scale of (2, 1/2.f). After restoring the clip, which resets
Matrix, a red frame follows the same scale of (2, 1/2.f); a gray fill
follows translate of (50, 50).
##
-void draw(SkCanvas* canvas) {
- SkPaint filledPaint;
- SkPaint outlinePaint;
- outlinePaint.setStyle(SkPaint::kStroke_Style);
- outlinePaint.setColor(SK_ColorBLUE);
- canvas->save();
- canvas->translate(50, 50);
- canvas->drawCircle(28, 28, 15, outlinePaint); // blue center: (50+28, 50+28)
- canvas->scale(2, 1/2.f);
- canvas->drawCircle(28, 28, 15, filledPaint); // black center: (50+(28*2), 50+(28/2))
- canvas->restore();
- filledPaint.setColor(SK_ColorGRAY);
- outlinePaint.setColor(SK_ColorRED);
- canvas->scale(2, 1/2.f);
- canvas->drawCircle(28, 28, 15, outlinePaint); // red center: (28*2, 28/2)
- canvas->translate(50, 50);
- canvas->drawCircle(28, 28, 15, filledPaint); // gray center: ((50+28)*2, (50+28)/2)
+void draw(SkCanvas* canvas) {
+ SkPaint filledPaint;
+ SkPaint outlinePaint;
+ outlinePaint.setStyle(SkPaint::kStroke_Style);
+ outlinePaint.setColor(SK_ColorBLUE);
+ canvas->save();
+ canvas->translate(50, 50);
+ canvas->drawCircle(28, 28, 15, outlinePaint); // blue center: (50+28, 50+28)
+ canvas->scale(2, 1/2.f);
+ canvas->drawCircle(28, 28, 15, filledPaint); // black center: (50+(28*2), 50+(28/2))
+ canvas->restore();
+ filledPaint.setColor(SK_ColorGRAY);
+ outlinePaint.setColor(SK_ColorRED);
+ canvas->scale(2, 1/2.f);
+ canvas->drawCircle(28, 28, 15, outlinePaint); // red center: (28*2, 28/2)
+ canvas->translate(50, 50);
+ canvas->drawCircle(28, 28, 15, filledPaint); // gray center: ((50+28)*2, (50+28)/2)
}
##
@@ -1963,19 +2068,19 @@ pre-multiplied with Matrix.
This has the effect of scaling the drawing by (sx, sy) before transforming
the result with Matrix.
-#Param sx The amount to scale in x. ##
-#Param sy The amount to scale in y. ##
+#Param sx amount to scale in x ##
+#Param sy amount to scale in y ##
#Example
#Height 160
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- SkRect rect = { 10, 20, 60, 120 };
- canvas->translate(20, 20);
- canvas->drawRect(rect, paint);
- canvas->scale(2, .5f);
- paint.setColor(SK_ColorGRAY);
- canvas->drawRect(rect, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ SkRect rect = { 10, 20, 60, 120 };
+ canvas->translate(20, 20);
+ canvas->drawRect(rect, paint);
+ canvas->scale(2, .5f);
+ paint.setColor(SK_ColorGRAY);
+ canvas->drawRect(rect, paint);
}
##
@@ -1995,24 +2100,24 @@ pre-multiplied with Matrix.
This has the effect of rotating the drawing by degrees before transforming
the result with Matrix.
-#Param degrees The amount to rotate, in degrees. ##
+#Param degrees amount to rotate, in degrees ##
#Example
#Description
Draw clock hands at time 5:10. The hour hand and minute hand point up and
are rotated clockwise.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setStyle(SkPaint::kStroke_Style);
- canvas->translate(128, 128);
- canvas->drawCircle(0, 0, 60, paint);
- canvas->save();
- canvas->rotate(10 * 360 / 60); // 10 minutes of 60 scaled to 360 degrees
- canvas->drawLine(0, 0, 0, -50, paint);
- canvas->restore();
- canvas->rotate((5 + 10.f/60) * 360 / 12); // 5 and 10/60 hours of 12 scaled to 360 degrees
- canvas->drawLine(0, 0, 0, -30, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ canvas->translate(128, 128);
+ canvas->drawCircle(0, 0, 60, paint);
+ canvas->save();
+ canvas->rotate(10 * 360 / 60); // 10 minutes of 60 scaled to 360 degrees
+ canvas->drawLine(0, 0, 0, -50, paint);
+ canvas->restore();
+ canvas->rotate((5 + 10.f/60) * 360 / 12); // 5 and 10/60 hours of 12 scaled to 360 degrees
+ canvas->drawLine(0, 0, 0, -30, paint);
}
##
@@ -2024,27 +2129,28 @@ void draw(SkCanvas* canvas) {
#Method void rotate(SkScalar degrees, SkScalar px, SkScalar py)
-Rotate Matrix by degrees about a point at (px, py). Positive degrees rotates clockwise.
+Rotate Matrix by degrees about a point at (px, py). Positive degrees rotates
+clockwise.
Mathematically, construct a rotation matrix. Pre-multiply the rotation matrix by
a translation matrix, then replace Matrix with the resulting matrix
pre-multiplied with Matrix.
-This has the effect of rotating the drawing about a given point before transforming
-the result with Matrix.
+This has the effect of rotating the drawing about a given point before
+transforming the result with Matrix.
-#Param degrees The amount to rotate, in degrees. ##
-#Param px The x coordinate of the point to rotate about. ##
-#Param py The y coordinate of the point to rotate about. ##
+#Param degrees amount to rotate, in degrees ##
+#Param px x-coordinate of the point to rotate about ##
+#Param py y-coordinate of the point to rotate about ##
#Example
#Height 192
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setTextSize(96);
- canvas->drawString("A1", 130, 100, paint);
- canvas->rotate(180, 130, 100);
- canvas->drawString("A1", 130, 100, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setTextSize(96);
+ canvas->drawString("A1", 130, 100, paint);
+ canvas->rotate(180, 130, 100);
+ canvas->drawString("A1", 130, 100, paint);
}
##
@@ -2056,19 +2162,18 @@ void draw(SkCanvas* canvas) {
#Method void skew(SkScalar sx, SkScalar sy)
-Skew Matrix by sx on the x-axis and sy on the y-axis. A positive value of sx skews the
-drawing right as y increases; a positive value of sy skews the drawing down as x increases.
-
-Mathematically, replace Matrix with a skew matrix
-pre-multiplied with Matrix.
+Skew Matrix by sx on the x-axis and sy on the y-axis. A positive value of sx
+skews the drawing right as y increases; a positive value of sy skews the drawing
+down as x increases.
-Preconcat the current matrix with the specified skew.
-#Param sx The amount to skew in x. ##
-#Param sy The amount to skew in y. ##
+Mathematically, replace Matrix with a skew matrix pre-multiplied with Matrix.
-This has the effect of scaling the drawing by (sx, sy) before transforming
+This has the effect of skewing the drawing by (sx, sy) before transforming
the result with Matrix.
+#Param sx amount to skew in x ##
+#Param sy amount to skew in y ##
+
#Example
#Description
Black text mimics an oblique text style by using a negative skew in x that
@@ -2077,20 +2182,20 @@ the result with Matrix.
increase.
Blue text combines x and y skew to rotate and scale.
##
- SkPaint paint;
- paint.setTextSize(128);
- canvas->translate(30, 130);
- canvas->save();
- canvas->skew(-.5, 0);
- canvas->drawString("A1", 0, 0, paint);
- canvas->restore();
- canvas->save();
- canvas->skew(0, .5);
- paint.setColor(SK_ColorRED);
- canvas->drawString("A1", 0, 0, paint);
- canvas->restore();
- canvas->skew(-.5, .5);
- paint.setColor(SK_ColorBLUE);
+ SkPaint paint;
+ paint.setTextSize(128);
+ canvas->translate(30, 130);
+ canvas->save();
+ canvas->skew(-.5, 0);
+ canvas->drawString("A1", 0, 0, paint);
+ canvas->restore();
+ canvas->save();
+ canvas->skew(0, .5);
+ paint.setColor(SK_ColorRED);
+ canvas->drawString("A1", 0, 0, paint);
+ canvas->restore();
+ canvas->skew(-.5, .5);
+ paint.setColor(SK_ColorBLUE);
canvas->drawString("A1", 0, 0, paint);
##
@@ -2102,27 +2207,27 @@ the result with Matrix.
#Method void concat(const SkMatrix& matrix)
-Replace Matrix with matrix pre-multiplied with Matrix.
+Replace Matrix with matrix pre-multiplied with existing Matrix.
-This has the effect of transforming the drawn geometry by matrix, before transforming
-the result with Matrix.
+This has the effect of transforming the drawn geometry by matrix, before
+transforming the result with existing Matrix.
-#Param matrix Pre-multiply with Matrix. ##
+#Param matrix matrix to pre-multiply with existing Matrix ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setTextSize(80);
- paint.setTextScaleX(.3);
- SkMatrix matrix;
- SkRect rect[2] = {{ 10, 20, 90, 110 }, { 40, 130, 140, 180 }};
- matrix.setRectToRect(rect[0], rect[1], SkMatrix::kFill_ScaleToFit);
- canvas->drawRect(rect[0], paint);
- canvas->drawRect(rect[1], paint);
- paint.setColor(SK_ColorWHITE);
- canvas->drawString("Here", rect[0].fLeft + 10, rect[0].fBottom - 10, paint);
- canvas->concat(matrix);
- canvas->drawString("There", rect[0].fLeft + 10, rect[0].fBottom - 10, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setTextSize(80);
+ paint.setTextScaleX(.3);
+ SkMatrix matrix;
+ SkRect rect[2] = {{ 10, 20, 90, 110 }, { 40, 130, 140, 180 }};
+ matrix.setRectToRect(rect[0], rect[1], SkMatrix::kFill_ScaleToFit);
+ canvas->drawRect(rect[0], paint);
+ canvas->drawRect(rect[1], paint);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawString("Here", rect[0].fLeft + 10, rect[0].fBottom - 10, paint);
+ canvas->concat(matrix);
+ canvas->drawString("There", rect[0].fLeft + 10, rect[0].fBottom - 10, paint);
}
##
@@ -2137,18 +2242,18 @@ void draw(SkCanvas* canvas) {
Replace Matrix with matrix.
Unlike concat(), any prior matrix state is overwritten.
-#Param matrix Copied into Matrix. ##
+#Param matrix matrix to copy, replacing existing Matrix ##
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- canvas->scale(4, 6);
- canvas->drawString("truth", 2, 10, paint);
- SkMatrix matrix;
- matrix.setScale(2.8f, 6);
- canvas->setMatrix(matrix);
- canvas->drawString("consequences", 2, 20, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ canvas->scale(4, 6);
+ canvas->drawString("truth", 2, 10, paint);
+ SkMatrix matrix;
+ matrix.setScale(2.8f, 6);
+ canvas->setMatrix(matrix);
+ canvas->drawString("consequences", 2, 20, paint);
}
##
@@ -2165,13 +2270,13 @@ Any prior matrix state is overwritten.
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- canvas->scale(4, 6);
- canvas->drawString("truth", 2, 10, paint);
- canvas->resetMatrix();
- canvas->scale(2.8f, 6);
- canvas->drawString("consequences", 2, 20, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ canvas->scale(4, 6);
+ canvas->drawString("truth", 2, 10, paint);
+ canvas->resetMatrix();
+ canvas->scale(2.8f, 6);
+ canvas->drawString("consequences", 2, 20, paint);
}
##
@@ -2186,13 +2291,13 @@ void draw(SkCanvas* canvas) {
Returns Matrix.
This does not account for translation by Device or Surface.
-#Return Matrix on Canvas. ##
+#Return Matrix in Canvas ##
#Example
- SkDebugf("isIdentity %s\n", canvas->getTotalMatrix().isIdentity() ? "true" : "false");
- #StdOut
- isIdentity true
- ##
+ SkDebugf("isIdentity %s\n", canvas->getTotalMatrix().isIdentity() ? "true" : "false");
+ #StdOut
+ isIdentity true
+ ##
##
#ToDo incomplete ##
@@ -2239,25 +2344,25 @@ and is unaffected by Matrix.
The edge of the aliased clip fully draws pixels in the red circle.
The edge of the anti-aliased clip partially draws pixels in the red circle.
##
- SkPaint redPaint, scalePaint;
- redPaint.setAntiAlias(true);
- redPaint.setColor(SK_ColorRED);
- canvas->save();
- for (bool antialias : { false, true } ) {
- canvas->save();
- canvas->clipRect(SkRect::MakeWH(19.5f, 11.5f), antialias);
- canvas->drawCircle(17, 11, 8, redPaint);
- canvas->restore();
- canvas->translate(16, 0);
- }
- canvas->restore();
- SkMatrix matrix;
- matrix.setScale(6, 6);
- scalePaint.setImageFilter(
- SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
- SkCanvas::SaveLayerRec saveLayerRec(
- nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);
- canvas->saveLayer(saveLayerRec);
+ SkPaint redPaint, scalePaint;
+ redPaint.setAntiAlias(true);
+ redPaint.setColor(SK_ColorRED);
+ canvas->save();
+ for (bool antialias : { false, true } ) {
+ canvas->save();
+ canvas->clipRect(SkRect::MakeWH(19.5f, 11.5f), antialias);
+ canvas->drawCircle(17, 11, 8, redPaint);
+ canvas->restore();
+ canvas->translate(16, 0);
+ }
+ canvas->restore();
+ SkMatrix matrix;
+ matrix.setScale(6, 6);
+ scalePaint.setImageFilter(
+ SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
+ SkCanvas::SaveLayerRec saveLayerRec(
+ nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);
+ canvas->saveLayer(saveLayerRec);
canvas->restore();
##
@@ -2267,23 +2372,23 @@ Replace Clip with the intersection or difference of Clip and rect,
with an aliased or anti-aliased clip edge. rect is transformed by Matrix
before it is combined with Clip.
-#Param rect Rectangle to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
-#Param doAntiAlias true if Clip is to be anti-aliased. ##
+#Param rect Rectangle to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
+#Param doAntiAlias true if Clip is to be anti-aliased ##
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- canvas->rotate(10);
- SkPaint paint;
- paint.setAntiAlias(true);
- for (auto alias: { false, true } ) {
- canvas->save();
- canvas->clipRect(SkRect::MakeWH(90, 80), SkClipOp::kIntersect, alias);
- canvas->drawCircle(100, 60, 60, paint);
- canvas->restore();
- canvas->translate(80, 0);
- }
+void draw(SkCanvas* canvas) {
+ canvas->rotate(10);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ for (auto alias: { false, true } ) {
+ canvas->save();
+ canvas->clipRect(SkRect::MakeWH(90, 80), SkClipOp::kIntersect, alias);
+ canvas->drawCircle(100, 60, 60, paint);
+ canvas->restore();
+ canvas->translate(80, 0);
+ }
}
##
@@ -2295,24 +2400,23 @@ void draw(SkCanvas* canvas) {
Replace Clip with the intersection or difference of Clip and rect.
Resulting Clip is aliased; pixels are fully contained by the clip.
-rect is transformed by Matrix
-before it is combined with Clip.
+rect is transformed by Matrix before it is combined with Clip.
-#Param rect Rectangle to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
+#Param rect Rectangle to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
#Example
#Height 192
#Width 280
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- for (SkClipOp op: { SkClipOp::kIntersect, SkClipOp::kDifference } ) {
- canvas->save();
- canvas->clipRect(SkRect::MakeWH(90, 120), op, false);
- canvas->drawCircle(100, 100, 60, paint);
- canvas->restore();
- canvas->translate(80, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ for (SkClipOp op: { SkClipOp::kIntersect, SkClipOp::kDifference } ) {
+ canvas->save();
+ canvas->clipRect(SkRect::MakeWH(90, 120), op, false);
+ canvas->drawCircle(100, 100, 60, paint);
+ canvas->restore();
+ canvas->translate(80, 0);
+ }
}
##
@@ -2327,8 +2431,8 @@ Resulting Clip is aliased; pixels are fully contained by the clip.
rect is transformed by Matrix
before it is combined with Clip.
-#Param rect Rectangle to combine with Clip. ##
-#Param doAntiAlias true if Clip is to be anti-aliased. ##
+#Param rect Rectangle to combine with Clip ##
+#Param doAntiAlias true if Clip is to be anti-aliased ##
#Example
#Height 133
@@ -2337,23 +2441,23 @@ before it is combined with Clip.
The same circle pieces blend with pixels more than once when anti-aliased,
visible as a thin pair of lines through the right circle.
##
-void draw(SkCanvas* canvas) {
- canvas->clear(SK_ColorWHITE);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setColor(0x8055aaff);
- SkRect clipRect = { 0, 0, 87.4f, 87.4f };
- for (auto alias: { false, true } ) {
- canvas->save();
- canvas->clipRect(clipRect, SkClipOp::kIntersect, alias);
- canvas->drawCircle(67, 67, 60, paint);
- canvas->restore();
- canvas->save();
- canvas->clipRect(clipRect, SkClipOp::kDifference, alias);
- canvas->drawCircle(67, 67, 60, paint);
- canvas->restore();
- canvas->translate(120, 0);
- }
+void draw(SkCanvas* canvas) {
+ canvas->clear(SK_ColorWHITE);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0x8055aaff);
+ SkRect clipRect = { 0, 0, 87.4f, 87.4f };
+ for (auto alias: { false, true } ) {
+ canvas->save();
+ canvas->clipRect(clipRect, SkClipOp::kIntersect, alias);
+ canvas->drawCircle(67, 67, 60, paint);
+ canvas->restore();
+ canvas->save();
+ canvas->clipRect(clipRect, SkClipOp::kDifference, alias);
+ canvas->drawCircle(67, 67, 60, paint);
+ canvas->restore();
+ canvas->translate(120, 0);
+ }
}
##
@@ -2368,12 +2472,13 @@ clipPath and intersect the current clip with the specified rect.
The max clip affects only future ops (it is not retroactive).
The clip restriction is not recorded in pictures.
+Pass an empty rect to disable max clip.
+
#Private
This is private API to be used only by Android framework.
##
-#Param rect The maximum allowed clip in device coordinates.
- Empty rect means max clip is not enforced.
+#Param rect maximum allowed clip in device coordinates
#Param ##
##
@@ -2385,21 +2490,21 @@ with an aliased or anti-aliased clip edge.
rrect is transformed by Matrix
before it is combined with Clip.
-#Param rrect Round_Rect to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
-#Param doAntiAlias true if Clip is to be antialiased. ##
+#Param rrect Round_Rect to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
+#Param doAntiAlias true if Clip is to be antialiased ##
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- canvas->clear(SK_ColorWHITE);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setColor(0x8055aaff);
- SkRRect oval;
- oval.setOval({10, 20, 90, 100});
- canvas->clipRRect(oval, SkClipOp::kIntersect, true);
- canvas->drawCircle(70, 100, 60, paint);
+void draw(SkCanvas* canvas) {
+ canvas->clear(SK_ColorWHITE);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0x8055aaff);
+ SkRRect oval;
+ oval.setOval({10, 20, 90, 100});
+ canvas->clipRRect(oval, SkClipOp::kIntersect, true);
+ canvas->drawCircle(70, 100, 60, paint);
}
##
@@ -2411,20 +2516,19 @@ void draw(SkCanvas* canvas) {
Replace Clip with the intersection or difference of Clip and rrect.
Resulting Clip is aliased; pixels are fully contained by the clip.
-rrect is transformed by Matrix
-before it is combined with Clip.
+rrect is transformed by Matrix before it is combined with Clip.
-#Param rrect Round_Rect to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
+#Param rrect Round_Rect to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setColor(0x8055aaff);
- auto oval = SkRRect::MakeOval({10, 20, 90, 100});
- canvas->clipRRect(oval, SkClipOp::kIntersect);
- canvas->drawCircle(70, 100, 60, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setColor(0x8055aaff);
+ auto oval = SkRRect::MakeOval({10, 20, 90, 100});
+ canvas->clipRRect(oval, SkClipOp::kIntersect);
+ canvas->drawCircle(70, 100, 60, paint);
}
##
@@ -2436,20 +2540,19 @@ void draw(SkCanvas* canvas) {
Replace Clip with the intersection of Clip and rrect,
with an aliased or anti-aliased clip edge.
-rrect is transformed by Matrix
-before it is combined with Clip.
+rrect is transformed by Matrix before it is combined with Clip.
-#Param rrect Round_Rect to combine with Clip. ##
-#Param doAntiAlias true if Clip is to be antialiased. ##
+#Param rrect Round_Rect to combine with Clip ##
+#Param doAntiAlias true if Clip is to be antialiased ##
#Example
#Height 128
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- auto oval = SkRRect::MakeRectXY({10, 20, 90, 100}, 9, 13);
- canvas->clipRRect(oval, true);
- canvas->drawCircle(70, 100, 60, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ auto oval = SkRRect::MakeRectXY({10, 20, 90, 100}, 9, 13);
+ canvas->clipRRect(oval, true);
+ canvas->drawCircle(70, 100, 60, paint);
}
##
@@ -2463,12 +2566,11 @@ Replace Clip with the intersection or difference of Clip and path,
with an aliased or anti-aliased clip edge. Path_Fill_Type determines if path
describes the area inside or outside its contours; and if Path_Contour overlaps
itself or another Path_Contour, whether the overlaps form part of the area.
-path is transformed by Matrix
-before it is combined with Clip.
+path is transformed by Matrix before it is combined with Clip.
-#Param path Path to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
-#Param doAntiAlias true if Clip is to be antialiased. ##
+#Param path Path to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
+#Param doAntiAlias true if Clip is to be antialiased ##
#Example
#Description
@@ -2478,20 +2580,20 @@ area outside clip is subtracted from circle.
Bottom figure uses SkPath::kWinding_FillType and SkClipOp::kIntersect;
area inside clip is intersected with circle.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkPath path;
- path.addRect({20, 30, 100, 110});
- path.setFillType(SkPath::kInverseWinding_FillType);
- canvas->save();
- canvas->clipPath(path, SkClipOp::kDifference, false);
- canvas->drawCircle(70, 100, 60, paint);
- canvas->restore();
- canvas->translate(100, 100);
- path.setFillType(SkPath::kWinding_FillType);
- canvas->clipPath(path, SkClipOp::kIntersect, false);
- canvas->drawCircle(70, 100, 60, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.addRect({20, 30, 100, 110});
+ path.setFillType(SkPath::kInverseWinding_FillType);
+ canvas->save();
+ canvas->clipPath(path, SkClipOp::kDifference, false);
+ canvas->drawCircle(70, 100, 60, paint);
+ canvas->restore();
+ canvas->translate(100, 100);
+ path.setFillType(SkPath::kWinding_FillType);
+ canvas->clipPath(path, SkClipOp::kIntersect, false);
+ canvas->drawCircle(70, 100, 60, paint);
}
##
@@ -2509,8 +2611,8 @@ itself or another Path_Contour, whether the overlaps form part of the area.
path is transformed by Matrix
before it is combined with Clip.
-#Param path Path to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
+#Param path Path to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
#Example
#Description
@@ -2518,21 +2620,21 @@ Overlapping Rects form a clip. When clip's Path_Fill_Type is set to
SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkPath path;
- path.addRect({20, 15, 100, 95});
- path.addRect({50, 65, 130, 135});
- path.setFillType(SkPath::kWinding_FillType);
- canvas->save();
- canvas->clipPath(path, SkClipOp::kIntersect);
- canvas->drawCircle(70, 85, 60, paint);
- canvas->restore();
- canvas->translate(100, 100);
- path.setFillType(SkPath::kEvenOdd_FillType);
- canvas->clipPath(path, SkClipOp::kIntersect);
- canvas->drawCircle(70, 85, 60, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.addRect({20, 15, 100, 95});
+ path.addRect({50, 65, 130, 135});
+ path.setFillType(SkPath::kWinding_FillType);
+ canvas->save();
+ canvas->clipPath(path, SkClipOp::kIntersect);
+ canvas->drawCircle(70, 85, 60, paint);
+ canvas->restore();
+ canvas->translate(100, 100);
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ canvas->clipPath(path, SkClipOp::kIntersect);
+ canvas->drawCircle(70, 85, 60, paint);
}
##
@@ -2547,11 +2649,10 @@ Resulting Clip is aliased; pixels are fully contained by the clip.
Path_Fill_Type determines if path
describes the area inside or outside its contours; and if Path_Contour overlaps
itself or another Path_Contour, whether the overlaps form part of the area.
-path is transformed by Matrix
-before it is combined with Clip.
+path is transformed by Matrix before it is combined with Clip.
-#Param path Path to combine with Clip. ##
-#Param doAntiAlias true if Clip is to be antialiased. ##
+#Param path Path to combine with Clip ##
+#Param doAntiAlias true if Clip is to be antialiased ##
#Example
#Height 212
@@ -2560,22 +2661,22 @@ Clip loops over itself covering its center twice. When clip's Path_Fill_Type
is set to SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkPath path;
- SkPoint poly[] = {{20, 20}, { 80, 20}, { 80, 80}, {40, 80},
- {40, 40}, {100, 40}, {100, 100}, {20, 100}};
- path.addPoly(poly, SK_ARRAY_COUNT(poly), true);
- path.setFillType(SkPath::kWinding_FillType);
- canvas->save();
- canvas->clipPath(path, SkClipOp::kIntersect);
- canvas->drawCircle(50, 50, 45, paint);
- canvas->restore();
- canvas->translate(100, 100);
- path.setFillType(SkPath::kEvenOdd_FillType);
- canvas->clipPath(path, SkClipOp::kIntersect);
- canvas->drawCircle(50, 50, 45, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ SkPoint poly[] = {{20, 20}, { 80, 20}, { 80, 80}, {40, 80},
+ {40, 40}, {100, 40}, {100, 100}, {20, 100}};
+ path.addPoly(poly, SK_ARRAY_COUNT(poly), true);
+ path.setFillType(SkPath::kWinding_FillType);
+ canvas->save();
+ canvas->clipPath(path, SkClipOp::kIntersect);
+ canvas->drawCircle(50, 50, 45, paint);
+ canvas->restore();
+ canvas->translate(100, 100);
+ path.setFillType(SkPath::kEvenOdd_FillType);
+ canvas->clipPath(path, SkClipOp::kIntersect);
+ canvas->drawCircle(50, 50, 45, paint);
}
##
@@ -2603,28 +2704,28 @@ Replace Clip with the intersection or difference of Clip and Region deviceRgn.
Resulting Clip is aliased; pixels are fully contained by the clip.
deviceRgn is unaffected by Matrix.
-#Param deviceRgn Region to combine with Clip. ##
-#Param op Clip_Op to apply to Clip. ##
+#Param deviceRgn Region to combine with Clip ##
+#Param op Clip_Op to apply to Clip ##
#Example
-#Description
- region is unaffected by canvas rotation; rect is affected by canvas rotation.
- Both clips are aliased; this is unnoticable on Region clip because it
- aligns to pixel boundaries.
-##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkIRect iRect = {30, 40, 120, 130 };
- SkRegion region(iRect);
- canvas->rotate(10);
- canvas->save();
- canvas->clipRegion(region, SkClipOp::kIntersect);
- canvas->drawCircle(50, 50, 45, paint);
- canvas->restore();
- canvas->translate(100, 100);
- canvas->clipRect(SkRect::Make(iRect), SkClipOp::kIntersect);
- canvas->drawCircle(50, 50, 45, paint);
+#Description
+ region is unaffected by canvas rotation; rect is affected by canvas rotation.
+ Both clips are aliased; this is unnoticable on Region clip because it
+ aligns to pixel boundaries.
+##
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkIRect iRect = {30, 40, 120, 130 };
+ SkRegion region(iRect);
+ canvas->rotate(10);
+ canvas->save();
+ canvas->clipRegion(region, SkClipOp::kIntersect);
+ canvas->drawCircle(50, 50, 45, paint);
+ canvas->restore();
+ canvas->translate(100, 100);
+ canvas->clipRect(SkRect::Make(iRect), SkClipOp::kIntersect);
+ canvas->drawCircle(50, 50, 45, paint);
}
##
@@ -2639,24 +2740,24 @@ outside of Clip. May return false even though rect is outside of Clip.
Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
-#Param rect Rect to compare with Clip. ##
+#Param rect Rect to compare with Clip ##
-#Return true if rect, transformed by Matrix, does not intersect Clip. ##
+#Return true if rect, transformed by Matrix, does not intersect Clip ##
#Example
-void draw(SkCanvas* canvas) {
- SkRect testRect = {30, 30, 120, 129 };
- SkRect clipRect = {30, 130, 120, 230 };
- canvas->save();
- canvas->clipRect(clipRect);
- SkDebugf("quickReject %s\n", canvas->quickReject(testRect) ? "true" : "false");
- canvas->restore();
- canvas->rotate(10);
- canvas->clipRect(clipRect);
- SkDebugf("quickReject %s\n", canvas->quickReject(testRect) ? "true" : "false");
+void draw(SkCanvas* canvas) {
+ SkRect testRect = {30, 30, 120, 129 };
+ SkRect clipRect = {30, 130, 120, 230 };
+ canvas->save();
+ canvas->clipRect(clipRect);
+ SkDebugf("quickReject %s\n", canvas->quickReject(testRect) ? "true" : "false");
+ canvas->restore();
+ canvas->rotate(10);
+ canvas->clipRect(clipRect);
+ SkDebugf("quickReject %s\n", canvas->quickReject(testRect) ? "true" : "false");
}
#StdOut
- quickReject true
+ quickReject true
quickReject false
##
##
@@ -2672,26 +2773,26 @@ outside of Clip. May return false even though path is outside of Clip.
Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
-#Param path Path to compare with Clip. ##
+#Param path Path to compare with Clip ##
-#Return true if path, transformed by Matrix, does not intersect Clip. ##
+#Return true if path, transformed by Matrix, does not intersect Clip ##
#Example
-void draw(SkCanvas* canvas) {
- SkPoint testPoints[] = {{30, 30}, {120, 30}, {120, 129} };
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
- SkPath testPath, clipPath;
- testPath.addPoly(testPoints, SK_ARRAY_COUNT(testPoints), true);
- clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
- canvas->save();
- canvas->clipPath(clipPath);
- SkDebugf("quickReject %s\n", canvas->quickReject(testPath) ? "true" : "false");
- canvas->restore();
- canvas->rotate(10);
- canvas->clipPath(clipPath);
- SkDebugf("quickReject %s\n", canvas->quickReject(testPath) ? "true" : "false");
+void draw(SkCanvas* canvas) {
+ SkPoint testPoints[] = {{30, 30}, {120, 30}, {120, 129} };
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPath testPath, clipPath;
+ testPath.addPoly(testPoints, SK_ARRAY_COUNT(testPoints), true);
+ clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
+ canvas->save();
+ canvas->clipPath(clipPath);
+ SkDebugf("quickReject %s\n", canvas->quickReject(testPath) ? "true" : "false");
+ canvas->restore();
+ canvas->rotate(10);
+ canvas->clipPath(clipPath);
+ SkDebugf("quickReject %s\n", canvas->quickReject(testPath) ? "true" : "false");
#StdOut
- quickReject true
+ quickReject true
quickReject false
##
}
@@ -2709,7 +2810,7 @@ return SkRect::MakeEmpty, where all Rect sides equal zero.
Rect returned is outset by one to account for partial pixel coverage if Clip
is anti-aliased.
-#Return bounds of Clip in local coordinates. ##
+#Return bounds of Clip in local coordinates ##
#Example
#Description
@@ -2717,27 +2818,27 @@ is anti-aliased.
Clipped bounds is clipPath bounds outset by 1 on all sides.
Scaling the canvas by two in x and y scales the local bounds by 1/2 in x and y.
##
- SkCanvas local(256, 256);
- canvas = &local;
- SkRect bounds = canvas->getLocalClipBounds();
- SkDebugf("left:%g top:%g right:%g bottom:%g\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
- SkPath clipPath;
- clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
- canvas->clipPath(clipPath);
- bounds = canvas->getLocalClipBounds();
- SkDebugf("left:%g top:%g right:%g bottom:%g\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- canvas->scale(2, 2);
- bounds = canvas->getLocalClipBounds();
- SkDebugf("left:%g top:%g right:%g bottom:%g\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- #StdOut
- left:-1 top:-1 right:257 bottom:257
- left:29 top:129 right:121 bottom:231
- left:14.5 top:64.5 right:60.5 bottom:115.5
- ##
+ SkCanvas local(256, 256);
+ canvas = &local;
+ SkRect bounds = canvas->getLocalClipBounds();
+ SkDebugf("left:%g top:%g right:%g bottom:%g\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPath clipPath;
+ clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
+ canvas->clipPath(clipPath);
+ bounds = canvas->getLocalClipBounds();
+ SkDebugf("left:%g top:%g right:%g bottom:%g\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ canvas->scale(2, 2);
+ bounds = canvas->getLocalClipBounds();
+ SkDebugf("left:%g top:%g right:%g bottom:%g\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ #StdOut
+ left:-1 top:-1 right:257 bottom:257
+ left:29 top:129 right:121 bottom:231
+ left:14.5 top:64.5 right:60.5 bottom:115.5
+ ##
##
# local canvas in example works around bug in fiddle ##
@@ -2753,24 +2854,24 @@ return false, and set bounds to SkRect::MakeEmpty, where all Rect sides equal ze
bounds is outset by one to account for partial pixel coverage if Clip
is anti-aliased.
-#Param bounds Rect of Clip in local coordinates. ##
+#Param bounds Rect of Clip in local coordinates ##
-#Return true if Clip bounds is not empty. ##
+#Return true if Clip bounds is not empty ##
#Example
- void draw(SkCanvas* canvas) {
- SkCanvas local(256, 256);
- canvas = &local;
- SkRect bounds;
- SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
- ? "false" : "true");
- SkPath path;
- canvas->clipPath(path);
- SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
- ? "false" : "true");
+ void draw(SkCanvas* canvas) {
+ SkCanvas local(256, 256);
+ canvas = &local;
+ SkRect bounds;
+ SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
+ ? "false" : "true");
+ SkPath path;
+ canvas->clipPath(path);
+ SkDebugf("local bounds empty = %s\n", canvas->getLocalClipBounds(&bounds)
+ ? "false" : "true");
}
#StdOut
- local bounds empty = false
+ local bounds empty = false
local bounds empty = true
##
##
@@ -2787,37 +2888,37 @@ return SkRect::MakeEmpty, where all Rect sides equal zero.
Unlike getLocalClipBounds, returned IRect is not outset.
-#Return bounds of Clip in Device coordinates. ##
+#Return bounds of Clip in Device coordinates ##
#Example
-void draw(SkCanvas* canvas) {
- #Description
+void draw(SkCanvas* canvas) {
+ #Description
Initial bounds is device bounds, not outset.
Clipped bounds is clipPath bounds, not outset.
Scaling the canvas by 1/2 in x and y scales the device bounds by 1/2 in x and y.
- ##
- SkCanvas device(256, 256);
- canvas = &device;
- SkIRect bounds = canvas->getDeviceClipBounds();
- SkDebugf("left:%d top:%d right:%d bottom:%d\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
- SkPath clipPath;
- clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
- canvas->save();
- canvas->clipPath(clipPath);
- bounds = canvas->getDeviceClipBounds();
- SkDebugf("left:%d top:%d right:%d bottom:%d\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- canvas->restore();
- canvas->scale(1.f/2, 1.f/2);
- canvas->clipPath(clipPath);
- bounds = canvas->getDeviceClipBounds();
- SkDebugf("left:%d top:%d right:%d bottom:%d\n",
- bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ ##
+ SkCanvas device(256, 256);
+ canvas = &device;
+ SkIRect bounds = canvas->getDeviceClipBounds();
+ SkDebugf("left:%d top:%d right:%d bottom:%d\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPath clipPath;
+ clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
+ canvas->save();
+ canvas->clipPath(clipPath);
+ bounds = canvas->getDeviceClipBounds();
+ SkDebugf("left:%d top:%d right:%d bottom:%d\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ canvas->restore();
+ canvas->scale(1.f/2, 1.f/2);
+ canvas->clipPath(clipPath);
+ bounds = canvas->getDeviceClipBounds();
+ SkDebugf("left:%d top:%d right:%d bottom:%d\n",
+ bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
#StdOut
- left:0 top:0 right:256 bottom:256
- left:30 top:130 right:120 bottom:230
+ left:0 top:0 right:256 bottom:256
+ left:30 top:130 right:120 bottom:230
left:15 top:65 right:60 bottom:115
##
}
@@ -2837,22 +2938,22 @@ return false, and set bounds to SkRect::MakeEmpty, where all Rect sides equal ze
Unlike getLocalClipBounds, bounds is not outset.
-#Param bounds Rect of Clip in device coordinates. ##
+#Param bounds Rect of Clip in device coordinates ##
-#Return true if Clip bounds is not empty. ##
+#Return true if Clip bounds is not empty ##
#Example
- void draw(SkCanvas* canvas) {
- SkIRect bounds;
- SkDebugf("device bounds empty = %s\n", canvas->getDeviceClipBounds(&bounds)
- ? "false" : "true");
- SkPath path;
- canvas->clipPath(path);
- SkDebugf("device bounds empty = %s\n", canvas->getDeviceClipBounds(&bounds)
- ? "false" : "true");
+ void draw(SkCanvas* canvas) {
+ SkIRect bounds;
+ SkDebugf("device bounds empty = %s\n", canvas->getDeviceClipBounds(&bounds)
+ ? "false" : "true");
+ SkPath path;
+ canvas->clipPath(path);
+ SkDebugf("device bounds empty = %s\n", canvas->getDeviceClipBounds(&bounds)
+ ? "false" : "true");
}
#StdOut
- device bounds empty = false
+ device bounds empty = false
device bounds empty = true
##
##
@@ -2870,15 +2971,15 @@ Unlike getLocalClipBounds, bounds is not outset.
Fill Clip with Color color.
mode determines how Color_ARGB is combined with destination.
-#Param color Unpremultiplied Color_ARGB. ##
-#Param mode SkBlendMode used to combine source color and destination. ##
+#Param color Unpremultiplied Color_ARGB ##
+#Param mode SkBlendMode used to combine source color and destination ##
#Example
- canvas->drawColor(SK_ColorRED);
- canvas->clipRect(SkRect::MakeWH(150, 150));
- canvas->drawColor(SkColorSetARGB(0x80, 0x00, 0xFF, 0x00), SkBlendMode::kPlus);
- canvas->clipRect(SkRect::MakeWH(75, 75));
- canvas->drawColor(SkColorSetARGB(0x80, 0x00, 0x00, 0xFF), SkBlendMode::kPlus);
+ canvas->drawColor(SK_ColorRED);
+ canvas->clipRect(SkRect::MakeWH(150, 150));
+ canvas->drawColor(SkColorSetARGB(0x80, 0x00, 0xFF, 0x00), SkBlendMode::kPlus);
+ canvas->clipRect(SkRect::MakeWH(75, 75));
+ canvas->drawColor(SkColorSetARGB(0x80, 0x00, 0x00, 0xFF), SkBlendMode::kPlus);
##
#ToDo incomplete ##
@@ -2892,20 +2993,20 @@ mode determines how Color_ARGB is combined with destination.
Fill Clip with Color color using SkBlendMode::kSrc.
This has the effect of replacing all pixels contained by Clip with color.
-#Param color Unpremultiplied Color_ARGB. ##
+#Param color Unpremultiplied Color_ARGB ##
#Example
-void draw(SkCanvas* canvas) {
- canvas->save();
- canvas->clipRect(SkRect::MakeWH(256, 128));
- canvas->clear(SkColorSetARGB(0x80, 0xFF, 0x00, 0x00));
- canvas->restore();
- canvas->save();
- canvas->clipRect(SkRect::MakeWH(150, 192));
- canvas->clear(SkColorSetARGB(0x80, 0x00, 0xFF, 0x00));
- canvas->restore();
- canvas->clipRect(SkRect::MakeWH(75, 256));
- canvas->clear(SkColorSetARGB(0x80, 0x00, 0x00, 0xFF));
+void draw(SkCanvas* canvas) {
+ canvas->save();
+ canvas->clipRect(SkRect::MakeWH(256, 128));
+ canvas->clear(SkColorSetARGB(0x80, 0xFF, 0x00, 0x00));
+ canvas->restore();
+ canvas->save();
+ canvas->clipRect(SkRect::MakeWH(150, 192));
+ canvas->clear(SkColorSetARGB(0x80, 0x00, 0xFF, 0x00));
+ canvas->restore();
+ canvas->clipRect(SkRect::MakeWH(75, 256));
+ canvas->clear(SkColorSetARGB(0x80, 0x00, 0x00, 0xFF));
}
##
@@ -2940,21 +3041,21 @@ any cached data is deleted when owning Surface or Device is deleted.
#Method void drawPaint(const SkPaint& paint)
-Fill Clip with Paint paint. drawPaint is affected by Paint components
-Rasterizer, Mask_Filter, Shader, Color_Filter, Image_Filter, and Blend_Mode; but not by
-Path_Effect.
+Fill Clip with Paint paint. Paint components Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Blend_Mode affect drawing;
+Path_Effect in paint is ignored.
# can Path_Effect in paint ever alter drawPaint?
-#Param paint Used to fill the canvas. ##
+#Param paint graphics state used to fill Canvas ##
#Example
-void draw(SkCanvas* canvas) {
- SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
- SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
- SkPaint paint;
- paint.setShader(SkGradientShader::MakeSweep(256, 256, colors, pos, SK_ARRAY_COUNT(colors)));
- canvas->drawPaint(paint);
+void draw(SkCanvas* canvas) {
+ SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
+ SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 };
+ SkPaint paint;
+ paint.setShader(SkGradientShader::MakeSweep(256, 256, colors, pos, SK_ARRAY_COUNT(colors)));
+ canvas->drawPaint(paint);
}
##
@@ -2996,20 +3097,20 @@ an open polygon.
The lower right corner shows two lines; when draw as polygon, no miter is drawn at the corner.
The lower left corner shows two lines with a miter when path contains polygon.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(10);
- SkPoint points[] = {{64, 32}, {96, 96}, {32, 96}};
- canvas->drawPoints(SkCanvas::kPoints_PointMode, 3, points, paint);
- canvas->translate(128, 0);
- canvas->drawPoints(SkCanvas::kLines_PointMode, 3, points, paint);
- canvas->translate(0, 128);
- canvas->drawPoints(SkCanvas::kPolygon_PointMode, 3, points, paint);
- SkPath path;
- path.addPoly(points, 3, false);
- canvas->translate(-128, 0);
- canvas->drawPath(path, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(10);
+ SkPoint points[] = {{64, 32}, {96, 96}, {32, 96}};
+ canvas->drawPoints(SkCanvas::kPoints_PointMode, 3, points, paint);
+ canvas->translate(128, 0);
+ canvas->drawPoints(SkCanvas::kLines_PointMode, 3, points, paint);
+ canvas->translate(0, 128);
+ canvas->drawPoints(SkCanvas::kPolygon_PointMode, 3, points, paint);
+ SkPath path;
+ path.addPoly(points, 3, false);
+ canvas->translate(-128, 0);
+ canvas->drawPath(path, paint);
}
##
@@ -3022,13 +3123,14 @@ void draw(SkCanvas* canvas) {
#Method void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint)
Draw pts using Clip, Matrix and Paint paint.
-count is the number of points; if count is less than one, drawPoints has no effect.
+count is the number of points; if count is less than one, has no effect.
mode may be one of: kPoints_PointMode, kLines_PointMode, or kPolygon_PointMode.
-If mode is kPoints_PointMode, the shape of point drawn depends on paint Paint_Stroke_Cap.
-If paint is set to SkPaint::kRound_Cap, each point draws a circle of diameter Paint_Stroke_Width.
-If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
-each point draws a square of width and height Paint_Stroke_Width.
+If mode is kPoints_PointMode, the shape of point drawn depends on paint
+Paint_Stroke_Cap. If paint is set to SkPaint::kRound_Cap, each point draws a
+circle of diameter Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap
+or SkPaint::kButt_Cap, each point draws a square of width and height
+Paint_Stroke_Width.
If mode is kLines_PointMode, each pair of points draws a line segment.
One line is drawn for every two points; each point is used once. If count is odd,
@@ -3040,14 +3142,14 @@ count minus one lines are drawn; the first and last point are used once.
Each line segment respects paint Paint_Stroke_Cap and Paint_Stroke_Width.
Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
-drawPoints always draws each element one at a time; drawPoints is not affected by
-Paint_Stroke_Join, and unlike drawPath, does not create a mask from all points and lines
-before drawing.
+Always draws each element one at a time; is not affected by
+Paint_Stroke_Join, and unlike drawPath, does not create a mask from all points
+and lines before drawing.
-#Param mode Whether pts draws points or lines. ##
-#Param count The number of points in the array. ##
-#Param pts Array of points to draw. ##
-#Param paint Stroke, blend, color, and so on, used to draw. ##
+#Param mode Whether pts draws points or lines ##
+#Param count The number of points in the array ##
+#Param pts Array of points to draw ##
+#Param paint Stroke, blend, color, and so on, used to draw ##
#Example
#Height 200
@@ -3064,31 +3166,31 @@ before drawing.
The transparent color makes multiple line draws visible;
the path is drawn all at once.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(10);
- paint.setColor(0x80349a45);
- const SkPoint points[] = {{32, 16}, {48, 48}, {16, 32}};
- const SkPaint::Join join[] = { SkPaint::kRound_Join,
- SkPaint::kMiter_Join,
- SkPaint::kBevel_Join };
- int joinIndex = 0;
- SkPath path;
- path.addPoly(points, 3, false);
- for (const auto cap : { SkPaint::kRound_Cap, SkPaint::kSquare_Cap, SkPaint::kButt_Cap } ) {
- paint.setStrokeCap(cap);
- paint.setStrokeJoin(join[joinIndex++]);
- for (const auto mode : { SkCanvas::kPoints_PointMode,
- SkCanvas::kLines_PointMode,
- SkCanvas::kPolygon_PointMode } ) {
- canvas->drawPoints(mode, 3, points, paint);
- canvas->translate(64, 0);
- }
- canvas->drawPath(path, paint);
- canvas->translate(-192, 64);
- }
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(10);
+ paint.setColor(0x80349a45);
+ const SkPoint points[] = {{32, 16}, {48, 48}, {16, 32}};
+ const SkPaint::Join join[] = { SkPaint::kRound_Join,
+ SkPaint::kMiter_Join,
+ SkPaint::kBevel_Join };
+ int joinIndex = 0;
+ SkPath path;
+ path.addPoly(points, 3, false);
+ for (const auto cap : { SkPaint::kRound_Cap, SkPaint::kSquare_Cap, SkPaint::kButt_Cap } ) {
+ paint.setStrokeCap(cap);
+ paint.setStrokeJoin(join[joinIndex++]);
+ for (const auto mode : { SkCanvas::kPoints_PointMode,
+ SkCanvas::kLines_PointMode,
+ SkCanvas::kPolygon_PointMode } ) {
+ canvas->drawPoints(mode, 3, points, paint);
+ canvas->translate(64, 0);
+ }
+ canvas->drawPath(path, paint);
+ canvas->translate(-192, 64);
+ }
}
##
@@ -3103,28 +3205,28 @@ void draw(SkCanvas* canvas) {
Draw point at (x, y) using Clip, Matrix and Paint paint.
The shape of point drawn depends on paint Paint_Stroke_Cap.
-If paint is set to SkPaint::kRound_Cap, draw a circle of diameter Paint_Stroke_Width.
-If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
+If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
+Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
draw a square of width and height Paint_Stroke_Width.
Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
-#Param x Left edge of circle or square. ##
-#Param y Top edge of circle or square. ##
-#Param paint Stroke, blend, color, and so on, used to draw. ##
+#Param x left edge of circle or square ##
+#Param y top edge of circle or square ##
+#Param paint stroke, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setColor(0x80349a45);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(100);
- paint.setStrokeCap(SkPaint::kRound_Cap);
- canvas->scale(1, 1.2f);
- canvas->drawPoint(64, 96, paint);
- canvas->scale(.6f, .8f);
- paint.setColor(SK_ColorWHITE);
- canvas->drawPoint(106, 120, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0x80349a45);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(100);
+ paint.setStrokeCap(SkPaint::kRound_Cap);
+ canvas->scale(1, 1.2f);
+ canvas->drawPoint(64, 96, paint);
+ canvas->scale(.6f, .8f);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawPoint(106, 120, paint);
}
##
@@ -3132,29 +3234,89 @@ void draw(SkCanvas* canvas) {
##
+#Method void drawPoint(SkPoint p, const SkPaint& paint)
+
+Draw point p using Clip, Matrix and Paint paint.
+
+The shape of point drawn depends on paint Paint_Stroke_Cap.
+If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
+Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
+draw a square of width and height Paint_Stroke_Width.
+Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
+
+#Param p top-left edge of circle or square ##
+#Param paint stroke, blend, color, and so on, used to draw ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0x80349a45);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(100);
+ paint.setStrokeCap(SkPaint::kSquare_Cap);
+ canvas->scale(1, 1.2f);
+ canvas->drawPoint({64, 96}, paint);
+ canvas->scale(.6f, .8f);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawPoint(106, 120, paint);
+}
+##
+
+#SeeAlso drawPoints drawCircle drawRect
+
+##
+
# ------------------------------------------------------------------------------
#Method void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint& paint)
-Draw line segment from (x0, y0) to (x1, y1) using Clip, Matrix, and Paint paint.
-In paint: Paint_Stroke_Width describes the line thickness; Paint_Stroke_Cap draws the end rounded or square;
+Draws line segment from (x0, y0) to (x1, y1) using Clip, Matrix, and Paint paint.
+In paint: Paint_Stroke_Width describes the line thickness;
+Paint_Stroke_Cap draws the end rounded or square;
Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
-#Param x0 Start of line segment on x-axis. ##
-#Param y0 Start of line segment on y-axis. ##
-#Param x1 End of line segment on x-axis. ##
-#Param y1 End of line segment on y-axis. ##
-#Param paint Stroke, blend, color, and so on, used to draw. ##
+#Param x0 start of line segment on x-axis ##
+#Param y0 start of line segment on y-axis ##
+#Param x1 end of line segment on x-axis ##
+#Param y1 end of line segment on y-axis ##
+#Param paint stroke, blend, color, and so on, used to draw ##
#Example
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setColor(0xFF9a67be);
- paint.setStrokeWidth(20);
- canvas->skew(1, 0);
- canvas->drawLine(32, 96, 32, 160, paint);
- canvas->skew(-2, 0);
- canvas->drawLine(288, 96, 288, 160, paint);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0xFF9a67be);
+ paint.setStrokeWidth(20);
+ canvas->skew(1, 0);
+ canvas->drawLine(32, 96, 32, 160, paint);
+ canvas->skew(-2, 0);
+ canvas->drawLine(288, 96, 288, 160, paint);
+##
+
+#ToDo incomplete ##
+
+##
+
+#Method void drawLine(SkPoint p0, SkPoint p1, const SkPaint& paint)
+
+Draws line segment from p0 to p1 using Clip, Matrix, and Paint paint.
+In paint: Paint_Stroke_Width describes the line thickness;
+Paint_Stroke_Cap draws the end rounded or square;
+Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
+
+#Param p0 start of line segment ##
+#Param p1 end of line segment ##
+#Param paint stroke, blend, color, and so on, used to draw ##
+
+#Example
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(0xFF9a67be);
+ paint.setStrokeWidth(20);
+ canvas->skew(1, 0);
+ canvas->drawLine({32, 96}, {32, 160}, paint);
+ canvas->skew(-2, 0);
+ canvas->drawLine({288, 96}, {288, 160}, paint);
##
#ToDo incomplete ##
@@ -3170,26 +3332,26 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param rect The rectangle to be drawn. ##
-#Param paint Stroke or fill, blend, color, and so on, used to draw. ##
+#Param rect rectangle to be drawn ##
+#Param paint stroke or fill, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkPoint rectPts[] = { {64, 48}, {192, 160} };
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(20);
- paint.setStrokeJoin(SkPaint::kRound_Join);
- SkMatrix rotator;
- rotator.setRotate(30, 128, 128);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorMAGENTA } ) {
- paint.setColor(color);
- SkRect rect;
- rect.set(rectPts[0], rectPts[1]);
- canvas->drawRect(rect, paint);
- rotator.mapPoints(rectPts, 2);
- }
+void draw(SkCanvas* canvas) {
+ SkPoint rectPts[] = { {64, 48}, {192, 160} };
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ SkMatrix rotator;
+ rotator.setRotate(30, 128, 128);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorMAGENTA } ) {
+ paint.setColor(color);
+ SkRect rect;
+ rect.set(rectPts[0], rectPts[1]);
+ canvas->drawRect(rect, paint);
+ rotator.mapPoints(rectPts, 2);
+ }
}
##
@@ -3206,21 +3368,21 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param rect The rectangle to be drawn. ##
-#Param paint Stroke or fill, blend, color, and so on, used to draw. ##
+#Param rect rectangle to be drawn ##
+#Param paint stroke or fill, blend, color, and so on, used to draw ##
#Example
- SkIRect rect = { 64, 48, 192, 160 };
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(20);
- paint.setStrokeJoin(SkPaint::kRound_Join);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorMAGENTA } ) {
- paint.setColor(color);
- canvas->drawIRect(rect, paint);
- canvas->rotate(30, 128, 128);
- }
+ SkIRect rect = { 64, 48, 192, 160 };
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorMAGENTA } ) {
+ paint.setColor(color);
+ canvas->drawIRect(rect, paint);
+ canvas->rotate(30, 128, 128);
+ }
##
#ToDo incomplete ##
@@ -3236,20 +3398,20 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param region The region to be drawn. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param region region to be drawn ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkRegion region;
- region.op( 10, 10, 50, 50, SkRegion::kUnion_Op);
- region.op( 10, 50, 90, 90, SkRegion::kUnion_Op);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(20);
- paint.setStrokeJoin(SkPaint::kRound_Join);
- canvas->drawRegion(region, paint);
+void draw(SkCanvas* canvas) {
+ SkRegion region;
+ region.op( 10, 10, 50, 50, SkRegion::kUnion_Op);
+ region.op( 10, 50, 90, 90, SkRegion::kUnion_Op);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ canvas->drawRegion(region, paint);
}
##
@@ -3265,22 +3427,22 @@ Draw Oval oval using Clip, Matrix, and Paint.
In paint: Paint_Style determines if Oval is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
-#Param oval Rect bounds of Oval. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param oval Rect bounds of Oval ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- canvas->clear(0xFF3f5f9f);
- SkColor kColor1 = SkColorSetARGB(0xff, 0xff, 0x7f, 0);
- SkColor g1Colors[] = { kColor1, SkColorSetA(kColor1, 0x20) };
- SkPoint g1Points[] = { { 0, 0 }, { 0, 100 } };
- SkScalar pos[] = { 0.2f, 1.0f };
- SkRect bounds = SkRect::MakeWH(80, 70);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setShader(SkGradientShader::MakeLinear(g1Points, g1Colors, pos, SK_ARRAY_COUNT(g1Colors),
- SkShader::kClamp_TileMode));
- canvas->drawOval(bounds , paint);
+void draw(SkCanvas* canvas) {
+ canvas->clear(0xFF3f5f9f);
+ SkColor kColor1 = SkColorSetARGB(0xff, 0xff, 0x7f, 0);
+ SkColor g1Colors[] = { kColor1, SkColorSetA(kColor1, 0x20) };
+ SkPoint g1Points[] = { { 0, 0 }, { 0, 100 } };
+ SkScalar pos[] = { 0.2f, 1.0f };
+ SkRect bounds = SkRect::MakeWH(80, 70);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setShader(SkGradientShader::MakeLinear(g1Points, g1Colors, pos, SK_ARRAY_COUNT(g1Colors),
+ SkShader::kClamp_TileMode));
+ canvas->drawOval(bounds , paint);
}
##
@@ -3296,31 +3458,31 @@ Draw Round_Rect rrect using Clip, Matrix, and Paint paint.
In paint: Paint_Style determines if rrect is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
-rrect may represent a rectangle, circle, oval, uniformly rounded rectangle, or may have
-any combination of positive non-square radii for the four corners.
+rrect may represent a rectangle, circle, oval, uniformly rounded rectangle, or
+may have any combination of positive non-square radii for the four corners.
-#Param rrect Round_Rect with up to eight corner radii to draw. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param rrect Round_Rect with up to eight corner radii to draw ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkRect outer = {30, 40, 210, 220};
- SkRect radii = {30, 50, 70, 90 };
- SkRRect rRect;
- rRect.setNinePatch(outer, radii.fLeft, radii.fTop, radii.fRight, radii.fBottom);
- canvas->drawRRect(rRect, paint);
- paint.setColor(SK_ColorWHITE);
- canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop,
- outer.fLeft + radii.fLeft, outer.fBottom, paint);
- canvas->drawLine(outer.fRight - radii.fRight, outer.fTop,
- outer.fRight - radii.fRight, outer.fBottom, paint);
- canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop,
- outer.fRight, outer.fTop + radii.fTop, paint);
- canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom,
- outer.fRight, outer.fBottom - radii.fBottom, paint);
-}
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkRect outer = {30, 40, 210, 220};
+ SkRect radii = {30, 50, 70, 90 };
+ SkRRect rRect;
+ rRect.setNinePatch(outer, radii.fLeft, radii.fTop, radii.fRight, radii.fBottom);
+ canvas->drawRRect(rRect, paint);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop,
+ outer.fLeft + radii.fLeft, outer.fBottom, paint);
+ canvas->drawLine(outer.fRight - radii.fRight, outer.fTop,
+ outer.fRight - radii.fRight, outer.fBottom, paint);
+ canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop,
+ outer.fRight, outer.fTop + radii.fTop, paint);
+ canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom,
+ outer.fRight, outer.fBottom - radii.fBottom, paint);
+}
##
#ToDo incomplete ##
@@ -3336,23 +3498,23 @@ using Clip, Matrix, and Paint paint.
outer must contain inner or the drawing is undefined.
In paint: Paint_Style determines if rrect is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
-If stroked and Round_Rect corner has zero length radii, Paint_Stroke_Join can draw
-corners rounded or square.
+If stroked and Round_Rect corner has zero length radii, Paint_Stroke_Join can
+draw corners rounded or square.
-GPU-backed platforms take advantage of drawDRRect since both outer and inner are
+GPU-backed platforms optimize drawing when both outer and inner are
concave and outer contains inner. These platforms may not be able to draw
Path built with identical data as fast.
-#Param outer Round_Rect outer bounds to draw. ##
-#Param inner Round_Rect inner bounds to draw. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param outer Round_Rect outer bounds to draw ##
+#Param inner Round_Rect inner bounds to draw ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200});
- SkRRect inner = SkRRect::MakeOval({60, 70, 170, 160});
- SkPaint paint;
- canvas->drawDRRect(outer, inner, paint);
+void draw(SkCanvas* canvas) {
+ SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200});
+ SkRRect inner = SkRRect::MakeOval({60, 70, 170, 160});
+ SkPaint paint;
+ canvas->drawDRRect(outer, inner, paint);
}
##
@@ -3362,18 +3524,18 @@ void draw(SkCanvas* canvas) {
Inner Round_Rect has corner radii; outset stroke increases radii of corners.
Stroke join does not affect inner Round_Rect since it has no sharp corners.
##
-void draw(SkCanvas* canvas) {
- SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200});
- SkRRect inner = SkRRect::MakeRectXY({60, 70, 170, 160}, 10, 10);
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(20);
- paint.setStrokeJoin(SkPaint::kRound_Join);
- canvas->drawDRRect(outer, inner, paint);
- paint.setStrokeWidth(1);
- paint.setColor(SK_ColorWHITE);
- canvas->drawDRRect(outer, inner, paint);
+void draw(SkCanvas* canvas) {
+ SkRRect outer = SkRRect::MakeRect({20, 40, 210, 200});
+ SkRRect inner = SkRRect::MakeRectXY({60, 70, 170, 160}, 10, 10);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ canvas->drawDRRect(outer, inner, paint);
+ paint.setStrokeWidth(1);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawDRRect(outer, inner, paint);
}
##
@@ -3390,21 +3552,48 @@ If radius is zero or less, nothing is drawn.
In paint: Paint_Style determines if Circle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
-#Param cx Circle center on the x-axis. ##
-#Param cy Circle center on the y-axis. ##
-#Param radius Half the diameter of Circle. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param cx Circle center on the x-axis ##
+#Param cy Circle center on the y-axis ##
+#Param radius half the diameter of Circle ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
- void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- canvas->drawCircle(128, 128, 90, paint);
- paint.setColor(SK_ColorWHITE);
- canvas->drawCircle(86, 86, 20, paint);
- canvas->drawCircle(160, 76, 20, paint);
- canvas->drawCircle(140, 150, 35, paint);
- }
+ void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ canvas->drawCircle(128, 128, 90, paint);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawCircle(86, 86, 20, paint);
+ canvas->drawCircle(160, 76, 20, paint);
+ canvas->drawCircle(140, 150, 35, paint);
+ }
+##
+
+#ToDo incomplete ##
+
+##
+
+#Method void drawCircle(SkPoint center, SkScalar radius, const SkPaint& paint)
+
+Draw Circle at (cx, cy) with radius using Clip, Matrix, and Paint paint.
+If radius is zero or less, nothing is drawn.
+In paint: Paint_Style determines if Circle is stroked or filled;
+if stroked, Paint_Stroke_Width describes the line thickness.
+
+#Param center Circle center ##
+#Param radius half the diameter of Circle ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
+
+#Example
+ void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ canvas->drawCircle(128, 128, 90, paint);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawCircle({86, 86}, 20, paint);
+ canvas->drawCircle({160, 76}, 20, paint);
+ canvas->drawCircle({140, 150}, 35, paint);
+ }
##
#ToDo incomplete ##
@@ -3417,8 +3606,10 @@ if stroked, Paint_Stroke_Width describes the line thickness.
bool useCenter, const SkPaint& paint)
Draw Arc using Clip, Matrix, and Paint paint.
+
Arc is part of Oval bounded by oval, sweeping from startAngle to startAngle plus
sweepAngle. startAngle and sweepAngle are in degrees.
+
startAngle of zero places start point at the right middle edge of oval.
A positive sweepAngle places Arc end point clockwise from start point;
a negative sweepAngle places Arc end point counterclockwise from start point.
@@ -3428,44 +3619,44 @@ center to Arc end points. If useCenter is false, draw Arc between end points.
If Rect oval is empty or sweepAngle is zero, nothing is drawn.
-#Param oval Rect bounds of Oval containing Arc to draw. ##
-#Param startAngle Angle in degrees where Arc begins. ##
-#Param sweepAngle Sweep angle in degrees; positive is clockwise. ##
-#Param useCenter If true include the center of the oval. ##
-#Param paint Paint stroke or fill, blend, color, and so on, used to draw. ##
+#Param oval Rect bounds of Oval containing Arc to draw ##
+#Param startAngle angle in degrees where Arc begins ##
+#Param sweepAngle sweep angle in degrees; positive is clockwise ##
+#Param useCenter if true, include the center of the oval ##
+#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
- void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkRect oval = { 4, 4, 60, 60};
- for (auto useCenter : { false, true } ) {
- for (auto style : { SkPaint::kFill_Style, SkPaint::kStroke_Style } ) {
- paint.setStyle(style);
- for (auto degrees : { 45, 90, 180, 360} ) {
- canvas->drawArc(oval, 0, degrees , useCenter, paint);
- canvas->translate(64, 0);
- }
- canvas->translate(-256, 64);
- }
- }
+ void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkRect oval = { 4, 4, 60, 60};
+ for (auto useCenter : { false, true } ) {
+ for (auto style : { SkPaint::kFill_Style, SkPaint::kStroke_Style } ) {
+ paint.setStyle(style);
+ for (auto degrees : { 45, 90, 180, 360} ) {
+ canvas->drawArc(oval, 0, degrees , useCenter, paint);
+ canvas->translate(64, 0);
+ }
+ canvas->translate(-256, 64);
+ }
+ }
}
##
#Example
#Height 64
- void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(4);
- SkRect oval = { 4, 4, 60, 60};
- float intervals[] = { 5, 5 };
- paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 2.5f));
- for (auto degrees : { 270, 360, 540, 720 } ) {
- canvas->drawArc(oval, 0, degrees, false, paint);
- canvas->translate(64, 0);
- }
+ void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(4);
+ SkRect oval = { 4, 4, 60, 60};
+ float intervals[] = { 5, 5 };
+ paint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 2.5f));
+ for (auto degrees : { 270, 360, 540, 720 } ) {
+ canvas->drawArc(oval, 0, degrees, false, paint);
+ canvas->translate(64, 0);
+ }
}
##
@@ -3477,18 +3668,20 @@ If Rect oval is empty or sweepAngle is zero, nothing is drawn.
#Method void drawRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, const SkPaint& paint)
-Draw Round_Rect bounded by Rect rect, with corner radii (rx, ry) using Clip, Matrix,
-and Paint paint.
+Draw Round_Rect bounded by Rect rect, with corner radii (rx, ry) using Clip,
+Matrix, and Paint paint.
+
In paint: Paint_Style determines if Round_Rect is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
If rx or ry are less than zero, they are treated as if they are zero.
If rx plus ry exceeds rect width or rect height, radii are scaled down to fit.
-If rx and ry are zero, Round_Rect is drawn as Rect and if stroked is affected by Paint_Stroke_Join.
+If rx and ry are zero, Round_Rect is drawn as Rect and if stroked is affected by
+Paint_Stroke_Join.
-#Param rect Rect bounds of Round_Rect to draw. ##
-#Param rx Semiaxis length in x of oval describing rounded corners. ##
-#Param ry Semiaxis length in y of oval describing rounded corners. ##
-#Param paint Stroke, blend, color, and so on, used to draw. ##
+#Param rect Rect bounds of Round_Rect to draw ##
+#Param rx semiaxis length in x of oval describing rounded corners ##
+#Param ry semiaxis length in y of oval describing rounded corners ##
+#Param paint stroke, blend, color, and so on, used to draw ##
#Example
#Description
@@ -3497,20 +3690,20 @@ If rx and ry are zero, Round_Rect is drawn as Rect and if stroked is affected by
Third row radii sum equals sides.
Fourth row radii sum exceeds sides; radii are scaled to fit.
##
- void draw(SkCanvas* canvas) {
- SkVector radii[] = { {0, 20}, {10, 10}, {10, 20}, {10, 40} };
- SkPaint paint;
- paint.setStrokeWidth(15);
- paint.setStrokeJoin(SkPaint::kRound_Join);
- paint.setAntiAlias(true);
- for (auto style : { SkPaint::kStroke_Style, SkPaint::kFill_Style } ) {
- paint.setStyle(style );
- for (size_t i = 0; i < SK_ARRAY_COUNT(radii); ++i) {
- canvas->drawRoundRect({10, 10, 60, 40}, radii[i].fX, radii[i].fY, paint);
- canvas->translate(0, 60);
- }
- canvas->translate(80, -240);
- }
+ void draw(SkCanvas* canvas) {
+ SkVector radii[] = { {0, 20}, {10, 10}, {10, 20}, {10, 40} };
+ SkPaint paint;
+ paint.setStrokeWidth(15);
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ paint.setAntiAlias(true);
+ for (auto style : { SkPaint::kStroke_Style, SkPaint::kFill_Style } ) {
+ paint.setStyle(style );
+ for (size_t i = 0; i < SK_ARRAY_COUNT(radii); ++i) {
+ canvas->drawRoundRect({10, 10, 60, 40}, radii[i].fX, radii[i].fY, paint);
+ canvas->translate(0, 60);
+ }
+ canvas->translate(80, -240);
+ }
}
##
@@ -3526,12 +3719,13 @@ Draw Path path using Clip, Matrix, and Paint paint.
Path contains an array of Path_Contour, each of which may be open or closed.
In paint: Paint_Style determines if Round_Rect is stroked or filled:
-if filled, Path_Fill_Type determines whether Path_Contour describes inside or outside of fill;
-if stroked, Paint_Stroke_Width describes the line thickness, Paint_Stroke_Cap describes line ends,
-and Paint_Stroke_Join describes how corners are drawn.
+if filled, Path_Fill_Type determines whether Path_Contour describes inside or
+outside of fill; if stroked, Paint_Stroke_Width describes the line thickness,
+Paint_Stroke_Cap describes line ends, and Paint_Stroke_Join describes how
+corners are drawn.
-#Param path Path to draw. ##
-#Param paint Stroke, blend, color, and so on, used to draw. ##
+#Param path Path to draw ##
+#Param paint stroke, blend, color, and so on, used to draw ##
#Example
#Description
@@ -3542,37 +3736,37 @@ and Paint_Stroke_Join describes how corners are drawn.
Second bottom column shows even odd fills exclude overlap.
Third bottom column shows inverse winding fills area outside both contours.
##
-void draw(SkCanvas* canvas) {
- SkPath path;
- path.moveTo(20, 20);
- path.quadTo(60, 20, 60, 60);
- path.close();
- path.moveTo(60, 20);
- path.quadTo(60, 60, 20, 60);
- SkPaint paint;
- paint.setStrokeWidth(10);
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kStroke_Style);
- for (auto join: { SkPaint::kBevel_Join, SkPaint::kRound_Join, SkPaint::kMiter_Join } ) {
- paint.setStrokeJoin(join);
- for (auto cap: { SkPaint::kButt_Cap, SkPaint::kSquare_Cap, SkPaint::kRound_Cap } ) {
- paint.setStrokeCap(cap);
- canvas->drawPath(path, paint);
- canvas->translate(80, 0);
- }
- canvas->translate(-240, 60);
- }
- paint.setStyle(SkPaint::kFill_Style);
- for (auto fill : { SkPath::kWinding_FillType,
- SkPath::kEvenOdd_FillType,
- SkPath::kInverseWinding_FillType } ) {
- path.setFillType(fill);
- canvas->save();
- canvas->clipRect({0, 10, 80, 70});
- canvas->drawPath(path, paint);
- canvas->restore();
- canvas->translate(80, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkPath path;
+ path.moveTo(20, 20);
+ path.quadTo(60, 20, 60, 60);
+ path.close();
+ path.moveTo(60, 20);
+ path.quadTo(60, 60, 20, 60);
+ SkPaint paint;
+ paint.setStrokeWidth(10);
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ for (auto join: { SkPaint::kBevel_Join, SkPaint::kRound_Join, SkPaint::kMiter_Join } ) {
+ paint.setStrokeJoin(join);
+ for (auto cap: { SkPaint::kButt_Cap, SkPaint::kSquare_Cap, SkPaint::kRound_Cap } ) {
+ paint.setStrokeCap(cap);
+ canvas->drawPath(path, paint);
+ canvas->translate(80, 0);
+ }
+ canvas->translate(-240, 60);
+ }
+ paint.setStyle(SkPaint::kFill_Style);
+ for (auto fill : { SkPath::kWinding_FillType,
+ SkPath::kEvenOdd_FillType,
+ SkPath::kInverseWinding_FillType } ) {
+ path.setFillType(fill);
+ canvas->save();
+ canvas->clipRect({0, 10, 80, 70});
+ canvas->drawPath(path, paint);
+ canvas->restore();
+ canvas->translate(80, 0);
+ }
}
##
@@ -3583,38 +3777,39 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Draw_Image
-drawImage, drawImageRect, and drawImageNine can be called with a bare pointer or a smart pointer as a convenience.
-The pairs of calls are otherwise identical.
-
+drawImage, drawImageRect, and drawImageNine can be called with a bare pointer or
+a smart pointer as a convenience. The pairs of calls are otherwise identical.
#Method void drawImage(const SkImage* image, SkScalar left, SkScalar top, const SkPaint* paint = NULL)
Draw Image image, with its top-left corner at (left, top),
using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
+If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode,
+and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds. If generated
+mask extends beyond image bounds, replicate image edge colors, just as Shader
+made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
+image's edge color when it samples outside of its bounds.
-#Param image Uncompressed rectangular map of pixels. ##
-#Param left Left side of image. ##
-#Param top Top side of image. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+#Param image uncompressed rectangular map of pixels ##
+#Param left left side of image ##
+#Param top top side of image ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 64
#Image 4
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image;
- SkImage* imagePtr = image.get();
- canvas->drawImage(imagePtr, 0, 0);
- SkPaint paint;
- canvas->drawImage(imagePtr, 80, 0, &paint);
- paint.setAlpha(0x80);
- canvas->drawImage(imagePtr, 160, 0, &paint);
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image;
+ SkImage* imagePtr = image.get();
+ canvas->drawImage(imagePtr, 0, 0);
+ SkPaint paint;
+ canvas->drawImage(imagePtr, 80, 0, &paint);
+ paint.setAlpha(0x80);
+ canvas->drawImage(imagePtr, 160, 0, &paint);
}
##
@@ -3630,28 +3825,30 @@ void draw(SkCanvas* canvas) {
Draw Image image, with its top-left corner at (left, top),
using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds. If generated
+mask extends beyond image bounds, replicate image edge colors, just as Shader
+made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
+image's edge color when it samples outside of its bounds.
-#Param image Uncompressed rectangular map of pixels. ##
-#Param left Left side of image. ##
-#Param top Top side of image. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+#Param image uncompressed rectangular map of pixels ##
+#Param left left side of image ##
+#Param top pop side of image ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 64
#Image 4
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image;
- canvas->drawImage(image, 0, 0);
- SkPaint paint;
- canvas->drawImage(image, 80, 0, &paint);
- paint.setAlpha(0x80);
- canvas->drawImage(image, 160, 0, &paint);
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image;
+ canvas->drawImage(image, 0, 0);
+ SkPaint paint;
+ canvas->drawImage(image, 80, 0, &paint);
+ paint.setAlpha(0x80);
+ canvas->drawImage(image, 160, 0, &paint);
}
##
@@ -3670,12 +3867,12 @@ void draw(SkCanvas* canvas) {
};
##
-SrcRectConstraint controls the behavior at the edge of the Rect src, provided to drawImageRect,
-trading off speed for precision.
+SrcRectConstraint controls the behavior at the edge of the Rect src, provided to
+drawImageRect, trading off speed for precision.
-Image_Filter in Paint may sample multiple pixels in the image.
-Rect src restricts the bounds of pixels that may be read. Image_Filter may slow
-down if it cannot read outside the bounds, when sampling near the edge of Rect src.
+Image_Filter in Paint may sample multiple pixels in the image. Rect src
+restricts the bounds of pixels that may be read. Image_Filter may slow down if
+it cannot read outside the bounds, when sampling near the edge of Rect src.
SrcRectConstraint specifies whether an Image_Filter is allowed to read pixels
outside Rect src.
@@ -3699,27 +3896,27 @@ outside Rect src.
Drawing the checkerboard with kStrict_SrcRectConstraint shows only a blur of black and white.
Drawing the checkerboard with kFast_SrcRectConstraint allows red to bleed in the corners.
##
-void draw(SkCanvas* canvas) {
- SkBitmap redBorder;
- redBorder.allocPixels(SkImageInfo::MakeN32Premul(4, 4));
- SkCanvas checkRed(redBorder);
- checkRed.clear(SK_ColorRED);
- uint32_t checkers[][2] = { { SK_ColorBLACK, SK_ColorWHITE },
- { SK_ColorWHITE, SK_ColorBLACK } };
- checkRed.writePixels(
- SkImageInfo::MakeN32Premul(2, 2), (void*) checkers, sizeof(checkers[0]), 1, 1);
- canvas->scale(16, 16);
- canvas->drawBitmap(redBorder, 0, 0, nullptr);
- canvas->resetMatrix();
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(redBorder);
- SkPaint lowPaint;
- lowPaint.setFilterQuality(kLow_SkFilterQuality);
- for (auto constraint : { SkCanvas::kStrict_SrcRectConstraint,
- SkCanvas::kFast_SrcRectConstraint } ) {
- canvas->translate(80, 0);
- canvas->drawImageRect(image.get(), SkRect::MakeLTRB(1, 1, 3, 3),
- SkRect::MakeLTRB(16, 16, 48, 48), &lowPaint, constraint);
- }
+void draw(SkCanvas* canvas) {
+ SkBitmap redBorder;
+ redBorder.allocPixels(SkImageInfo::MakeN32Premul(4, 4));
+ SkCanvas checkRed(redBorder);
+ checkRed.clear(SK_ColorRED);
+ uint32_t checkers[][2] = { { SK_ColorBLACK, SK_ColorWHITE },
+ { SK_ColorWHITE, SK_ColorBLACK } };
+ checkRed.writePixels(
+ SkImageInfo::MakeN32Premul(2, 2), (void*) checkers, sizeof(checkers[0]), 1, 1);
+ canvas->scale(16, 16);
+ canvas->drawBitmap(redBorder, 0, 0, nullptr);
+ canvas->resetMatrix();
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(redBorder);
+ SkPaint lowPaint;
+ lowPaint.setFilterQuality(kLow_SkFilterQuality);
+ for (auto constraint : { SkCanvas::kStrict_SrcRectConstraint,
+ SkCanvas::kFast_SrcRectConstraint } ) {
+ canvas->translate(80, 0);
+ canvas->drawImageRect(image.get(), SkRect::MakeLTRB(1, 1, 3, 3),
+ SkRect::MakeLTRB(16, 16, 48, 48), &lowPaint, constraint);
+ }
}
##
@@ -3735,20 +3932,26 @@ void draw(SkCanvas* canvas) {
Draw Rect src of Image image, scaled and translated to fill Rect dst.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param image Image containing pixels, dimensions, and format. ##
-#Param src Source Rect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param src source Rect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
@@ -3759,27 +3962,27 @@ set to kFast_SrcRectConstraint allows sampling outside to improve performance.
kStrict_SrcRectConstraint, the filter remains within the checkerboard, and
with kFast_SrcRectConstraint red bleeds on the edges.
##
-void draw(SkCanvas* canvas) {
- uint32_t pixels[][4] = {
- { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 },
- { 0xFFFF0000, 0xFF000000, 0xFFFFFFFF, 0xFFFF0000 },
- { 0xFFFF0000, 0xFFFFFFFF, 0xFF000000, 0xFFFF0000 },
- { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 } };
- SkBitmap redBorder;
- redBorder.installPixels(SkImageInfo::MakeN32Premul(4, 4),
- (void*) pixels, sizeof(pixels[0]));
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(redBorder);
- SkPaint lowPaint;
- for (auto constraint : {
- SkCanvas::kFast_SrcRectConstraint,
- SkCanvas::kStrict_SrcRectConstraint,
- SkCanvas::kFast_SrcRectConstraint } ) {
- canvas->drawImageRect(image.get(), SkRect::MakeLTRB(1, 1, 3, 3),
- SkRect::MakeLTRB(16, 16, 48, 48), &lowPaint, constraint);
- lowPaint.setFilterQuality(kLow_SkFilterQuality);
- canvas->translate(80, 0);
- }
-}
+void draw(SkCanvas* canvas) {
+ uint32_t pixels[][4] = {
+ { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 },
+ { 0xFFFF0000, 0xFF000000, 0xFFFFFFFF, 0xFFFF0000 },
+ { 0xFFFF0000, 0xFFFFFFFF, 0xFF000000, 0xFFFF0000 },
+ { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 } };
+ SkBitmap redBorder;
+ redBorder.installPixels(SkImageInfo::MakeN32Premul(4, 4),
+ (void*) pixels, sizeof(pixels[0]));
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(redBorder);
+ SkPaint lowPaint;
+ for (auto constraint : {
+ SkCanvas::kFast_SrcRectConstraint,
+ SkCanvas::kStrict_SrcRectConstraint,
+ SkCanvas::kFast_SrcRectConstraint } ) {
+ canvas->drawImageRect(image.get(), SkRect::MakeLTRB(1, 1, 3, 3),
+ SkRect::MakeLTRB(16, 16, 48, 48), &lowPaint, constraint);
+ lowPaint.setFilterQuality(kLow_SkFilterQuality);
+ canvas->translate(80, 0);
+ }
+}
##
#ToDo incomplete ##
@@ -3792,31 +3995,38 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint, SrcRectConstraint constraint = kStrict_SrcRectConstraint)
Draw IRect isrc of Image image, scaled and translated to fill Rect dst.
-Note that isrc is on integer pixel boundaries; dst may include fractional boundaries.
-Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param image Image containing pixels, dimensions, and format. ##
-#Param isrc Source IRect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+Note that isrc is on integer pixel boundaries; dst may include fractional
+boundaries. Additionally transform draw using Clip, Matrix, and optional Paint
+paint.
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param isrc source IRect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Image 4
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image;
- for (auto i : { 1, 2, 4, 8 } ) {
- canvas->drawImageRect(image.get(), SkIRect::MakeLTRB(0, 0, 100, 100),
- SkRect::MakeXYWH(i * 20, i * 20, i * 20, i * 20), nullptr);
- }
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image;
+ for (auto i : { 1, 2, 4, 8 } ) {
+ canvas->drawImageRect(image.get(), SkIRect::MakeLTRB(0, 0, 100, 100),
+ SkRect::MakeXYWH(i * 20, i * 20, i * 20, i * 20), nullptr);
+ }
}
##
@@ -3829,28 +4039,35 @@ void draw(SkCanvas* canvas) {
#Method void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
-Draw Image image, scaled and translated to fill Rect dst,
-using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-Use constaint to choose kStrict_SrcRectConstraint or kFast_SrcRectConstraint.
+Draw Image image, scaled and translated to fill Rect dst, using Clip, Matrix,
+and optional Paint paint.
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
-#Param image Image containing pixels, dimensions, and format. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Image 4
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image;
- for (auto i : { 20, 40, 80, 160 } ) {
- canvas->drawImageRect(image.get(), SkRect::MakeXYWH(i, i, i, i), nullptr);
- }
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image;
+ for (auto i : { 20, 40, 80, 160 } ) {
+ canvas->drawImageRect(image.get(), SkRect::MakeXYWH(i, i, i, i), nullptr);
+ }
}
##
@@ -3866,20 +4083,26 @@ void draw(SkCanvas* canvas) {
Draw Rect src of Image image, scaled and translated to fill Rect dst.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param image Image containing pixels, dimensions, and format. ##
-#Param src Source Rect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param src source Rect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
@@ -3887,21 +4110,21 @@ set to kFast_SrcRectConstraint allows sampling outside to improve performance.
Canvas scales and translates; transformation from src to dst also scales.
The two matrices are concatenated to create the final transformation.
##
-void draw(SkCanvas* canvas) {
- uint32_t pixels[][2] = { { SK_ColorBLACK, SK_ColorWHITE },
- { SK_ColorWHITE, SK_ColorBLACK } };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
- (void*) pixels, sizeof(pixels[0]));
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- SkPaint paint;
- canvas->scale(4, 4);
- for (auto alpha : { 50, 100, 150, 255 } ) {
- paint.setAlpha(alpha);
- canvas->drawImageRect(image, SkRect::MakeWH(2, 2), SkRect::MakeWH(8, 8), &paint);
- canvas->translate(8, 0);
- }
-}
+void draw(SkCanvas* canvas) {
+ uint32_t pixels[][2] = { { SK_ColorBLACK, SK_ColorWHITE },
+ { SK_ColorWHITE, SK_ColorBLACK } };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ (void*) pixels, sizeof(pixels[0]));
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ SkPaint paint;
+ canvas->scale(4, 4);
+ for (auto alpha : { 50, 100, 150, 255 } ) {
+ paint.setAlpha(alpha);
+ canvas->drawImageRect(image, SkRect::MakeWH(2, 2), SkRect::MakeWH(8, 8), &paint);
+ canvas->translate(8, 0);
+ }
+}
##
#ToDo incomplete ##
@@ -3914,39 +4137,45 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint, SrcRectConstraint constraint = kStrict_SrcRectConstraint)
Draw IRect isrc of Image image, scaled and translated to fill Rect dst.
-Note that isrc is on integer pixel boundaries; dst may include fractional boundaries.
+isrc is on integer pixel boundaries; dst may include fractional boundaries.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-cons set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param image Image containing pixels, dimensions, and format. ##
-#Param isrc Source IRect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param isrc source IRect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint32_t pixels[][2] = { { 0x00000000, 0x55555555},
- { 0xAAAAAAAA, 0xFFFFFFFF} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
- (void*) pixels, sizeof(pixels[0]));
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- SkPaint paint;
- canvas->scale(4, 4);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
- paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
- canvas->drawImageRect(image, SkIRect::MakeWH(2, 2), SkRect::MakeWH(8, 8), &paint);
- canvas->translate(8, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint32_t pixels[][2] = { { 0x00000000, 0x55555555},
+ { 0xAAAAAAAA, 0xFFFFFFFF} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ (void*) pixels, sizeof(pixels[0]));
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ SkPaint paint;
+ canvas->scale(4, 4);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
+ paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
+ canvas->drawImageRect(image, SkIRect::MakeWH(2, 2), SkRect::MakeWH(8, 8), &paint);
+ canvas->translate(8, 0);
+ }
}
##
@@ -3960,36 +4189,42 @@ void draw(SkCanvas* canvas) {
Draw Image image, scaled and translated to fill Rect dst,
using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkImage::makeShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-#Param image Image containing pixels, dimensions, and format. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
- { 0xAAAA0000, 0xFFFF0000} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
- (void*) pixels, sizeof(pixels[0]));
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- SkPaint paint;
- canvas->scale(4, 4);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
- paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
- canvas->drawImageRect(image, SkRect::MakeWH(8, 8), &paint);
- canvas->translate(8, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
+ { 0xAAAA0000, 0xFFFF0000} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ (void*) pixels, sizeof(pixels[0]));
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ SkPaint paint;
+ canvas->scale(4, 4);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
+ paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
+ canvas->drawImageRect(image, SkRect::MakeWH(8, 8), &paint);
+ canvas->translate(8, 0);
+ }
}
##
@@ -4003,21 +4238,26 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint = nullptr)
Draw Image image stretched differentially to fit into Rect dst.
-IRect center divides the image into nine sections: four sides, four corners, and the center.
-corners are unscaled or scaled down proportionately if their sides are larger than dst;
-center and four sides are scaled to fit remaining space, if any.
+IRect center divides the image into nine sections: four sides, four corners, and
+the center. Corners are unscaled or scaled down proportionately if their sides
+are larger than dst; center and four sides are scaled to fit remaining space, if any.
+
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-#Param image Image containing pixels, dimensions, and format. ##
-#Param center IRect edge of image corners and sides. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param center IRect edge of image corners and sides ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 128
@@ -4027,30 +4267,30 @@ color when it samples outside of its bounds.
The remaining images are larger than center. All corners draw unscaled. The sides
and center are scaled if needed to take up the remaining space.
##
-void draw(SkCanvas* canvas) {
- SkIRect center = { 20, 10, 50, 40 };
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
- SkCanvas bitCanvas(bitmap);
- SkPaint paint;
- SkColor gray = 0xFF000000;
- int left = 0;
- for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
- int top = 0;
- for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
- paint.setColor(gray);
- bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
- gray += 0x001f1f1f;
- top = bottom;
- }
- left = right;
- }
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- SkImage* imagePtr = image.get();
- for (auto dest: { 20, 30, 40, 60, 90 } ) {
- canvas->drawImageNine(imagePtr, center, SkRect::MakeWH(dest, dest), nullptr);
- canvas->translate(dest + 4, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkIRect center = { 20, 10, 50, 40 };
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
+ SkCanvas bitCanvas(bitmap);
+ SkPaint paint;
+ SkColor gray = 0xFF000000;
+ int left = 0;
+ for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
+ int top = 0;
+ for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
+ paint.setColor(gray);
+ bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
+ gray += 0x001f1f1f;
+ top = bottom;
+ }
+ left = right;
+ }
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ SkImage* imagePtr = image.get();
+ for (auto dest: { 20, 30, 40, 60, 90 } ) {
+ canvas->drawImageNine(imagePtr, center, SkRect::MakeWH(dest, dest), nullptr);
+ canvas->translate(dest + 4, 0);
+ }
}
##
@@ -4064,21 +4304,26 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint = nullptr)
Draw Image image stretched differentially to fit into Rect dst.
-IRect center divides the image into nine sections: four sides, four corners, and the center.
-corners are unscaled or scaled down proportionately if their sides are larger than dst;
-center and four sides are scaled to fit remaining space, if any.
+IRect center divides the image into nine sections: four sides, four corners, and
+the center. Corners are unscaled or scaled down proportionately if their sides
+are larger than dst; center and four sides are scaled to fit remaining space, if any.
+
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-#Param image Image containing pixels, dimensions, and format. ##
-#Param center IRect edge of image corners and sides. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from image bounds.
+
+If generated mask extends beyond image bounds, replicate image edge colors, just
+as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
+replicates the image's edge color when it samples outside of its bounds.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param center IRect edge of image corners and sides ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 128
@@ -4090,29 +4335,29 @@ color when it samples outside of its bounds.
The rightmost image has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
##
-void draw(SkCanvas* canvas) {
- SkIRect center = { 20, 10, 50, 40 };
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
- SkCanvas bitCanvas(bitmap);
- SkPaint paint;
- SkColor gray = 0xFF000000;
- int left = 0;
- for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
- int top = 0;
- for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
- paint.setColor(gray);
- bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
- gray += 0x001f1f1f;
- top = bottom;
- }
- left = right;
- }
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- for (auto dest: { 20, 30, 40, 60, 90 } ) {
- canvas->drawImageNine(image, center, SkRect::MakeWH(dest, 110 - dest), nullptr);
- canvas->translate(dest + 4, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkIRect center = { 20, 10, 50, 40 };
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
+ SkCanvas bitCanvas(bitmap);
+ SkPaint paint;
+ SkColor gray = 0xFF000000;
+ int left = 0;
+ for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
+ int top = 0;
+ for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
+ paint.setColor(gray);
+ bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
+ gray += 0x001f1f1f;
+ top = bottom;
+ }
+ left = right;
+ }
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ for (auto dest: { 20, 30, 40, 60, 90 } ) {
+ canvas->drawImageNine(image, center, SkRect::MakeWH(dest, 110 - dest), nullptr);
+ canvas->translate(dest + 4, 0);
+ }
}
##
@@ -4127,39 +4372,44 @@ void draw(SkCanvas* canvas) {
Draw Bitmap bitmap, with its top-left corner at (left, top),
using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param left Left side of bitmap. ##
-#Param top Top side of bitmap. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param left left side of bitmap ##
+#Param top top side of bitmap ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint8_t pixels[][8] = { { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00},
- { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
- { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
- { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF},
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00},
- { 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00},
- { 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
- (void*) pixels, sizeof(pixels[0]));
- SkPaint paint;
- canvas->scale(4, 4);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00} ) {
- paint.setColor(color);
- canvas->drawBitmap(bitmap, 0, 0, &paint);
- canvas->translate(12, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint8_t pixels[][8] = { { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00},
+ { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
+ { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
+ { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF},
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
+ { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00},
+ { 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00},
+ { 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ (void*) pixels, sizeof(pixels[0]));
+ SkPaint paint;
+ canvas->scale(4, 4);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00} ) {
+ paint.setColor(color);
+ canvas->drawBitmap(bitmap, 0, 0, &paint);
+ canvas->translate(12, 0);
+ }
}
##
@@ -4174,42 +4424,49 @@ void draw(SkCanvas* canvas) {
Draw Rect src of Bitmap bitmap, scaled and translated to fill Rect dst.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param src Source Rect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param src source Rect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint8_t pixels[][8] = { { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00},
- { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
- { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
- { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF},
- { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
- { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00},
- { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
- { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
- (void*) pixels, sizeof(pixels[0]));
- SkPaint paint;
- paint.setMaskFilter(SkBlurMaskFilter::Make(kSolid_SkBlurStyle, 6));
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00} ) {
- paint.setColor(color);
- canvas->drawBitmapRect(bitmap, SkRect::MakeWH(8, 8), SkRect::MakeWH(32, 32), &paint);
- canvas->translate(48, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint8_t pixels[][8] = { { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00},
+ { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
+ { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
+ { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF},
+ { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
+ { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00},
+ { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
+ { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ (void*) pixels, sizeof(pixels[0]));
+ SkPaint paint;
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kSolid_SkBlurStyle, 6));
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00} ) {
+ paint.setColor(color);
+ canvas->drawBitmapRect(bitmap, SkRect::MakeWH(8, 8), SkRect::MakeWH(32, 32), &paint);
+ canvas->translate(48, 0);
+ }
}
##
@@ -4223,44 +4480,51 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint, SrcRectConstraint constraint = kStrict_SrcRectConstraint)
Draw IRect isrc of Bitmap bitmap, scaled and translated to fill Rect dst.
-Note that isrc is on integer pixel boundaries; dst may include fractional boundaries.
+isrc is on integer pixel boundaries; dst may include fractional boundaries.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param isrc Source IRect of image to draw from. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param isrc source IRect of image to draw from ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint Filter strictly within src or draw faster ##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint8_t pixels[][8] = { { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
- { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
- { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF},
- { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF},
- { 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF},
- { 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF},
- { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
- { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
- (void*) pixels, sizeof(pixels[0]));
- SkPaint paint;
- paint.setFilterQuality(kHigh_SkFilterQuality);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00, 0xFF7f007f} ) {
- paint.setColor(color);
- canvas->drawBitmapRect(bitmap, SkIRect::MakeWH(8, 8), SkRect::MakeWH(32, 32), &paint);
- canvas->translate(48.25f, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint8_t pixels[][8] = { { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
+ { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
+ { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF},
+ { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF},
+ { 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF},
+ { 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF},
+ { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
+ { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ (void*) pixels, sizeof(pixels[0]));
+ SkPaint paint;
+ paint.setFilterQuality(kHigh_SkFilterQuality);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xFF007F00, 0xFF7f007f} ) {
+ paint.setColor(color);
+ canvas->drawBitmapRect(bitmap, SkIRect::MakeWH(8, 8), SkRect::MakeWH(32, 32), &paint);
+ canvas->translate(48.25f, 0);
+ }
}
##
@@ -4274,37 +4538,44 @@ void draw(SkCanvas* canvas) {
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
Draw Bitmap bitmap, scaled and translated to fill Rect dst.
-Note that isrc is on integer pixel boundaries; dst may include fractional boundaries.
+isrc is on integer pixel boundaries; dst may include fractional boundaries.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to sample within src;
-set to kFast_SrcRectConstraint allows sampling outside to improve performance.
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
-#Param constraint Filter strictly within src or draw faster. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
+sample within src; set to kFast_SrcRectConstraint allows sampling outside to
+improve performance.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
+#Param constraint filter strictly within src or draw faster ##
#Example
#Height 64
-void draw(SkCanvas* canvas) {
- uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
- { 0xAAAA0000, 0xFFFF0000} };
- SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
- (void*) pixels, sizeof(pixels[0]));
- SkPaint paint;
- canvas->scale(4, 4);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
- paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
- canvas->drawBitmapRect(bitmap, SkRect::MakeWH(8, 8), &paint);
- canvas->translate(8, 0);
- }
+void draw(SkCanvas* canvas) {
+ uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
+ { 0xAAAA0000, 0xFFFF0000} };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ (void*) pixels, sizeof(pixels[0]));
+ SkPaint paint;
+ canvas->scale(4, 4);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN } ) {
+ paint.setColorFilter(SkColorFilter::MakeModeFilter(color, SkBlendMode::kPlus));
+ canvas->drawBitmapRect(bitmap, SkRect::MakeWH(8, 8), &paint);
+ canvas->translate(8, 0);
+ }
}
##
@@ -4318,21 +4589,28 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint = NULL)
Draw Bitmap bitmap stretched differentially to fit into Rect dst.
-IRect center divides the bitmap into nine sections: four sides, four corners, and the center.
-corners are unscaled or scaled down proportionately if their sides are larger than dst;
-center and four sides are scaled to fit remaining space, if any.
+IRect center divides the bitmap into nine sections: four sides, four corners,
+and the center. Corners are unscaled or scaled down proportionately if their
+sides are larger than dst; center and four sides are scaled to fit remaining
+space, if any.
+
Additionally transform draw using Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param center IRect edge of image corners and sides. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param center IRect edge of image corners and sides ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 128
@@ -4344,28 +4622,28 @@ color when it samples outside of its bounds.
The rightmost bitmap draw has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
##
-void draw(SkCanvas* canvas) {
- SkIRect center = { 20, 10, 50, 40 };
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
- SkCanvas bitCanvas(bitmap);
- SkPaint paint;
- SkColor gray = 0xFF000000;
- int left = 0;
- for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
- int top = 0;
- for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
- paint.setColor(gray);
- bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
- gray += 0x001f1f1f;
- top = bottom;
- }
- left = right;
- }
- for (auto dest: { 20, 30, 40, 60, 90 } ) {
- canvas->drawBitmapNine(bitmap, center, SkRect::MakeWH(dest, 110 - dest), nullptr);
- canvas->translate(dest + 4, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkIRect center = { 20, 10, 50, 40 };
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
+ SkCanvas bitCanvas(bitmap);
+ SkPaint paint;
+ SkColor gray = 0xFF000000;
+ int left = 0;
+ for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
+ int top = 0;
+ for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
+ paint.setColor(gray);
+ bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
+ gray += 0x001f1f1f;
+ top = bottom;
+ }
+ left = right;
+ }
+ for (auto dest: { 20, 30, 40, 60, 90 } ) {
+ canvas->drawBitmapNine(bitmap, center, SkRect::MakeWH(dest, 110 - dest), nullptr);
+ canvas->translate(dest + 4, 0);
+ }
}
##
@@ -4413,31 +4691,39 @@ void draw(SkCanvas* canvas) {
#Member const int* fXDivs
Array of x-coordinates that divide the bitmap vertically.
- Array entries must be unique, increasing, greater than or equal to fBounds left edge,
- and less than fBounds right edge.
- Set the first element to fBounds left to collapse the left column of fixed grid entries.
+ Array entries must be unique, increasing, greater than or equal to
+ fBounds left edge, and less than fBounds right edge.
+ Set the first element to fBounds left to collapse the left column of
+ fixed grid entries.
##
#Member const int* fYDivs
Array of y-coordinates that divide the bitmap horizontally.
- Array entries must be unique, increasing, greater than or equal to fBounds top edge,
- and less than fBounds bottom edge.
- Set the first element to fBounds top to collapse the top row of fixed grid entries.
+ Array entries must be unique, increasing, greater than or equal to
+ fBounds top edge, and less than fBounds bottom edge.
+ Set the first element to fBounds top to collapse the top row of fixed
+ grid entries.
##
#Member const Flags* fFlags
Optional array of Flags, one per rectangular grid entry:
- array length must be (fXCount + 1) * (fYCount + 1).
+ array length must be
+ #Formula
+ (fXCount + 1) * (fYCount + 1)
+ ##
+ .
Array entries correspond to the rectangular grid entries, ascending
left to right and then top to bottom.
##
#Member int fXCount
- Number of entries in fXDivs array; one less than the number of horizontal divisions.
+ Number of entries in fXDivs array; one less than the number of
+ horizontal divisions.
##
#Member int fYCount
- Number of entries in fYDivs array; one less than the number of vertical divisions.
+ Number of entries in fYDivs array; one less than the number of vertical
+ divisions.
##
#Member const SkIRect* fBounds
@@ -4454,22 +4740,27 @@ Draw Bitmap bitmap stretched differentially to fit into Rect dst.
Lattice lattice divides bitmap into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
-of drawBitmapNine, fixed lattice 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.
+of drawBitmapNine, fixed lattice 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 Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If bitmap is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from bitmap bounds. If generated mask extends
-beyond bitmap bounds, replicate bitmap edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the bitmap's edge
-color when it samples outside of its bounds.
-#Param bitmap Bitmap containing pixels, dimensions, and format. ##
-#Param lattice Division of bitmap into fixed and variable rectangles. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+#Param bitmap Bitmap containing pixels, dimensions, and format ##
+#Param lattice division of bitmap into fixed and variable rectangles ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 128
@@ -4481,35 +4772,35 @@ color when it samples outside of its bounds.
The rightmost bitmap draw has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
##
-void draw(SkCanvas* canvas) {
- SkIRect center = { 20, 10, 50, 40 };
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
- SkCanvas bitCanvas(bitmap);
- SkPaint paint;
- SkColor gray = 0xFF000000;
- int left = 0;
- for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
- int top = 0;
- for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
- paint.setColor(gray);
- bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
- gray += 0x001f1f1f;
- top = bottom;
- }
- left = right;
- }
- const int xDivs[] = { center.fLeft, center.fRight };
- const int yDivs[] = { center.fTop, center.fBottom };
- SkCanvas::Lattice::Flags flags[3][3];
- memset(flags, 0, sizeof(flags));
- flags[1][1] = SkCanvas::Lattice::kTransparent_Flags;
- SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs),
- SK_ARRAY_COUNT(yDivs), nullptr };
- for (auto dest: { 20, 30, 40, 60, 90 } ) {
- canvas->drawBitmapLattice(bitmap, lattice , SkRect::MakeWH(dest, 110 - dest), nullptr);
- canvas->translate(dest + 4, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkIRect center = { 20, 10, 50, 40 };
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
+ SkCanvas bitCanvas(bitmap);
+ SkPaint paint;
+ SkColor gray = 0xFF000000;
+ int left = 0;
+ for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
+ int top = 0;
+ for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
+ paint.setColor(gray);
+ bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
+ gray += 0x001f1f1f;
+ top = bottom;
+ }
+ left = right;
+ }
+ const int xDivs[] = { center.fLeft, center.fRight };
+ const int yDivs[] = { center.fTop, center.fBottom };
+ SkCanvas::Lattice::Flags flags[3][3];
+ memset(flags, 0, sizeof(flags));
+ flags[1][1] = SkCanvas::Lattice::kTransparent_Flags;
+ SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs),
+ SK_ARRAY_COUNT(yDivs), nullptr };
+ for (auto dest: { 20, 30, 40, 60, 90 } ) {
+ canvas->drawBitmapLattice(bitmap, lattice , SkRect::MakeWH(dest, 110 - dest), nullptr);
+ canvas->translate(dest + 4, 0);
+ }
}
##
@@ -4526,22 +4817,27 @@ Draw Image image stretched differentially to fit into Rect dst.
Lattice lattice divides image into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
-of drawImageNine, fixed lattice 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.
+of drawBitmapNine, fixed lattice 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 Clip, Matrix, and optional Paint paint.
-If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter, Blend_Mode, and Draw_Looper.
-If image is kAlpha_8_SkColorType, apply Shader.
-if paint contains Mask_Filter, generate mask from image bounds. If generated mask extends
-beyond image bounds, replicate image edge colors, just as Shader made from
-SkShader::MakeBitmapShader with SkShader::kClamp_TileMode set replicates the image's edge
-color when it samples outside of its bounds.
-#Param image Image containing pixels, dimensions, and format. ##
-#Param lattice Division of bitmap into fixed and variable rectangles. ##
-#Param dst Destination Rect of image to draw to. ##
-#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter, and so on; or nullptr. ##
+If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
+Blend_Mode, and Draw_Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+If paint contains Mask_Filter, generate mask from bitmap bounds.
+
+If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
+just as Shader made from SkShader::MakeBitmapShader with
+SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+outside of its bounds.
+
+#Param image Image containing pixels, dimensions, and format ##
+#Param lattice division of bitmap into fixed and variable rectangles ##
+#Param dst destination Rect of image to draw to ##
+#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
+ and so on; or nullptr
+##
#Example
#Height 128
@@ -4551,37 +4847,37 @@ color when it samples outside of its bounds.
The remaining images are larger than center. All corners draw unscaled. The sides
are scaled if needed to take up the remaining space; the center is transparent.
##
-void draw(SkCanvas* canvas) {
- SkIRect center = { 20, 10, 50, 40 };
- SkBitmap bitmap;
- bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
- SkCanvas bitCanvas(bitmap);
- SkPaint paint;
- SkColor gray = 0xFF000000;
- int left = 0;
- for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
- int top = 0;
- for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
- paint.setColor(gray);
- bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
- gray += 0x001f1f1f;
- top = bottom;
- }
- left = right;
- }
- const int xDivs[] = { center.fLeft, center.fRight };
- const int yDivs[] = { center.fTop, center.fBottom };
- SkCanvas::Lattice::Flags flags[3][3];
- memset(flags, 0, sizeof(flags));
- flags[1][1] = SkCanvas::Lattice::kTransparent_Flags;
- SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs),
- SK_ARRAY_COUNT(yDivs), nullptr };
- sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
- SkImage* imagePtr = image.get();
- for (auto dest: { 20, 30, 40, 60, 90 } ) {
- canvas->drawImageNine(imagePtr, center, SkRect::MakeWH(dest, dest), nullptr);
- canvas->translate(dest + 4, 0);
- }
+void draw(SkCanvas* canvas) {
+ SkIRect center = { 20, 10, 50, 40 };
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(60, 60));
+ SkCanvas bitCanvas(bitmap);
+ SkPaint paint;
+ SkColor gray = 0xFF000000;
+ int left = 0;
+ for (auto right: { center.fLeft, center.fRight, bitmap.width() } ) {
+ int top = 0;
+ for (auto bottom: { center.fTop, center.fBottom, bitmap.height() } ) {
+ paint.setColor(gray);
+ bitCanvas.drawIRect(SkIRect::MakeLTRB(left, top, right, bottom), paint);
+ gray += 0x001f1f1f;
+ top = bottom;
+ }
+ left = right;
+ }
+ const int xDivs[] = { center.fLeft, center.fRight };
+ const int yDivs[] = { center.fTop, center.fBottom };
+ SkCanvas::Lattice::Flags flags[3][3];
+ memset(flags, 0, sizeof(flags));
+ flags[1][1] = SkCanvas::Lattice::kTransparent_Flags;
+ SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs),
+ SK_ARRAY_COUNT(yDivs), nullptr };
+ sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
+ SkImage* imagePtr = image.get();
+ for (auto dest: { 20, 30, 40, 60, 90 } ) {
+ canvas->drawImageNine(imagePtr, center, SkRect::MakeWH(dest, dest), nullptr);
+ canvas->translate(dest + 4, 0);
+ }
}
##
@@ -4597,20 +4893,23 @@ void draw(SkCanvas* canvas) {
const SkPaint& paint)
Draw text, with origin at (x, y), using Clip, Matrix, and Paint paint.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is UTF-8.
-x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default text
-draws left to right, positioning the first glyph's left side bearing at x and its
-baseline at y. Text size is affected by Matrix and Paint_Text_Size.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawText draws filled 12 point black
-glyphs.
+text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+UTF-8.
+
+x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
+text draws left to right, positioning the first glyph's left side bearing at x
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param x Start of text on x-axis. ##
-#Param y Start of text on y-axis. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param x start of text on x-axis ##
+#Param y start of text on y-axis ##
+#Param paint text size, blend, color, and so on, used to draw ##
#Example
#Height 200
@@ -4618,27 +4917,27 @@ glyphs.
The same text is drawn varying Paint_Text_Size and varying
Matrix.
##
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- float textSizes[] = { 12, 18, 24, 36 };
- for (auto size: textSizes ) {
- paint.setTextSize(size);
- canvas->drawText("Aa", 2, 10, 20, paint);
- canvas->translate(0, size * 2);
- }
- paint.reset();
- paint.setAntiAlias(true);
- float yPos = 20;
- for (auto size: textSizes ) {
- float scale = size / 12.f;
- canvas->resetMatrix();
- canvas->translate(100, 0);
- canvas->scale(scale, scale);
- canvas->drawText("Aa", 2, 10 / scale, yPos / scale, paint);
- yPos += size * 2;
- }
-}
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ float textSizes[] = { 12, 18, 24, 36 };
+ for (auto size: textSizes ) {
+ paint.setTextSize(size);
+ canvas->drawText("Aa", 2, 10, 20, paint);
+ canvas->translate(0, size * 2);
+ }
+ paint.reset();
+ paint.setAntiAlias(true);
+ float yPos = 20;
+ for (auto size: textSizes ) {
+ float scale = size / 12.f;
+ canvas->resetMatrix();
+ canvas->translate(100, 0);
+ canvas->scale(scale, scale);
+ canvas->drawText("Aa", 2, 10 / scale, yPos / scale, paint);
+ yPos += size * 2;
+ }
+}
##
#ToDo incomplete ##
@@ -4647,22 +4946,27 @@ void draw(SkCanvas* canvas) {
#Method void drawString(const char* string, SkScalar x, SkScalar y, const SkPaint& paint)
-Draw null terminated string, with origin at (x, y), using Clip, Matrix, and Paint paint.
-string's meaning depends on Paint_Text_Encoding; by default, string encoding is UTF-8.
-Other values of Paint_Text_Encoding are unlikely to produce the desired results, since
-zero bytes may be embedded in the string.
-x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default string
-draws left to right, positioning the first glyph's left side bearing at x and its
-baseline at y. Text size is affected by Matrix and Paint_Text_Size.
+Draw null terminated string, with origin at (x, y), using Clip, Matrix, and
+Paint paint.
+
+string's meaning depends on Paint_Text_Encoding; by default, string encoding is
+UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
+results, since zero bytes may be embedded in the string.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to string. By default, drawString draws filled 12 point black
-glyphs.
+x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
+string draws left to right, positioning the first glyph's left side bearing at x
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
-#Param string Character code points or glyphs drawn, ending with a char value of zero. ##
-#Param x Start of string on x-axis. ##
-#Param y Start of string on y-axis. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param string character code points or glyphs drawn,
+ ending with a char value of zero
+##
+#Param x start of string on x-axis ##
+#Param y start of string on y-axis ##
+#Param paint text size, blend, color, and so on, used to draw ##
#Example
SkPaint paint;
@@ -4675,22 +4979,27 @@ glyphs.
#Method void drawString(const SkString& string, SkScalar x, SkScalar y, const SkPaint& paint)
-Draw null terminated string, with origin at (x, y), using Clip, Matrix, and Paint paint.
-string's meaning depends on Paint_Text_Encoding; by default, string encoding is UTF-8.
-Other values of Paint_Text_Encoding are unlikely to produce the desired results, since
-zero bytes may be embedded in the string.
-x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default string
-draws left to right, positioning the first glyph's left side bearing at x and its
-baseline at y. Text size is affected by Matrix and Paint_Text_Size.
+Draw null terminated string, with origin at (x, y), using Clip, Matrix, and
+Paint paint.
+
+string's meaning depends on Paint_Text_Encoding; by default, string encoding is
+UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
+results, since zero bytes may be embedded in the string.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to string. By default, drawString draws filled 12 point black
-glyphs.
+x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
+string draws left to right, positioning the first glyph's left side bearing at x
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
-#Param string Character code points or glyphs drawn, ending with a char value of zero. ##
-#Param x Start of string on x-axis. ##
-#Param y Start of string on y-axis. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param string character code points or glyphs drawn,
+ ending with a char value of zero
+##
+#Param x start of string on x-axis ##
+#Param y start of string on y-axis ##
+#Param paint text size, blend, color, and so on, used to draw ##
#Example
SkPaint paint;
@@ -4707,34 +5016,37 @@ glyphs.
#Method void drawPosText(const void* text, size_t byteLength, const SkPoint pos[],
const SkPaint& paint)
-Draw each glyph in text with the origin in pos array, using Clip, Matrix, and Paint paint.
-The number of entries in pos array must match the number of glyphs described by byteLength of text.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is UTF-8.
-pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default each
-glyph's left side bearing is positioned at x and its
-baseline is positioned at y. Text size is affected by Matrix and Paint_Text_Size.
+Draw each glyph in text with the origin in pos array, using Clip, Matrix, and
+Paint paint. The number of entries in pos array must match the number of glyphs
+described by byteLength of text.
+
+text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+UTF-8. pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
+by default each glyph's left side bearing is positioned at x and its
+baseline is positioned at y. Text size is affected by Matrix and
+Paint_Text_Size.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawPosText draws filled 12 point black
-glyphs.
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
-Layout engines such as Harfbuzz typically use drawPosText to position each glyph
+Layout engines such as Harfbuzz typically position each glyph
rather than using the font's advance widths.
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param pos Array of glyph origins. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param pos array of glyph origins ##
+#Param paint text size, blend, color, and so on, used to draw ##
#Example
#Height 120
-void draw(SkCanvas* canvas) {
- const char hello[] = "HeLLo!";
- const SkPoint pos[] = { {40, 100}, {82, 95}, {115, 110}, {130, 95}, {145, 85},
- {172, 100} };
- SkPaint paint;
- paint.setTextSize(60);
- canvas->drawPosText(hello, strlen(hello), pos, paint);
+void draw(SkCanvas* canvas) {
+ const char hello[] = "HeLLo!";
+ const SkPoint pos[] = { {40, 100}, {82, 95}, {115, 110}, {130, 95}, {145, 85},
+ {172, 100} };
+ SkPaint paint;
+ paint.setTextSize(60);
+ canvas->drawPosText(hello, strlen(hello), pos, paint);
}
##
@@ -4747,33 +5059,37 @@ void draw(SkCanvas* canvas) {
#Method void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], SkScalar constY,
const SkPaint& paint)
-Draw each glyph in text with its (x, y) origin composed from xpos array and constY, using Clip, Matrix, and Paint paint.
-The number of entries in xpos array must match the number of glyphs described by byteLength of text.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is UTF-8.
-pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default each
-glyph's left side bearing is positioned at an xpos element and its
-baseline is positioned at constY. Text size is affected by Matrix and Paint_Text_Size.
+Draw each glyph in text with its (x, y) origin composed from xpos array and
+constY, using Clip, Matrix, and Paint paint. The number of entries in xpos array
+must match the number of glyphs described by byteLength of text.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawPosTextH draws filled 12 point black
-glyphs.
+text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+UTF-8. pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
+by default each glyph's left side bearing is positioned at an xpos element and
+its baseline is positioned at constY. Text size is affected by Matrix and
+Paint_Text_Size.
-Layout engines such as Harfbuzz typically use drawPosTextH to position each glyph
-rather than using the font's advance widths if all glyphs share the same baseline.
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param xpos Array of x positions, used to position each glyph. ##
-#Param constY Shared y coordinate for all of x positions. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+Layout engines such as Harfbuzz typically position each glyph
+rather than using the font's advance widths if all glyphs share the same
+baseline.
+
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param xpos array of x positions, used to position each glyph ##
+#Param constY shared y coordinate for all of x positions ##
+#Param paint text size, blend, color, and so on, used to draw ##
#Example
#Height 40
- void draw(SkCanvas* canvas) {
- SkScalar xpos[] = { 20, 40, 80, 160 };
- SkPaint paint;
- canvas->drawPosTextH("XXXX", 4, xpos, 20, paint);
- }
+ void draw(SkCanvas* canvas) {
+ SkScalar xpos[] = { 20, 40, 80, 160 };
+ SkPaint paint;
+ canvas->drawPosTextH("XXXX", 4, xpos, 20, paint);
+ }
##
#ToDo incomplete ##
@@ -4786,40 +5102,42 @@ rather than using the font's advance widths if all glyphs share the same baselin
SkScalar vOffset, const SkPaint& paint)
Draw text on Path path, using Clip, Matrix, and Paint paint.
-Origin of text is at distance hOffset along the path, offset by a perpendicular vector of
-length vOffset. If the path 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 path. If the text's advance is larger than the path length, the excess text is clipped.
-
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is UTF-8.
-Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default text
-positions the first glyph's left side bearing at origin x and its
-baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawTextOnPathHV draws filled 12 point black
-glyphs.
+Origin of text is at distance hOffset along the path, offset by a perpendicular
+vector of length vOffset. If the path 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 path. If the text's advance is larger
+than the path length, the excess text is clipped.
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param path Path providing text baseline. ##
-#Param hOffset Distance along path to offset origin. ##
-#Param vOffset Offset of text above (if negative) or below (if positive) the path. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
+default text positions the first glyph's left side bearing at origin x and its
+baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
-#Example
- void draw(SkCanvas* canvas) {
- const char aero[] = "correo a" "\xC3" "\xA9" "reo";
- const size_t len = sizeof(aero) - 1;
- SkPath path;
- path.addOval({43-26, 43-26, 43+26, 43+26}, SkPath::kCW_Direction, 3);
- SkPaint paint;
- paint.setTextSize(24);
- for (auto offset : { 0, 10, 20 } ) {
- canvas->drawTextOnPathHV(aero, len, path, 0, -offset, paint);
- canvas->translate(70 + offset, 70 + offset);
- }
- }
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param path Path providing text baseline ##
+#Param hOffset distance along path to offset origin ##
+#Param vOffset offset of text above (if negative) or below (if positive) the path ##
+#Param paint text size, blend, color, and so on, used to draw ##
+
+#Example
+ void draw(SkCanvas* canvas) {
+ const char aero[] = "correo a" "\xC3" "\xA9" "reo";
+ const size_t len = sizeof(aero) - 1;
+ SkPath path;
+ path.addOval({43-26, 43-26, 43+26, 43+26}, SkPath::kCW_Direction, 3);
+ SkPaint paint;
+ paint.setTextSize(24);
+ for (auto offset : { 0, 10, 20 } ) {
+ canvas->drawTextOnPathHV(aero, len, path, 0, -offset, paint);
+ canvas->translate(70 + offset, 70 + offset);
+ }
+ }
##
#ToDo incomplete ##
@@ -4832,44 +5150,48 @@ glyphs.
const SkMatrix* matrix, const SkPaint& paint)
Draw text on Path path, using Clip, Matrix, and Paint paint.
-Origin of text is at beginning of path offset by matrix, if provided, before it is mapped to path.
-If the path 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 path. If the text's advance is larger than the path length, the excess text is clipped.
-
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is UTF-8.
-Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default text
-positions the first glyph's left side bearing at origin x and its
-baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawTextOnPath draws filled 12 point black
-glyphs.
+Origin of text is at beginning of path offset by matrix, if provided, before it
+is mapped to path. If the path 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 path. If the text's advance is larger
+than the path length, the excess text is clipped.
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param path Path providing text baseline. ##
-#Param matrix Optional transform of glyphs before mapping to path; or nullptr. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
+text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
+default text positions the first glyph's left side bearing at origin x and its
+baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
-#Example
- void draw(SkCanvas* canvas) {
- const char roller[] = "rollercoaster";
- const size_t len = sizeof(roller) - 1;
- SkPath path;
- path.cubicTo(40, -80, 120, 80, 160, -40);
- SkPaint paint;
- paint.setTextSize(32);
- paint.setStyle(SkPaint::kStroke_Style);
- SkMatrix matrix;
- matrix.setIdentity();
- for (int i = 0; i < 3; ++i) {
- canvas->translate(25, 60);
- canvas->drawPath(path, paint);
- canvas->drawTextOnPath(roller, len, path, &matrix, paint);
- matrix.preTranslate(0, 10);
- }
- }
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param path Path providing text baseline ##
+#Param matrix transform of glyphs before mapping to path; may be nullptr
+ to use identity Matrix.
+##
+#Param paint text size, blend, color, and so on, used to draw ##
+
+#Example
+ void draw(SkCanvas* canvas) {
+ const char roller[] = "rollercoaster";
+ const size_t len = sizeof(roller) - 1;
+ SkPath path;
+ path.cubicTo(40, -80, 120, 80, 160, -40);
+ SkPaint paint;
+ paint.setTextSize(32);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkMatrix matrix;
+ matrix.setIdentity();
+ for (int i = 0; i < 3; ++i) {
+ canvas->translate(25, 60);
+ canvas->drawPath(path, paint);
+ canvas->drawTextOnPath(roller, len, path, &matrix, paint);
+ matrix.preTranslate(0, 10);
+ }
+ }
##
#ToDo incomplete ##
@@ -4883,41 +5205,42 @@ glyphs.
Draw text, transforming each glyph by the corresponding SkRSXform,
using Clip, Matrix, and Paint paint.
+
RSXform array specifies a separate square scale, rotation, and translation for
each glyph.
-Optional Rect cullRect is a conservative bounds of text,
-taking into account RSXform and paint. If cullrect is outside of Clip, canvas can
-skip drawing.
-
-All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to text. By default, drawTextRSXform draws filled 12 point black
-glyphs.
-
-#Param text Character code points or glyphs drawn. ##
-#Param byteLength Byte length of text array. ##
-#Param xform RSXform rotates, scales, and translates each glyph individually. ##
-#Param cullRect Rect bounds of text for efficient clipping; or nullptr. ##
-#Param paint Text size, blend, color, and so on, used to draw. ##
-
-#Example
-void draw(SkCanvas* canvas) {
- const int iterations = 26;
- SkRSXform transforms[iterations];
- char alphabet[iterations];
- SkScalar angle = 0;
- SkScalar scale = 1;
- for (size_t i = 0; i < SK_ARRAY_COUNT(transforms); ++i) {
- const SkScalar s = SkScalarSin(angle) * scale;
- const SkScalar c = SkScalarCos(angle) * scale;
- transforms[i] = SkRSXform::Make(-c, -s, -s * 16, c * 16);
- angle += .45;
- scale += .2;
- alphabet[i] = 'A' + i;
- }
- SkPaint paint;
- paint.setTextAlign(SkPaint::kCenter_Align);
- canvas->translate(110, 138);
- canvas->drawTextRSXform(alphabet, sizeof(alphabet), transforms, nullptr, paint);
+
+Optional Rect cullRect is a conservative bounds of text, taking into account
+RSXform and paint. If cullrect is outside of Clip, canvas can skip drawing.
+
+All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
+Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
+filled 12 point black glyphs.
+
+#Param text character code points or glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param xform RSXform rotates, scales, and translates each glyph individually ##
+#Param cullRect Rect bounds of text for efficient clipping; or nullptr ##
+#Param paint text size, blend, color, and so on, used to draw ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ const int iterations = 26;
+ SkRSXform transforms[iterations];
+ char alphabet[iterations];
+ SkScalar angle = 0;
+ SkScalar scale = 1;
+ for (size_t i = 0; i < SK_ARRAY_COUNT(transforms); ++i) {
+ const SkScalar s = SkScalarSin(angle) * scale;
+ const SkScalar c = SkScalarCos(angle) * scale;
+ transforms[i] = SkRSXform::Make(-c, -s, -s * 16, c * 16);
+ angle += .45;
+ scale += .2;
+ alphabet[i] = 'A' + i;
+ }
+ SkPaint paint;
+ paint.setTextAlign(SkPaint::kCenter_Align);
+ canvas->translate(110, 138);
+ canvas->drawTextRSXform(alphabet, sizeof(alphabet), transforms, nullptr, paint);
}
##
@@ -4930,42 +5253,44 @@ void draw(SkCanvas* canvas) {
#Method void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint)
Draw Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
+
blob contains glyphs, their positions, and paint attributes specific to text:
-Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X, Paint_Text_Align,
-Paint_Hinting, Anti-alias, Paint_Fake_Bold, Font_Embedded_Bitmaps, Full_Hinting_Spacing,
-LCD_Text, Linear_Text, Subpixel_Text, and Paint_Vertical_Text.
+Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X,
+Paint_Text_Align, Paint_Hinting, Anti-alias, Paint_Fake_Bold,
+Font_Embedded_Bitmaps, Full_Hinting_Spacing, LCD_Text, Linear_Text,
+Subpixel_Text, and Paint_Vertical_Text.
Elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
Image_Filter, and Draw_Looper; apply to blob.
-#Param blob Glyphs, positions, and their paints' text size, typeface, and so on. ##
-#Param x Horizontal offset applied to blob. ##
-#Param y Vertical offset applied to blob. ##
-#Param paint Blend, color, stroking, and so on, used to draw. ##
+#Param blob glyphs, positions, and their paints' text size, typeface, and so on ##
+#Param x horizontal offset applied to blob ##
+#Param y vertical offset applied to blob ##
+#Param paint blend, color, stroking, and so on, used to draw ##
#Example
#Height 120
- void draw(SkCanvas* canvas) {
- SkTextBlobBuilder textBlobBuilder;
- const char bunny[] = "/(^x^)\\";
- const int len = sizeof(bunny) - 1;
- uint16_t glyphs[len];
- SkPaint paint;
- paint.textToGlyphs(bunny, len, glyphs);
- int runs[] = { 3, 1, 3 };
- SkPoint textPos = { 20, 100 };
- int glyphIndex = 0;
- for (auto runLen : runs) {
- paint.setTextSize(1 == runLen ? 20 : 50);
- const SkTextBlobBuilder::RunBuffer& run =
- textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);
- memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);
- textPos.fX += paint.measureText(&bunny[glyphIndex], runLen, nullptr);
- glyphIndex += runLen;
- }
- sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
- paint.reset();
- canvas->drawTextBlob(blob.get(), 0, 0, paint);
+ void draw(SkCanvas* canvas) {
+ SkTextBlobBuilder textBlobBuilder;
+ const char bunny[] = "/(^x^)\\";
+ const int len = sizeof(bunny) - 1;
+ uint16_t glyphs[len];
+ SkPaint paint;
+ paint.textToGlyphs(bunny, len, glyphs);
+ int runs[] = { 3, 1, 3 };
+ SkPoint textPos = { 20, 100 };
+ int glyphIndex = 0;
+ for (auto runLen : runs) {
+ paint.setTextSize(1 == runLen ? 20 : 50);
+ const SkTextBlobBuilder::RunBuffer& run =
+ textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);
+ memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);
+ textPos.fX += paint.measureText(&bunny[glyphIndex], runLen, nullptr);
+ glyphIndex += runLen;
+ }
+ sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
+ paint.reset();
+ canvas->drawTextBlob(blob.get(), 0, 0, paint);
}
##
@@ -4978,18 +5303,20 @@ Image_Filter, and Draw_Looper; apply to blob.
#Method void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, const SkPaint& paint)
Draw Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
+
blob contains glyphs, their positions, and paint attributes specific to text:
-Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X, Paint_Text_Align,
-Paint_Hinting, Anti-alias, Paint_Fake_Bold, Font_Embedded_Bitmaps, Full_Hinting_Spacing,
-LCD_Text, Linear_Text, Subpixel_Text, and Paint_Vertical_Text.
+Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X,
+Paint_Text_Align, Paint_Hinting, Anti-alias, Paint_Fake_Bold,
+Font_Embedded_Bitmaps, Full_Hinting_Spacing, LCD_Text, Linear_Text,
+Subpixel_Text, and Paint_Vertical_Text.
Elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader, Color_Filter,
Image_Filter, and Draw_Looper; apply to blob.
-#Param blob Glyphs, positions, and their paints' text size, typeface, and so on. ##
-#Param x Horizontal offset applied to blob. ##
-#Param y Vertical offset applied to blob. ##
-#Param paint Blend, color, stroking, and so on, used to draw. ##
+#Param blob glyphs, positions, and their paints' text size, typeface, and so on ##
+#Param x horizontal offset applied to blob ##
+#Param y vertical offset applied to blob ##
+#Param paint blend, color, stroking, and so on, used to draw ##
#Example
#Height 120
@@ -4997,19 +5324,19 @@ Image_Filter, and Draw_Looper; apply to blob.
Paint attributes unrelated to text, like color, have no effect on paint in allocated Text_Blob.
Paint attributes related to text, like text size, have no effect on paint passed to drawTextBlob.
##
- void draw(SkCanvas* canvas) {
- SkTextBlobBuilder textBlobBuilder;
- SkPaint paint;
- paint.setTextSize(50);
- paint.setColor(SK_ColorRED);
- const SkTextBlobBuilder::RunBuffer& run =
- textBlobBuilder.allocRun(paint, 1, 20, 100);
- run.glyphs[0] = 20;
- sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
- paint.setTextSize(10);
- paint.setColor(SK_ColorBLUE);
- canvas->drawTextBlob(blob.get(), 0, 0, paint);
- }
+ void draw(SkCanvas* canvas) {
+ SkTextBlobBuilder textBlobBuilder;
+ SkPaint paint;
+ paint.setTextSize(50);
+ paint.setColor(SK_ColorRED);
+ const SkTextBlobBuilder::RunBuffer& run =
+ textBlobBuilder.allocRun(paint, 1, 20, 100);
+ run.glyphs[0] = 20;
+ sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
+ paint.setTextSize(10);
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawTextBlob(blob.get(), 0, 0, paint);
+ }
##
#ToDo incomplete ##
@@ -5026,25 +5353,25 @@ save() was called before and restore() was called after drawPicture.
Picture records a series of draw commands for later playback.
-#Param picture Recorded drawing commands to play. ##
+#Param picture recorded drawing commands to play ##
#Example
-void draw(SkCanvas* canvas) {
- SkPictureRecorder recorder;
- SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
- SkPaint paint;
- paint.setColor(color);
- recordingCanvas->drawRect({10, 10, 30, 40}, paint);
- recordingCanvas->translate(10, 10);
- recordingCanvas->scale(1.2f, 1.4f);
- }
- sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
- const SkPicture* playbackPtr = playback.get();
- canvas->drawPicture(playback);
- canvas->scale(2, 2);
- canvas->translate(50, 0);
- canvas->drawPicture(playback);
+void draw(SkCanvas* canvas) {
+ SkPictureRecorder recorder;
+ SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
+ SkPaint paint;
+ paint.setColor(color);
+ recordingCanvas->drawRect({10, 10, 30, 40}, paint);
+ recordingCanvas->translate(10, 10);
+ recordingCanvas->scale(1.2f, 1.4f);
+ }
+ sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
+ const SkPicture* playbackPtr = playback.get();
+ canvas->drawPicture(playback);
+ canvas->scale(2, 2);
+ canvas->translate(50, 0);
+ canvas->drawPicture(playback);
}
##
@@ -5062,24 +5389,24 @@ save() was called before and restore() was called after drawPicture.
Picture records a series of draw commands for later playback.
-#Param picture Recorded drawing commands to play. ##
+#Param picture recorded drawing commands to play ##
#Example
-void draw(SkCanvas* canvas) {
- SkPictureRecorder recorder;
- SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
- SkPaint paint;
- paint.setColor(color);
- recordingCanvas->drawRect({10, 10, 30, 40}, paint);
- recordingCanvas->translate(10, 10);
- recordingCanvas->scale(1.2f, 1.4f);
- }
- sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
- canvas->drawPicture(playback);
- canvas->scale(2, 2);
- canvas->translate(50, 0);
- canvas->drawPicture(playback);
+void draw(SkCanvas* canvas) {
+ SkPictureRecorder recorder;
+ SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
+ SkPaint paint;
+ paint.setColor(color);
+ recordingCanvas->drawRect({10, 10, 30, 40}, paint);
+ recordingCanvas->translate(10, 10);
+ recordingCanvas->scale(1.2f, 1.4f);
+ }
+ sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
+ canvas->drawPicture(playback);
+ canvas->scale(2, 2);
+ canvas->translate(50, 0);
+ canvas->drawPicture(playback);
}
##
@@ -5091,37 +5418,37 @@ void draw(SkCanvas* canvas) {
#Method void drawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint)
-Draw Picture picture, using Clip and Matrix;
-transforming picture with Matrix matrix, if provided;
-and use Paint paint Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode, if provided.
+Draw Picture picture, using Clip and Matrix; transforming picture with
+Matrix matrix, if provided; and use Paint paint Color_Alpha, Color_Filter,
+Image_Filter, and Blend_Mode, if provided.
matrix transformation is equivalent to: save(), concat(), drawPicture, restore().
paint use is equivalent to: saveLayer, drawPicture, restore().
-#Param picture Recorded drawing commands to play. ##
-#Param matrix Optional Matrix to rotate, scale, translate, and so on; or nullptr. ##
-#Param paint Optional Paint to apply transparency, filtering, and so on; or nullptr. ##
+#Param picture recorded drawing commands to play ##
+#Param matrix Matrix to rotate, scale, translate, and so on; may be nullptr ##
+#Param paint Paint to apply transparency, filtering, and so on; may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- SkPictureRecorder recorder;
- SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
- paint.setColor(color);
- recordingCanvas->drawRect({10, 10, 30, 40}, paint);
- recordingCanvas->translate(10, 10);
- recordingCanvas->scale(1.2f, 1.4f);
- }
- sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
- const SkPicture* playbackPtr = playback.get();
- SkMatrix matrix;
- matrix.reset();
- for (auto alpha : { 70, 140, 210 } ) {
- paint.setAlpha(alpha);
- canvas->drawPicture(playbackPtr, &matrix, &paint);
- matrix.preTranslate(70, 70);
- }
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ SkPictureRecorder recorder;
+ SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
+ paint.setColor(color);
+ recordingCanvas->drawRect({10, 10, 30, 40}, paint);
+ recordingCanvas->translate(10, 10);
+ recordingCanvas->scale(1.2f, 1.4f);
+ }
+ sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
+ const SkPicture* playbackPtr = playback.get();
+ SkMatrix matrix;
+ matrix.reset();
+ for (auto alpha : { 70, 140, 210 } ) {
+ paint.setAlpha(alpha);
+ canvas->drawPicture(playbackPtr, &matrix, &paint);
+ matrix.preTranslate(70, 70);
+ }
}
##
@@ -5133,36 +5460,36 @@ void draw(SkCanvas* canvas) {
#Method void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint)
-Draw Picture picture, using Clip and Matrix;
-transforming picture with Matrix matrix, if provided;
-and use Paint paint Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode, if provided.
+Draw Picture picture, using Clip and Matrix; transforming picture with
+Matrix matrix, if provided; and use Paint paint Color_Alpha, Color_Filter,
+Image_Filter, and Blend_Mode, if provided.
matrix transformation is equivalent to: save(), concat(), drawPicture, restore().
paint use is equivalent to: saveLayer, drawPicture, restore().
-#Param picture Recorded drawing commands to play. ##
-#Param matrix Optional Matrix to rotate, scale, translate, and so on; or nullptr. ##
-#Param paint Optional Paint to apply transparency, filtering, and so on; or nullptr. ##
+#Param picture recorded drawing commands to play ##
+#Param matrix Matrix to rotate, scale, translate, and so on; may be nullptr ##
+#Param paint Paint to apply transparency, filtering, and so on; may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- SkPictureRecorder recorder;
- SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
- for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
- paint.setColor(color);
- recordingCanvas->drawRect({10, 10, 30, 40}, paint);
- recordingCanvas->translate(10, 10);
- recordingCanvas->scale(1.2f, 1.4f);
- }
- sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
- SkMatrix matrix;
- matrix.reset();
- for (auto alpha : { 70, 140, 210 } ) {
- paint.setAlpha(alpha);
- canvas->drawPicture(playback, &matrix, &paint);
- matrix.preTranslate(70, 70);
- }
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ SkPictureRecorder recorder;
+ SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
+ paint.setColor(color);
+ recordingCanvas->drawRect({10, 10, 30, 40}, paint);
+ recordingCanvas->translate(10, 10);
+ recordingCanvas->scale(1.2f, 1.4f);
+ }
+ sk_sp<SkPicture> playback = recorder.finishRecordingAsPicture();
+ SkMatrix matrix;
+ matrix.reset();
+ for (auto alpha : { 70, 140, 210 } ) {
+ paint.setAlpha(alpha);
+ canvas->drawPicture(playback, &matrix, &paint);
+ matrix.preTranslate(70, 70);
+ }
}
##
@@ -5175,22 +5502,22 @@ void draw(SkCanvas* canvas) {
#Method void drawVertices(const SkVertices* vertices, SkBlendMode mode, const SkPaint& paint)
Draw Vertices vertices, a triangle mesh, using Clip and Matrix.
-If Vertices_Texs and Vertices_Colors are defined in vertices, and Paint paint contains Shader,
-Blend_Mode mode combines Vertices_Colors with Shader.
+If Vertices_Texs and Vertices_Colors are defined in vertices, and Paint paint
+contains Shader, Blend_Mode mode combines Vertices_Colors with Shader.
-#Param vertices The triangle mesh to draw. ##
-#Param mode Combines Vertices_Colors with Shader, if both are present. ##
-#Param paint Specifies the Shader, used as Vertices texture, if present. ##
+#Param vertices triangle mesh to draw ##
+#Param mode combines Vertices_Colors with Shader, if both are present ##
+#Param paint specifies the Shader, used as Vertices texture; may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };
- SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
- auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,
- SK_ARRAY_COUNT(points), points, nullptr, colors);
- canvas->drawVertices(vertices.get(), SkBlendMode::kSrc, paint);
-}
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };
+ SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
+ auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,
+ SK_ARRAY_COUNT(points), points, nullptr, colors);
+ canvas->drawVertices(vertices.get(), SkBlendMode::kSrc, paint);
+}
##
#ToDo incomplete ##
@@ -5202,24 +5529,24 @@ void draw(SkCanvas* canvas) {
#Method void drawVertices(const sk_sp<SkVertices>& vertices, SkBlendMode mode, const SkPaint& paint)
Draw Vertices vertices, a triangle mesh, using Clip and Matrix.
-If Vertices_Texs and Vertices_Colors are defined in vertices, and Paint paint contains Shader,
-Blend_Mode mode combines Vertices_Colors with Shader.
+If Vertices_Texs and Vertices_Colors are defined in vertices, and Paint paint
+contains Shader, Blend_Mode mode combines Vertices_Colors with Shader.
-#Param vertices The triangle mesh to draw. ##
-#Param mode Combines Vertices_Colors with Shader, if both are present. ##
-#Param paint Specifies the Shader, used as Vertices texture, if present. ##
+#Param vertices triangle mesh to draw ##
+#Param mode combines Vertices_Colors with Shader, if both are present ##
+#Param paint specifies the Shader, used as Vertices texture, may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };
- SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };
- SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
- paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,
- SkShader::kClamp_TileMode));
- auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,
- SK_ARRAY_COUNT(points), points, texs, colors);
- canvas->drawVertices(vertices.get(), SkBlendMode::kDarken, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ SkPoint points[] = { { 0, 0 }, { 250, 0 }, { 100, 100 }, { 0, 250 } };
+ SkPoint texs[] = { { 0, 0 }, { 0, 250 }, { 250, 250 }, { 250, 0 } };
+ SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
+ paint.setShader(SkGradientShader::MakeLinear(points, colors, nullptr, 4,
+ SkShader::kClamp_TileMode));
+ auto vertices = SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode,
+ SK_ARRAY_COUNT(points), points, texs, colors);
+ canvas->drawVertices(vertices.get(), SkBlendMode::kDarken, paint);
}
##
@@ -5235,48 +5562,53 @@ void draw(SkCanvas* canvas) {
Draw a cubic Coons patch: the interpolation of four cubics with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
-#ToDo can patch use image filter? ##
+The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
+Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
+as the Coons patch texture; Blend_Mode mode combines Color colors and Shader if
+both are provided.
-The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter, Color_Alpha,
-Image_Filter, and Blend_Mode. If Shader is provided it is treated as the Coons
-patch texture; Blend_Mode mode combines Color colors and Shader if both are provided.
+Point array cubics specifies four cubics starting at the top left corner,
+in clockwise order, sharing every fourth point. The last cubic ends at the
+first point.
-#Param cubics Point array cubics specifying the four cubics starting at the top left corner,
- in clockwise order, sharing every fourth point. The last cubic ends at the first point.
-#Param ##
-#Param colors Color array color associating colors with corners in top left, top right, bottom right,
- bottom left order.
-#Param ##
-#Param texCoords Point array texCoords mapping Shader as texture to corners in same order, if paint
- contains Shader; or nullptr.
+Color array color associates colors with corners in top left, top right,
+bottom right, bottom left order.
+
+If paint contains Shader, Point array texCoords maps Shader as texture to
+corners in top left, top right, bottom right, bottom left order.
+
+#Param cubics Cubic array, sharing common points ##
+#Param colors Color array, one for each corner ##
+#Param texCoords Point array of texure coordinates, mapping Shader to corners;
+ may be nullptr
#Param ##
-#Param mode Blend_Mode for colors and Shader if present. ##
-#Param paint Shader, Color_Filter, Blend_Mode, used to draw. ##
+#Param mode Blend_Mode for colors, and for Shader if paint has one ##
+#Param paint Shader, Color_Filter, Blend_Mode, used to draw ##
#Example
#Image 5
-void draw(SkCanvas* canvas) {
- // SkBitmap source = cmbkygk;
- SkPaint paint;
- paint.setFilterQuality(kLow_SkFilterQuality);
- paint.setAntiAlias(true);
- SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
- /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
- /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
- /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
- SkColor colors[] = { 0xbfff0000, 0xbf0000ff, 0xbfff00ff, 0xbf00ffff };
- SkPoint texCoords[] = { { -30, -30 }, { 162, -30}, { 162, 162}, { -30, 162} };
- paint.setShader(SkShader::MakeBitmapShader(source, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode, nullptr));
- canvas->scale(15, 15);
- for (auto blend : { SkBlendMode::kSrcOver, SkBlendMode::kModulate, SkBlendMode::kXor } ) {
- canvas->drawPatch(cubics, colors, texCoords, blend, paint);
- canvas->translate(4, 4);
- }
+void draw(SkCanvas* canvas) {
+ // SkBitmap source = cmbkygk;
+ SkPaint paint;
+ paint.setFilterQuality(kLow_SkFilterQuality);
+ paint.setAntiAlias(true);
+ SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
+ /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
+ /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
+ /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
+ SkColor colors[] = { 0xbfff0000, 0xbf0000ff, 0xbfff00ff, 0xbf00ffff };
+ SkPoint texCoords[] = { { -30, -30 }, { 162, -30}, { 162, 162}, { -30, 162} };
+ paint.setShader(SkShader::MakeBitmapShader(source, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode, nullptr));
+ canvas->scale(15, 15);
+ for (auto blend : { SkBlendMode::kSrcOver, SkBlendMode::kModulate, SkBlendMode::kXor } ) {
+ canvas->drawPatch(cubics, colors, texCoords, blend, paint);
+ canvas->translate(4, 4);
+ }
}
##
-#ToDo incomplete ##
+#ToDo incomplete; can patch use image filter? ##
##
@@ -5286,71 +5618,78 @@ void draw(SkCanvas* canvas) {
const SkPoint texCoords[4], const SkPaint& paint)
Draw a cubic Coons patch: the interpolation of four cubics with shared corners,
-associating a color, a texture coordinate, or both, with each corner.
+associating a color, and optionally a texture coordinate, with each corner.
-The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter, Color_Alpha,
-Image_Filter, (?) and Blend_Mode. If Shader is provided it is treated as the Coons
-patch texture.
+The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
+Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
+as the Coons patch texture; Blend_Mode mode combines Color colors and Shader if
+both are provided.
-#Param cubics Point array cubics specifying the four cubics starting at the top left corner,
- in clockwise order, sharing every fourth point. The last cubic ends at the first point.
-#Param ##
-#Param colors Color array color associating colors with corners in top left, top right, bottom right,
- bottom left order; or nullptr.
-#Param ##
-#Param texCoords Point array texCoords mapping Shader as texture to corners in same order, if paint
- contains Shader; or nullptr.
+Point array cubics specifies four cubics starting at the top left corner,
+in clockwise order, sharing every fourth point. The last cubic ends at the
+first point.
+
+Color array color associates colors with corners in top left, top right,
+bottom right, bottom left order.
+
+If paint contains Shader, Point array texCoords maps Shader as texture to
+corners in top left, top right, bottom right, bottom left order.
+
+#Param cubics Cubic array, sharing common points ##
+#Param colors Color array, one for each corner ##
+#Param texCoords Point array of texure coordinates, mapping Shader to corners;
+ may be nullptr
#Param ##
-#Param paint Shader, Color_Filter, Blend_Mode, used to draw. ##
+#Param paint Shader, Color_Filter, Blend_Mode, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
- SkPaint paint;
- paint.setAntiAlias(true);
- SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
- /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
- /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
- /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
- SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
- canvas->scale(30, 30);
- canvas->drawPatch(cubics, colors, nullptr, paint);
- SkPoint text[] = { {3,0.9f}, {4,2.5f}, {5,0.9f}, {7.5f,3.2f}, {5.5f,4.2f},
- {7.5f,5.2f}, {5,7.5f}, {4,5.9f}, {3,7.5f}, {0.5f,5.2f}, {2.5f,4.2f},
- {0.5f,3.2f} };
- paint.setTextSize(18.f / 30);
- paint.setTextAlign(SkPaint::kCenter_Align);
- for (int i = 0; i< 10; ++i) {
- char digit = '0' + i;
- canvas->drawText(&digit, 1, text[i].fX, text[i].fY, paint);
- }
- canvas->drawString("10", text[10].fX, text[10].fY, paint);
- canvas->drawString("11", text[11].fX, text[11].fY, paint);
- paint.setStyle(SkPaint::kStroke_Style);
- canvas->drawPoints(SkCanvas::kPolygon_PointMode, 12, cubics, paint);
- canvas->drawLine(cubics[11].fX, cubics[11].fY, cubics[0].fX, cubics[0].fY, paint);
+void draw(SkCanvas* canvas) {
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
+ /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
+ /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
+ /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
+ SkColor colors[] = { SK_ColorRED, SK_ColorBLUE, SK_ColorYELLOW, SK_ColorCYAN };
+ canvas->scale(30, 30);
+ canvas->drawPatch(cubics, colors, nullptr, paint);
+ SkPoint text[] = { {3,0.9f}, {4,2.5f}, {5,0.9f}, {7.5f,3.2f}, {5.5f,4.2f},
+ {7.5f,5.2f}, {5,7.5f}, {4,5.9f}, {3,7.5f}, {0.5f,5.2f}, {2.5f,4.2f},
+ {0.5f,3.2f} };
+ paint.setTextSize(18.f / 30);
+ paint.setTextAlign(SkPaint::kCenter_Align);
+ for (int i = 0; i< 10; ++i) {
+ char digit = '0' + i;
+ canvas->drawText(&digit, 1, text[i].fX, text[i].fY, paint);
+ }
+ canvas->drawString("10", text[10].fX, text[10].fY, paint);
+ canvas->drawString("11", text[11].fX, text[11].fY, paint);
+ paint.setStyle(SkPaint::kStroke_Style);
+ canvas->drawPoints(SkCanvas::kPolygon_PointMode, 12, cubics, paint);
+ canvas->drawLine(cubics[11].fX, cubics[11].fY, cubics[0].fX, cubics[0].fY, paint);
}
##
#Example
#Image 6
-void draw(SkCanvas* canvas) {
- // SkBitmap source = checkerboard;
- SkPaint paint;
- paint.setFilterQuality(kLow_SkFilterQuality);
- paint.setAntiAlias(true);
- SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
- /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
- /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
- /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
- SkPoint texCoords[] = { { 0, 0 }, { 0, 62}, { 62, 62}, { 62, 0 } };
- paint.setShader(SkShader::MakeBitmapShader(source, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode, nullptr));
- canvas->scale(30, 30);
- canvas->drawPatch(cubics, nullptr, texCoords, paint);
+void draw(SkCanvas* canvas) {
+ // SkBitmap source = checkerboard;
+ SkPaint paint;
+ paint.setFilterQuality(kLow_SkFilterQuality);
+ paint.setAntiAlias(true);
+ SkPoint cubics[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
+ /* { 7, 3 }, */ { 6, 4 }, { 7, 5 }, { 5, 7 },
+ /* { 5, 7 }, */ { 4, 6 }, { 3, 7 }, { 1, 5 },
+ /* { 1, 5 }, */ { 2, 4 }, { 1, 3 }, /* { 3, 1 } */ };
+ SkPoint texCoords[] = { { 0, 0 }, { 0, 62}, { 62, 62}, { 62, 0 } };
+ paint.setShader(SkShader::MakeBitmapShader(source, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode, nullptr));
+ canvas->scale(30, 30);
+ canvas->drawPatch(cubics, nullptr, texCoords, paint);
}
##
-#ToDo incomplete ##
+#ToDo incomplete; can patch use image filter? ##
##
@@ -5361,32 +5700,33 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
-paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode to draw, if present.
-For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it
-into destination space.
+paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
+to draw, if present. For each entry in the array, Rect tex locates sprite in
+atlas, and RSXform xform transforms it into destination space.
+
xform, text, and colors if present, must contain count entries.
-Optional colors is applied for each sprite using Blend_Mode.
+Optional colors are applied for each sprite using Blend_Mode.
Optional cullRect is a conservative bounds of all transformed sprites.
If cullrect is outside of Clip, canvas can skip drawing.
-#Param atlas Image containing sprites. ##
-#Param xform RSXform mappings for sprites in atlas. ##
-#Param tex Rect locations of sprites in atlas. ##
-#Param colors Color, one per sprite, blended with sprite using Blend_Mode; or nullptr. ##
-#Param count Number of sprites to draw. ##
-#Param mode Blend_Mode combining colors and sprites. ##
-#Param cullRect Rect bounds of transformed sprites for efficient clipping; or nullptr. ##
-#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; or nullptr. ##
+#Param atlas Image containing sprites ##
+#Param xform RSXform mappings for sprites in atlas ##
+#Param tex Rect locations of sprites in atlas ##
+#Param colors Color, one per sprite, blended with sprite using Blend_Mode; may be nullptr ##
+#Param count number of sprites to draw ##
+#Param mode Blend_Mode combining colors and sprites ##
+#Param cullRect Rect bounds of transformed sprites for efficient clipping; may be nullptr ##
+#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; may be nullptr ##
#Example
#Image 3
-void draw(SkCanvas* canvas) {
- // SkBitmap source = mandrill;
- SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
- SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
- SkColor colors[] = { 0x7f55aa00, 0x7f3333bf };
- const SkImage* imagePtr = image.get();
- canvas->drawAtlas(imagePtr, xforms, tex, colors, 2, SkBlendMode::kSrcOver, nullptr, nullptr);
+void draw(SkCanvas* canvas) {
+ // SkBitmap source = mandrill;
+ SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
+ SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
+ SkColor colors[] = { 0x7f55aa00, 0x7f3333bf };
+ const SkImage* imagePtr = image.get();
+ canvas->drawAtlas(imagePtr, xforms, tex, colors, 2, SkBlendMode::kSrcOver, nullptr, nullptr);
}
##
@@ -5401,33 +5741,34 @@ void draw(SkCanvas* canvas) {
const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
-paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode to draw, if present.
-For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it
-into destination space.
+paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
+to draw, if present. For each entry in the array, Rect tex locates sprite in
+atlas, and RSXform xform transforms it into destination space.
+
xform, text, and colors if present, must contain count entries.
Optional colors is applied for each sprite using Blend_Mode.
Optional cullRect is a conservative bounds of all transformed sprites.
If cullrect is outside of Clip, canvas can skip drawing.
-#Param atlas Image containing sprites. ##
-#Param xform RSXform mappings for sprites in atlas. ##
-#Param tex Rect locations of sprites in atlas. ##
-#Param colors Color, one per sprite, blended with sprite using Blend_Mode; or nullptr. ##
-#Param count Number of sprites to draw. ##
-#Param mode Blend_Mode combining colors and sprites. ##
-#Param cullRect Rect bounds of transformed sprites for efficient clipping; or nullptr. ##
-#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; or nullptr. ##
+#Param atlas Image containing sprites ##
+#Param xform RSXform mappings for sprites in atlas ##
+#Param tex Rect locations of sprites in atlas ##
+#Param colors Color, one per sprite, blended with sprite using Blend_Mode; may be nullptr ##
+#Param count number of sprites to draw ##
+#Param mode Blend_Mode combining colors and sprites ##
+#Param cullRect Rect bounds of transformed sprites for efficient clipping; may be nullptr ##
+#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; may be nullptr ##
#Example
#Image 3
-void draw(SkCanvas* canvas) {
- // SkBitmap source = mandrill;
- SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
- SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
- SkColor colors[] = { 0x7f55aa00, 0x7f3333bf };
- SkPaint paint;
- paint.setAlpha(127);
- canvas->drawAtlas(image, xforms, tex, colors, 2, SkBlendMode::kPlus, nullptr, &paint);
+void draw(SkCanvas* canvas) {
+ // SkBitmap source = mandrill;
+ SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
+ SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
+ SkColor colors[] = { 0x7f55aa00, 0x7f3333bf };
+ SkPaint paint;
+ paint.setAlpha(127);
+ canvas->drawAtlas(image, xforms, tex, colors, 2, SkBlendMode::kPlus, nullptr, &paint);
}
##
@@ -5441,28 +5782,29 @@ void draw(SkCanvas* canvas) {
const SkRect* cullRect, const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
-paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode to draw, if present.
-For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it
-into destination space.
+paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
+to draw, if present. For each entry in the array, Rect tex locates sprite in
+atlas, and RSXform xform transforms it into destination space.
+
xform and text must contain count entries.
Optional cullRect is a conservative bounds of all transformed sprites.
If cullrect is outside of Clip, canvas can skip drawing.
-#Param atlas Image containing sprites. ##
-#Param xform RSXform mappings for sprites in atlas. ##
-#Param tex Rect locations of sprites in atlas. ##
-#Param count Number of sprites to draw. ##
-#Param cullRect Rect bounds of transformed sprites for efficient clipping; or nullptr. ##
-#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; or nullptr. ##
+#Param atlas Image containing sprites ##
+#Param xform RSXform mappings for sprites in atlas ##
+#Param tex Rect locations of sprites in atlas ##
+#Param count number of sprites to draw ##
+#Param cullRect Rect bounds of transformed sprites for efficient clipping; may be nullptr ##
+#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; may be nullptr ##
#Example
#Image 3
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image = mandrill;
- SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
- SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
- const SkImage* imagePtr = image.get();
- canvas->drawAtlas(imagePtr, xforms, tex, 2, nullptr, nullptr);
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image = mandrill;
+ SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
+ SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
+ const SkImage* imagePtr = image.get();
+ canvas->drawAtlas(imagePtr, xforms, tex, 2, nullptr, nullptr);
}
##
@@ -5476,27 +5818,28 @@ void draw(SkCanvas* canvas) {
int count, const SkRect* cullRect, const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
-paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode to draw, if present.
-For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it
-into destination space.
+paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
+to draw, if present. For each entry in the array, Rect tex locates sprite in
+atlas, and RSXform xform transforms it into destination space.
+
xform and text must contain count entries.
Optional cullRect is a conservative bounds of all transformed sprites.
If cullrect is outside of Clip, canvas can skip drawing.
-#Param atlas Image containing sprites. ##
-#Param xform RSXform mappings for sprites in atlas. ##
-#Param tex Rect locations of sprites in atlas. ##
-#Param count Number of sprites to draw. ##
-#Param cullRect Rect bounds of transformed sprites for efficient clipping; or nullptr. ##
-#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; or nullptr. ##
+#Param atlas Image containing sprites ##
+#Param xform RSXform mappings for sprites in atlas ##
+#Param tex Rect locations of sprites in atlas ##
+#Param count number of sprites to draw ##
+#Param cullRect Rect bounds of transformed sprites for efficient clipping; may be nullptr ##
+#Param paint Paint Color_Filter, Image_Filter, Blend_Mode, and so on; may be nullptr ##
#Example
#Image 3
-void draw(SkCanvas* canvas) {
- // sk_sp<SkImage> image = mandrill;
- SkRSXform xforms[] = { { 1, 0, 0, 0 }, {0, 1, 300, 100 } };
- SkRect tex[] = { { 0, 0, 200, 200 }, { 200, 0, 400, 200 } };
- canvas->drawAtlas(image, xforms, tex, 2, nullptr, nullptr);
+void draw(SkCanvas* canvas) {
+ // sk_sp<SkImage> image = mandrill;
+ SkRSXform xforms[] = { { 1, 0, 0, 0 }, {0, 1, 300, 100 } };
+ SkRect tex[] = { { 0, 0, 200, 200 }, { 200, 0, 400, 200 } };
+ canvas->drawAtlas(image, xforms, tex, 2, nullptr, nullptr);
}
##
@@ -5516,33 +5859,33 @@ when it is recording into Picture, then drawable will be referenced,
so that SkDrawable::draw() can be called when the operation is finalized. To force
immediate drawing, call SkDrawable::draw() instead.
-#Param drawable Custom struct encapsulating drawing commands. ##
-#Param matrix Transformation applied to drawing; or nullptr. ##
+#Param drawable custom struct encapsulating drawing commands ##
+#Param matrix transformation applied to drawing; may be nullptr ##
#Example
#Height 100
#Function
-struct MyDrawable : public SkDrawable {
- SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
-
- void onDraw(SkCanvas* canvas) override {
- SkPath path;
- path.conicTo(10, 90, 50, 90, 0.9f);
- SkPaint paint;
- paint.setColor(SK_ColorBLUE);
- canvas->drawRect(path.getBounds(), paint);
- paint.setAntiAlias(true);
- paint.setColor(SK_ColorWHITE);
- canvas->drawPath(path, paint);
- }
-};
-
-#Function ##
-void draw(SkCanvas* canvas) {
- sk_sp<SkDrawable> drawable(new MyDrawable);
- SkMatrix matrix;
- matrix.setTranslate(10, 10);
- canvas->drawDrawable(drawable.get(), &matrix);
+struct MyDrawable : public SkDrawable {
+ SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
+
+ void onDraw(SkCanvas* canvas) override {
+ SkPath path;
+ path.conicTo(10, 90, 50, 90, 0.9f);
+ SkPaint paint;
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawRect(path.getBounds(), paint);
+ paint.setAntiAlias(true);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawPath(path, paint);
+ }
+};
+
+#Function ##
+void draw(SkCanvas* canvas) {
+ sk_sp<SkDrawable> drawable(new MyDrawable);
+ SkMatrix matrix;
+ matrix.setTranslate(10, 10);
+ canvas->drawDrawable(drawable.get(), &matrix);
}
##
@@ -5561,32 +5904,32 @@ when it is recording into Picture, then drawable will be referenced,
so that SkDrawable::draw() can be called when the operation is finalized. To force
immediate drawing, call SkDrawable::draw() instead.
-#Param drawable Custom struct encapsulating drawing commands. ##
-#Param x Offset into Canvas writable pixels in x. ##
-#Param y Offset into Canvas writable pixels in y. ##
+#Param drawable custom struct encapsulating drawing commands ##
+#Param x offset into Canvas writable pixels in x ##
+#Param y offset into Canvas writable pixels in y ##
#Example
#Height 100
#Function
-struct MyDrawable : public SkDrawable {
- SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
-
- void onDraw(SkCanvas* canvas) override {
- SkPath path;
- path.conicTo(10, 90, 50, 90, 0.9f);
- SkPaint paint;
- paint.setColor(SK_ColorBLUE);
- canvas->drawRect(path.getBounds(), paint);
- paint.setAntiAlias(true);
- paint.setColor(SK_ColorWHITE);
- canvas->drawPath(path, paint);
- }
-};
-
-#Function ##
-void draw(SkCanvas* canvas) {
- sk_sp<SkDrawable> drawable(new MyDrawable);
- canvas->drawDrawable(drawable.get(), 10, 10);
+struct MyDrawable : public SkDrawable {
+ SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
+
+ void onDraw(SkCanvas* canvas) override {
+ SkPath path;
+ path.conicTo(10, 90, 50, 90, 0.9f);
+ SkPaint paint;
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawRect(path.getBounds(), paint);
+ paint.setAntiAlias(true);
+ paint.setColor(SK_ColorWHITE);
+ canvas->drawPath(path, paint);
+ }
+};
+
+#Function ##
+void draw(SkCanvas* canvas) {
+ sk_sp<SkDrawable> drawable(new MyDrawable);
+ canvas->drawDrawable(drawable.get(), 10, 10);
}
##
@@ -5604,9 +5947,9 @@ a null-terminated utf8 string, and optional value is stored as Data.
Only some canvas implementations, such as recording to Picture, or drawing to
Document_PDF, use annotations.
-#Param rect Rect extent of canvas to annotate. ##
-#Param key String used for lookup. ##
-#Param value Data holding value stored in annotation. ##
+#Param rect Rect extent of canvas to annotate ##
+#Param key string used for lookup ##
+#Param value data holding value stored in annotation ##
#Example
#Height 1
@@ -5634,9 +5977,9 @@ a null-terminated utf8 string, and optional value is stored as Data.
Only some canvas implementations, such as recording to Picture, or drawing to
Document_PDF, use annotations.
-#Param rect Rect extent of canvas to annotate. ##
-#Param key String used for lookup. ##
-#Param value Data holding value stored in annotation. ##
+#Param rect Rect extent of canvas to annotate ##
+#Param key string used for lookup ##
+#Param value data holding value stored in annotation ##
#Example
#Height 1
@@ -5678,21 +6021,21 @@ Legacy call to be deprecated.
Returns true if Clip is empty; that is, nothing will draw.
-isClipEmpty 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 Clip changes.
-#Return true if Clip is empty. ##
+#Return true if Clip is empty ##
#Example
- void draw(SkCanvas* canvas) {
- SkDebugf("clip is%s empty\n", canvas->isClipEmpty() ? "" : " not");
- SkPath path;
- canvas->clipPath(path);
- SkDebugf("clip is%s empty\n", canvas->isClipEmpty() ? "" : " not");
+ void draw(SkCanvas* canvas) {
+ SkDebugf("clip is%s empty\n", canvas->isClipEmpty() ? "" : " not");
+ SkPath path;
+ canvas->clipPath(path);
+ SkDebugf("clip is%s empty\n", canvas->isClipEmpty() ? "" : " not");
}
#StdOut
- clip is not empty
+ clip is not empty
clip is empty
##
##
@@ -5708,16 +6051,16 @@ work until Clip changes.
Returns true if Clip is Rect and not empty.
Returns false if the clip is empty, or if it is not Rect.
-#Return true if Clip is Rect and not empty. ##
+#Return true if Clip is Rect and not empty ##
#Example
- void draw(SkCanvas* canvas) {
- SkDebugf("clip is%s rect\n", canvas->isClipRect() ? "" : " not");
- canvas->clipRect({0, 0, 0, 0});
- SkDebugf("clip is%s rect\n", canvas->isClipRect() ? "" : " not");
+ void draw(SkCanvas* canvas) {
+ SkDebugf("clip is%s rect\n", canvas->isClipRect() ? "" : " not");
+ canvas->clipRect({0, 0, 0, 0});
+ SkDebugf("clip is%s rect\n", canvas->isClipRect() ? "" : " not");
}
#StdOut
- clip is rect
+ clip is rect
clip is not rect
##
##
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index 2b1a8ab341..cfb432a1dd 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -20,7 +20,8 @@ Paint does not directly implement dashing or blur, but contains the objects that
The objects contained by Paint are opaque, and cannot be edited outside of the Paint
to affect it. The implementation is free to defer computations associated with the
Paint, or ignore them altogether. For instance, some GPU implementations draw all
-Path geometries with anti-aliasing, regardless of SkPaint::kAntiAlias_Flag setting.
+Path geometries with anti-aliasing, regardless of how SkPaint::kAntiAlias_Flag
+is set in Paint.
Paint 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
@@ -317,7 +318,8 @@ $$$# # restore original markup character
Makes a shallow copy of Paint. Typeface, Path_Effect, Shader,
Mask_Filter, Color_Filter, Rasterizer, Draw_Looper, and Image_Filter are shared
-between the original paint and the copy. These objects' Reference_Count are increased.
+between the original paint and the copy. Objects containing Reference_Count increment
+their references by one.
The referenced objects Path_Effect, Shader, Mask_Filter, Color_Filter, Rasterizer,
Draw_Looper, and Image_Filter cannot be modified after they are created.
@@ -398,7 +400,7 @@ the paint with the result of SkPaint().
Decreases Paint Reference_Count of owned objects: Typeface, Path_Effect, Shader,
Mask_Filter, Color_Filter, Rasterizer, Draw_Looper, and Image_Filter. If the
-objects' reference count goes to zero, they are deleted.
+objects containing Reference_Count go to zero, they are deleted.
#NoExample
##
@@ -413,10 +415,10 @@ objects' reference count goes to zero, they are deleted.
Makes a shallow copy of Paint. Typeface, Path_Effect, Shader,
Mask_Filter, Color_Filter, Rasterizer, Draw_Looper, and Image_Filter are shared
-between the original paint and the copy. The objects' Reference_Count are in the
+between the original paint and the copy. Objects containing Reference_Count in the
prior destination are decreased by one, and the referenced objects are deleted if the
-resulting count is zero. The objects' Reference_Count in the parameter paint are increased
-by one. paint is unmodified.
+resulting count is zero. Objects containing Reference_Count in the parameter paint
+are increased by one. paint is unmodified.
#Param paint original to copy ##
@@ -442,9 +444,9 @@ by one. paint is unmodified.
#Method SkPaint& operator=(SkPaint&& paint)
Moves the paint to avoid incrementing the reference counts
-of objects referenced by the paint parameter. The objects' Reference_Count 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 paint parameter. Objects containing Reference_Count in the
+prior destination are decreased by one; those objects are deleted if the resulting count
+is zero.
After the call, paint is undefined, and can be safely destructed.
@@ -644,7 +646,7 @@ by the client.
kNo_Hinting = 0,
kSlight_Hinting = 1,
kNormal_Hinting = 2,
- kFull_Hinting = 3
+ kFull_Hinting = 3,
};
##
@@ -2090,7 +2092,7 @@ a fill draw.
#Code
enum {
- kStyleCount = kStrokeAndFill_Style + 1
+ kStyleCount = kStrokeAndFill_Style + 1,
};
##
@@ -2377,7 +2379,7 @@ Here are some miter limits and the angles that triggers them.
kSquare_Cap,
kLast_Cap = kSquare_Cap,
- kDefault_Cap = kButt_Cap
+ kDefault_Cap = kButt_Cap,
};
static constexpr int kCapCount = kLast_Cap + 1;
##
@@ -2520,7 +2522,7 @@ the following curve, the pair of curves meet at Stroke_Join.
kBevel_Join,
kLast_Join = kBevel_Join,
- kDefault_Join = kMiter_Join
+ kDefault_Join = kMiter_Join,
};
static constexpr int kJoinCount = kLast_Join + 1;
##
@@ -3724,7 +3726,7 @@ Align defaults to kLeft_Align.
#Code
enum {
- kAlignCount = 3
+ kAlignCount = 3,
};
##
@@ -3987,7 +3989,7 @@ Text_Skew_X defaults to 0.
kUTF8_TextEncoding,
kUTF16_TextEncoding,
kUTF32_TextEncoding,
- kGlyphID_TextEncoding
+ kGlyphID_TextEncoding,
};
##
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 8aecc3168f..9e3ff056fd 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -10,11 +10,13 @@
HTML_Canvas HTML_Canvas_arcTo
API
CPU
- GPU GPU-backed GPU_Context OpenGL Vulkan
+ GPU GPU-backed OpenGL Vulkan
NULL
RFC
Bezier Coons
+ SaveLayerFlags # not external; need to add typedef support
SkUserConfig.h # not external, but still thinking about how markup refers to this
+ SkXXX.h # ditto
Skia # ditto
SK_USE_FREETYPE_EMBOLDEN # ditto
SK_SUPPORT_LEGACY_PAINT_TEXTDECORATION # ditto
@@ -206,6 +208,14 @@ FT_Load_Glyph
#Topic Glyph
##
+#Topic GPU_Context
+#Substitute GPU context
+##
+
+#Topic GPU_Surface
+#Substitute GPU surface
+##
+
#Topic Image
#Subtopic Alpha_Type
#Enum SkAlphaType
@@ -365,6 +375,9 @@ FT_Load_Glyph
##
##
+#Enum SkPixelGeometry
+##
+
#Topic Pixmap
#Class SkPixmap
##
@@ -390,6 +403,9 @@ FT_Load_Glyph
##
##
+#Topic Raster_Surface
+##
+
#Topic Rasterizer
#Class SkRasterizer
#Class ##
@@ -470,18 +486,14 @@ FT_Load_Glyph
##
#Subtopic Properties
#Class SkSurfaceProps
+ #Topic Legacy_Font_Host
#Enum InitType
#Const kLegacyFontHost_InitType 0
##
##
+ #Topic ##
##
##
-#Subtopic GPU
-#Alias GPU_Surface
-##
-#Subtopic Raster
-#Alias Raster_Surface
-##
##
#Topic SVG
diff --git a/docs/usingBookmaker.bmh b/docs/usingBookmaker.bmh
index 65a8df561f..5a088b3d02 100644
--- a/docs/usingBookmaker.bmh
+++ b/docs/usingBookmaker.bmh
@@ -16,10 +16,9 @@ Get the fiddle command line interface tool.
$ go get go.skia.org/infra/fiddle/go/fiddlecli
##
-Get the Bookmaker CL and build it.
+Build Bookmaker.
#Code
-$ git cl patch 9919
$ ninja -C out/dir bookmaker
##
@@ -31,7 +30,8 @@ out/dir/obj/ from an IDE.
$ ./out/dir/bookmaker -t -i include/core/SkXXX.h
##
-Use your favorite editor to fill out SkXXX.bmh.
+Copy SkXXX.bmh to docs.
+Use your favorite editor to fill out docs/SkXXX.bmh.
Generate fiddle.json from all examples, including the ones you just wrote.
Error checking is syntatic: starting keywords are closed, keywords have the
@@ -40,7 +40,7 @@ If you run Bookmaker inside Visual_Studio, you can click on errors and it
will take you to the source line in question.
#Code
-$ ./out/dir/bookmaker -e fiddle.json -b current_directory
+$ ./out/dir/bookmaker -e fiddle.json -b docs
##
Once complete, run fiddlecli to generate the example hashes.
@@ -56,7 +56,7 @@ missing or mismatched printf output.
Again, you can click on any errors inside Visual_Studio.
#Code
-$ ./out/dir/bookmaker -r site/user/api -b current_directory -f fiddleout.json
+$ ./out/dir/bookmaker -r site/user/api -b docs -f fiddleout.json
##
The original include may have changed since you started creating the markdown.
@@ -64,32 +64,20 @@ Check to see if it is up to date.
This reports if a method no longer exists or its parameters have changed.
#Code
-$ ./out/dir/bookmaker -x -b current_directory/SkXXX.bmh -i include/core/SkXXX.h
+$ ./out/dir/bookmaker -x -b docs/SkXXX.bmh -i include/core/SkXXX.h
##
-#Topic Bugs
-#List
-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)
-##
-##
+Generate an updated include header.
+This writes the updated SkXXX.h to the current directory.
-#Topic To_Do
-#List
-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?
+#Code
+$ ./out/dir/bookmaker -p -b docs -i include/core/SkXXX.h
##
+
+#Subtopic Bugs
+
+Bookmaker bugs are tracked #A here # bug.skia.org/6898 ##.
+
##
#Topic Bookmaker ##
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.
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 7a0e0851fe..939519ef29 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -21,37 +21,11 @@ remove anonymous header, e.g. Enum SkPaint::::anonymous_2
Text Encoding anchors in paragraph are echoed instead of being linked to anchor names
also should not point to 'undocumented' since they are resolvable links
#Member lost all formatting
-inconsistent use of capitalization in #Param
#List needs '# content ##', formatting
consts like enum members need fully qualfied refs to make a valid link
enum comments should be disallowed unless after #Enum and before first #Const
... or, should look for enum comments in other places
-// in includeWriter.cpp
-lf preceding #A is ignored
-
-Text_Size should become SkPaint's text size if root is not Paint?
-100 column limit done manually -- either error or rewrap
-
-SkPaint.bmh line 22:
-Insert 'the' after 'regardless of' ?
-somewhat intentional. Imagine SkPaint::kXXX is 'Joe'. Then it shouldn't read 'regardless
-of the Joe setting.' To make that work as a proper pronoun, maybe it should read:
-'regardless of SkPaint's kAntiAlias_Flag setting or 'regardless of SkPaint's anti-alias setting'.
-It's the way it is so that SkPaint::kAntiAlias_Flag can be a link to the definition.
-Its awkwardness is compounded because this description is technically outside of 'class SkPaint'
-so a reference to kAntiAlias_Flag by itself doesn't know that it is defined inside SkPaint,
-but that's a detail I could work around.
-
-SkPaint.bmh line 319, 400, 444
-more complications I haven't figured out. I don't know when or how to pluralize
-references. This should be "objects' reference counts" probably, but then
-I lose the link to SkRefCnt.
-
-SkPaint.bmh line 2639
-I'd argue that 'fill path' is OK, in that is it the path that will fill, not the path
-that has already been filled. I see the awkwardness though, and will add it to my bug list.
-
*/
static string normalized_name(string name) {
@@ -1649,7 +1623,7 @@ void TextParser::reportWarning(const char* errorStr) const {
spaces -= lineLen;
lineLen = err.lineLength();
}
- SkDebugf("%s(%zd): error: %s\n", fFileName.c_str(), err.fLineCount, errorStr);
+ SkDebugf("\n%s(%zd): error: %s\n", fFileName.c_str(), err.fLineCount, errorStr);
if (0 == lineLen) {
SkDebugf("[blank line]\n");
} else {
@@ -1856,9 +1830,6 @@ string BmhParser::uniqueName(const string& base, MarkType markType) {
for (const auto& iter : fParent->fChildren) {
if (markType == iter->fMarkType) {
if (iter->fName == numBuilder) {
- if (MarkType::kMethod == markType) {
- SkDebugf("");
- }
fCloned = true;
numBuilder = builder + '_' + to_string(number);
goto tryNext;
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 80254505e6..fae41c4ddd 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -497,6 +497,35 @@ public:
return len <= (size_t) lineLen && 0 == strncmp(str, fChar, len);
}
+ // ignores minor white space differences
+ bool startsWith(const char* str, size_t oLen) const {
+ size_t tIndex = 0;
+ size_t tLen = fEnd - fChar;
+ size_t oIndex = 0;
+ while (oIndex < oLen && tIndex < tLen) {
+ bool tSpace = ' ' >= fChar[tIndex];
+ bool oSpace = ' ' >= str[oIndex];
+ if (tSpace != oSpace) {
+ break;
+ }
+ if (tSpace) {
+ do {
+ ++tIndex;
+ } while (tIndex < tLen && ' ' >= fChar[tIndex]);
+ do {
+ ++oIndex;
+ } while (oIndex < oLen && ' ' >= str[oIndex]);
+ continue;
+ }
+ if (fChar[tIndex] != str[oIndex]) {
+ break;
+ }
+ ++tIndex;
+ ++oIndex;
+ }
+ return oIndex >= oLen;
+ }
+
const char* strnchr(char ch, const char* end) const {
const char* ptr = fChar;
while (ptr < end) {
@@ -1028,7 +1057,7 @@ public:
if (size <= 0) {
return false;
}
- SkASSERT(size < 8000);
+ SkASSERT(size < 16000);
if (size > 3 && !strncmp("#end", data, 4)) {
fMaxLF = 1;
}
@@ -1203,10 +1232,10 @@ public:
, { "EnumClass", &fClassMap, MarkType::kEnumClass, R_Y, E_O, M_CSST | M(Root) }
, { "Error", nullptr, MarkType::kError, R_N, E_N, M(Example) }
, { "Example", nullptr, MarkType::kExample, R_O, E_N, M_CSST | M_E | M(Method) }
-, { "Experimental", nullptr, MarkType::kExperimental, R_Y, E_N, 0 }
+, { "Experimental", nullptr, MarkType::kExperimental, R_Y, E_N, 0 }
, { "External", nullptr, MarkType::kExternal, R_Y, E_N, M(Root) }
, { "File", nullptr, MarkType::kFile, R_N, E_N, M(Track) }
-, { "Formula", nullptr, MarkType::kFormula, R_O, E_N, M_ST | M(Method) | M_D }
+, { "Formula", nullptr, MarkType::kFormula, R_O, E_N, M_ST | M(Member) | M(Method) | M_D }
, { "Function", nullptr, MarkType::kFunction, R_O, E_N, M(Example) }
, { "Height", nullptr, MarkType::kHeight, R_N, E_N, M(Example) }
, { "Image", nullptr, MarkType::kImage, R_N, E_N, M(Example) }
@@ -1465,6 +1494,7 @@ public:
}
static KeyWord FindKey(const char* start, const char* end);
+ bool internalName(const Definition& ) const;
void keywordEnd();
void keywordStart(const char* keyword);
bool parseChar();
@@ -1607,6 +1637,15 @@ public:
kChars,
};
+ struct IterState {
+ IterState (list<Definition>::iterator tIter, list<Definition>::iterator tIterEnd)
+ : fDefIter(tIter)
+ , fDefEnd(tIterEnd) {
+ }
+ list<Definition>::iterator fDefIter;
+ list<Definition>::iterator fDefEnd;
+ };
+
IncludeWriter() : IncludeParser() {}
~IncludeWriter() override {}
@@ -1622,7 +1661,7 @@ public:
}
void enumHeaderOut(const RootDefinition* root, const Definition& child);
- void enumMembersOut(const RootDefinition* root, const Definition& child);
+ void enumMembersOut(const RootDefinition* root, Definition& child);
void enumSizeItems(const Definition& child);
int lookupMethod(const PunctuationState punctuation, const Word word,
const int start, const int run, int lastWrite,
@@ -1648,7 +1687,7 @@ public:
string resolveMethod(const char* start, const char* end, bool first);
string resolveRef(const char* start, const char* end, bool first);
Wrote rewriteBlock(int size, const char* data);
- void structMemberOut(const Definition* memberStart, const Definition& child);
+ Definition* structMemberOut(const Definition* memberStart, const Definition& child);
void structOut(const Definition* root, const Definition& child,
const char* commentStart, const char* commentEnd);
void structSizeMembers(Definition& child);
@@ -1656,6 +1695,7 @@ public:
private:
BmhParser* fBmhParser;
Definition* fDeferComment;
+ Definition* fLastComment;
const Definition* fBmhMethod;
const Definition* fEnumDef;
const Definition* fMethodDef;
@@ -1665,6 +1705,7 @@ private:
int fEnumItemValueTab;
int fEnumItemCommentTab;
int fStructMemberTab;
+ int fStructValueTab;
int fStructCommentTab;
bool fInStruct;
@@ -1752,6 +1793,7 @@ private:
void reset() override {
INHERITED::resetCommon();
+ fEnumClass = nullptr;
fMethod = nullptr;
fRoot = nullptr;
fTableState = TableState::kNone;
@@ -1771,6 +1813,7 @@ private:
void resolveOut(const char* start, const char* end, BmhParser::Resolvable );
const BmhParser& fBmhParser;
+ const Definition* fEnumClass;
Definition* fMethod;
RootDefinition* fRoot;
TableState fTableState;
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index 089dcb3658..826c321c7f 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -77,6 +77,9 @@ KeyWord IncludeParser::FindKey(const char* start, const char* end) {
}
++ch;
if (start + ch >= end) {
+ if (end - start < (int) strlen(kKeyWords[index].fName)) {
+ return KeyWord::kNone;
+ }
return kKeyWords[index].fKeyWord;
}
}
@@ -230,10 +233,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
const Definition* def = root->find(fullName);
switch (token.fMarkType) {
case MarkType::kMethod: {
- if (0 == token.fName.find("internal_")
- || 0 == token.fName.find("Internal_")
- || 0 == token.fName.find("legacy_")
- || 0 == token.fName.find("temporary_")) {
+ if (this->internalName(token)) {
continue;
}
const char* methodID = bmhParser.fMaps[(int) token.fMarkType].fName;
@@ -833,6 +833,14 @@ bool IncludeParser::findComments(const Definition& includeDef, Definition* marku
return true;
}
+bool IncludeParser::internalName(const Definition& token) const {
+ return 0 == token.fName.find("internal_")
+ || 0 == token.fName.find("Internal_")
+ || 0 == token.fName.find("legacy_")
+ || 0 == token.fName.find("temporary_")
+ || 0 == token.fName.find("private_");
+}
+
// caller calls reportError, so just return false here
bool IncludeParser::parseClass(Definition* includeDef, IsStruct isStruct) {
SkASSERT(includeDef->fTokens.size() > 0);
@@ -980,6 +988,9 @@ bool IncludeParser::parseEnum(Definition* child, Definition* markupDef) {
markupChild->fKeyWord = KeyWord::kEnum;
TextParser enumName(child);
enumName.skipExact("enum ");
+ if (enumName.skipExact("class ")) {
+ markupChild->fMarkType = MarkType::kEnumClass;
+ }
const char* nameStart = enumName.fChar;
enumName.skipToSpace();
markupChild->fName = markupDef->fName + "::" +
@@ -1594,6 +1605,10 @@ bool IncludeParser::parseChar() {
}
if (Definition::Type::kKeyWord == fParent->fType
&& KeyProperty::kObject == (kKeyWords[(int) fParent->fKeyWord].fProperty)) {
+ if (KeyWord::kClass == fParent->fKeyWord && fParent->fParent &&
+ KeyWord::kEnum == fParent->fParent->fKeyWord) {
+ this->popObject();
+ }
if (KeyWord::kEnum == fParent->fKeyWord) {
fInEnum = false;
}
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index e0cf2714c5..81fb3cc255 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -19,8 +19,19 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
const auto& nameDef = child.fTokens.front();
string fullName;
if (nullptr != nameDef.fContentEnd) {
- string enumName(nameDef.fContentStart,
- (int) (nameDef.fContentEnd - nameDef.fContentStart));
+ TextParser enumClassCheck(&nameDef);
+ const char* start = enumClassCheck.fStart;
+ size_t len = (size_t) (enumClassCheck.fEnd - start);
+ bool enumClass = enumClassCheck.skipExact("class ");
+ if (enumClass) {
+ start = enumClassCheck.fChar;
+ const char* end = enumClassCheck.anyOf(" \n;{");
+ len = (size_t) (end - start);
+ }
+ string enumName(start, len);
+ if (enumClass) {
+ child.fChildren[0]->fName = enumName;
+ }
fullName = root->fName + "::" + enumName;
enumDef = root->find(enumName);
if (!enumDef) {
@@ -60,8 +71,10 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
!this->contentFree((int) (commentEnd - commentStart), commentStart)) {
this->writeCommentHeader();
this->writeString("\\enum");
- this->writeSpace();
- this->writeString(fullName.c_str());
+ if (fullName.length() > 0) {
+ this->writeSpace();
+ this->writeString(fullName.c_str());
+ }
fIndent += 4;
this->lfcr();
wroteHeader = true;
@@ -88,7 +101,11 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
this->lfcr();
this->writeCommentTrailer();
}
- bodyEnd = child.fChildren[0]->fContentStart;
+ Definition* braceHolder = child.fChildren[0];
+ if (KeyWord::kClass == braceHolder->fKeyWord) {
+ braceHolder = braceHolder->fChildren[0];
+ }
+ bodyEnd = braceHolder->fContentStart;
SkASSERT('{' == bodyEnd[0]);
++bodyEnd;
this->lfcr();
@@ -99,7 +116,7 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
fEnumDef = enumDef;
}
-void IncludeWriter::enumMembersOut(const RootDefinition* root, const Definition& child) {
+void IncludeWriter::enumMembersOut(const RootDefinition* root, Definition& child) {
// iterate through include tokens and find how much remains for 1 line comments
// put ones that fit on same line, ones that are too big on preceding line?
const Definition* currentEnumItem = nullptr;
@@ -113,10 +130,14 @@ void IncludeWriter::enumMembersOut(const RootDefinition* root, const Definition&
kItemComment,
};
State state = State::kNoItem;
- // can't use (auto& token : child.fTokens) 'cause we need state one past end
- auto tokenIter = child.fTokens.begin();
- for (int onePast = 0; onePast < 2; onePast += tokenIter == child.fTokens.end()) {
- const Definition* token = onePast ? nullptr : &*tokenIter++;
+ vector<IterState> iterStack;
+ iterStack.emplace_back(child.fTokens.begin(), child.fTokens.end());
+ IterState* iterState = &iterStack[0];
+ bool preprocessorWord = false;
+ const char* preprocessStart = nullptr;
+ const char* preprocessEnd = nullptr;
+ for (int onePast = 0; onePast < 2; onePast += iterState->fDefIter == iterState->fDefEnd) {
+ Definition* token = onePast ? nullptr : &*iterState->fDefIter++;
if (token && Definition::Type::kBracket == token->fType) {
if (Bracket::kSlashSlash == token->fBracket) {
fStart = token->fContentEnd;
@@ -126,11 +147,31 @@ void IncludeWriter::enumMembersOut(const RootDefinition* root, const Definition&
fStart = token->fContentEnd + 1;
continue; // ignore old inline comments
}
+ if (Bracket::kPound == token->fBracket) { // preprocessor wraps member
+ preprocessStart = token->fContentStart;
+ if (KeyWord::kIf == token->fKeyWord || KeyWord::kIfdef == token->fKeyWord) {
+ iterStack.emplace_back(token->fTokens.begin(), token->fTokens.end());
+ iterState = &iterStack.back();
+ preprocessorWord = true;
+ } else if (KeyWord::kEndif == token->fKeyWord) {
+ iterStack.pop_back();
+ iterState = &iterStack.back();
+ preprocessEnd = token->fContentEnd;
+ } else {
+ SkASSERT(0); // incomplete
+ }
+ continue;
+ }
SkASSERT(0); // incomplete
}
if (token && Definition::Type::kWord != token->fType) {
SkASSERT(0); // incomplete
}
+ if (preprocessorWord) {
+ preprocessorWord = false;
+ preprocessEnd = token->fContentEnd;
+ continue;
+ }
if (token && State::kItemName == state) {
TextParser enumLine(token->fFileName, lastEnd,
token->fContentStart, token->fLineCount);
@@ -172,6 +213,17 @@ void IncludeWriter::enumMembersOut(const RootDefinition* root, const Definition&
fIndent -= 4;
}
this->lfcr();
+ if (preprocessStart) {
+ SkASSERT(preprocessEnd);
+ int saveIndent = fIndent;
+ fIndent = SkTMax(0, fIndent - 8);
+ this->lf(2);
+ this->writeBlock((int) (preprocessEnd - preprocessStart), preprocessStart);
+ this->lfcr();
+ fIndent = saveIndent;
+ preprocessStart = nullptr;
+ preprocessEnd = nullptr;
+ }
if (token && State::kItemValue == state) {
fStart = token->fContentStart;
}
@@ -182,8 +234,11 @@ void IncludeWriter::enumMembersOut(const RootDefinition* root, const Definition&
break;
}
SkASSERT(token);
- string itemName = root->fName + "::" + string(token->fContentStart,
- (int) (token->fContentEnd - token->fContentStart));
+ string itemName = root->fName + "::";
+ if (KeyWord::kClass == child.fParent->fKeyWord) {
+ itemName += child.fParent->fName + "::";
+ }
+ itemName += string(token->fContentStart, (int) (token->fContentEnd - token->fContentStart));
for (auto& enumItem : fEnumDef->fChildren) {
if (MarkType::kConst != enumItem->fMarkType) {
continue;
@@ -251,8 +306,16 @@ void IncludeWriter::enumSizeItems(const Definition& child) {
const char* lastEnd = nullptr;
SkASSERT(child.fChildren.size() == 1 || child.fChildren.size() == 2);
auto brace = child.fChildren[0];
+ if (KeyWord::kClass == brace->fKeyWord) {
+ brace = brace->fChildren[0];
+ }
SkASSERT(Bracket::kBrace == brace->fBracket);
- for (auto& token : brace->fTokens) {
+ vector<IterState> iterStack;
+ iterStack.emplace_back(brace->fTokens.begin(), brace->fTokens.end());
+ IterState* iterState = &iterStack[0];
+ bool preprocessorWord = false;
+ while (iterState->fDefIter != iterState->fDefEnd) {
+ auto& token = *iterState->fDefIter++;
if (Definition::Type::kBracket == token.fType) {
if (Bracket::kSlashSlash == token.fBracket) {
continue; // ignore old inline comments
@@ -260,11 +323,28 @@ void IncludeWriter::enumSizeItems(const Definition& child) {
if (Bracket::kSlashStar == token.fBracket) {
continue; // ignore old inline comments
}
+ if (Bracket::kPound == token.fBracket) { // preprocessor wraps member
+ if (KeyWord::kIf == token.fKeyWord || KeyWord::kIfdef == token.fKeyWord) {
+ iterStack.emplace_back(token.fTokens.begin(), token.fTokens.end());
+ iterState = &iterStack.back();
+ preprocessorWord = true;
+ } else if (KeyWord::kEndif == token.fKeyWord) {
+ iterStack.pop_back();
+ iterState = &iterStack.back();
+ } else {
+ SkASSERT(0); // incomplete
+ }
+ continue;
+ }
SkASSERT(0); // incomplete
}
if (Definition::Type::kWord != token.fType) {
SkASSERT(0); // incomplete
}
+ if (preprocessorWord) {
+ preprocessorWord = false;
+ continue;
+ }
if (State::kItemName == state) {
TextParser enumLine(token.fFileName, lastEnd,
token.fContentStart, token.fLineCount);
@@ -358,7 +438,31 @@ void IncludeWriter::methodOut(const Definition* method, const Definition& child)
}
commentStart = methodProp->fTerminator;
commentLen = (int) (method->fContentEnd - commentStart);
- break;
+ break;
+ case MarkType::kExperimental:
+ this->writeString("EXPERIMENTAL:");
+ this->writeSpace();
+ commentStart = methodProp->fContentStart;
+ commentLen = (int) (methodProp->fContentEnd - commentStart);
+ if (commentLen > 0) {
+ if (Wrote::kNone != this->rewriteBlock(commentLen, commentStart)) {
+ this->lfcr();
+ }
+ }
+ commentStart = methodProp->fTerminator;
+ commentLen = (int) (method->fContentEnd - commentStart);
+ break;
+ case MarkType::kToDo:
+ commentLen = (int) (methodProp->fStart - commentStart);
+ if (commentLen > 0) {
+ SkASSERT(commentLen < 1000);
+ if (Wrote::kNone != this->rewriteBlock(commentLen, commentStart)) {
+ this->lfcr();
+ }
+ }
+ commentStart = methodProp->fTerminator;
+ commentLen = (int) (method->fContentEnd - commentStart);
+ break;
default:
commentLen = (int) (methodProp->fStart - commentStart);
breakOut = true;
@@ -367,7 +471,7 @@ void IncludeWriter::methodOut(const Definition* method, const Definition& child)
break;
}
}
- SkASSERT(commentLen > 0 && commentLen < 1000);
+ SkASSERT(commentLen > 0 && commentLen < 1500);
this->rewriteBlock(commentLen, commentStart);
// compute indention column
size_t column = 0;
@@ -436,23 +540,40 @@ void IncludeWriter::structOut(const Definition* root, const Definition& child,
this->writeCommentTrailer();
}
-void IncludeWriter::structMemberOut(const Definition* memberStart, const Definition& child) {
+Definition* IncludeWriter::structMemberOut(const Definition* memberStart, const Definition& child) {
+ const char* blockStart = fDeferComment ? fLastComment->fContentEnd : fStart;
+ this->writeBlockTrim((int) (memberStart->fStart - blockStart), blockStart);
const char* commentStart = nullptr;
ptrdiff_t commentLen = 0;
string name(child.fContentStart, (int) (child.fContentEnd - child.fContentStart));
bool isShort;
+ Definition* commentBlock = nullptr;
for (auto memberDef : fStructDef->fChildren) {
if (memberDef->fName.length() - name.length() == memberDef->fName.find(name)) {
commentStart = memberDef->fContentStart;
- commentLen = memberDef->fContentEnd - memberDef->fContentStart;
+ commentLen = memberDef->fContentEnd - commentStart;
isShort = memberDef->fShort;
+ commentBlock = memberDef;
+ SkASSERT(!isShort || memberDef->fChildren.size() == 0);
break;
}
}
if (!isShort) {
this->writeCommentHeader();
+ bool wroteLineFeed = false;
fIndent += 4;
- bool wroteLineFeed = Wrote::kLF == this->rewriteBlock(commentLen, commentStart);
+ for (auto child : commentBlock->fChildren) {
+ commentLen = child->fStart - commentStart;
+ wroteLineFeed |= Wrote::kLF == this->rewriteBlock(commentLen, commentStart);
+ if (MarkType::kFormula == child->fMarkType) {
+ this->writeSpace();
+ this->writeBlock((int) (child->fContentEnd - child->fContentStart),
+ child->fContentStart);
+ }
+ commentStart = child->fTerminator;
+ }
+ commentLen = commentBlock->fContentEnd - commentStart;
+ wroteLineFeed |= Wrote::kLF == this->rewriteBlock(commentLen, commentStart);
fIndent -= 4;
if (wroteLineFeed || fColumn > 100 - 3 /* space * / */ ) {
this->lfcr();
@@ -462,10 +583,25 @@ void IncludeWriter::structMemberOut(const Definition* memberStart, const Definit
this->writeCommentTrailer();
}
this->lfcr();
- this->writeBlock((int) (memberStart->fContentEnd - memberStart->fContentStart),
+ this->writeBlock((int) (child.fStart - memberStart->fContentStart),
memberStart->fContentStart);
this->indentToColumn(fStructMemberTab);
this->writeString(name.c_str());
+ auto tokenIter = child.fParent->fTokens.begin();
+ std::advance(tokenIter, child.fParentIndex + 1);
+ Definition* valueStart = &*tokenIter;
+ while (Definition::Type::kPunctuation != tokenIter->fType) {
+ std::advance(tokenIter, 1);
+ SkASSERT(child.fParent->fTokens.end() != tokenIter);
+ }
+ Definition* valueEnd = &*tokenIter;
+ if (valueStart != valueEnd) {
+ this->indentToColumn(fStructValueTab);
+ this->writeString("=");
+ this->writeSpace();
+ this->writeBlock((int) (valueEnd->fStart - valueStart->fContentStart),
+ valueStart->fContentStart);
+ }
this->writeString(";");
if (isShort) {
this->indentToColumn(fStructCommentTab);
@@ -474,14 +610,18 @@ void IncludeWriter::structMemberOut(const Definition* memberStart, const Definit
this->rewriteBlock(commentLen, commentStart);
this->lfcr();
}
+ return valueEnd;
}
void IncludeWriter::structSizeMembers(Definition& child) {
int longestType = 0;
Definition* typeStart = nullptr;
int longestName = 0;
+ int longestValue = 0;
SkASSERT(child.fChildren.size() == 1 || child.fChildren.size() == 2);
bool inEnum = false;
+ bool inMethod = false;
+ bool inMember = false;
auto brace = child.fChildren[0];
SkASSERT(Bracket::kBrace == brace->fBracket);
for (auto& token : brace->fTokens) {
@@ -493,6 +633,9 @@ void IncludeWriter::structSizeMembers(Definition& child) {
continue; // ignore old inline comments
}
if (Bracket::kParen == token.fBracket) {
+ if (inMethod) {
+ continue;
+ }
break;
}
SkASSERT(0); // incomplete
@@ -525,6 +668,20 @@ void IncludeWriter::structSizeMembers(Definition& child) {
SkASSERT(Punctuation::kSemicolon == token.fPunctuation);
inEnum = false;
}
+ if (inMethod) {
+ if (Punctuation::kColon == token.fPunctuation) {
+ inMethod = false;
+ } else if (Punctuation::kLeftBrace == token.fPunctuation) {
+ inMethod = false;
+ } else {
+ SkASSERT(0); // incomplete
+ }
+ }
+ if (inMember) {
+ SkASSERT(Punctuation::kSemicolon == token.fPunctuation);
+ typeStart = nullptr;
+ inMember = false;
+ }
continue;
}
if (Definition::Type::kWord != token.fType) {
@@ -534,19 +691,33 @@ void IncludeWriter::structSizeMembers(Definition& child) {
TextParser typeStr(token.fFileName, typeStart->fContentStart, token.fContentStart,
token.fLineCount);
typeStr.trimEnd();
- longestType = SkTMax(longestType, (int) (typeStr.fEnd - typeStart->fContentStart));
+ longestType = SkTMax(longestType, (int) (typeStr.fEnd - typeStr.fStart));
longestName = SkTMax(longestName, (int) (token.fContentEnd - token.fContentStart));
typeStart->fMemberStart = true;
- typeStart = nullptr;
+ inMember = true;
+ continue;
+ }
+ if (MarkType::kMethod == token.fMarkType) {
+ inMethod = true;
continue;
}
SkASSERT(MarkType::kNone == token.fMarkType);
- if (!typeStart) {
+ if (typeStart) {
+ if (inMember) {
+ longestValue =
+ SkTMax(longestValue, (int) (token.fContentEnd - token.fContentStart));
+ }
+ } else {
typeStart = &token;
}
}
fStructMemberTab = longestType + fIndent + 1 /* space before name */ ;
- fStructCommentTab = fStructMemberTab + longestName + 2 /* ; space */ ;
+ fStructValueTab = fStructMemberTab + longestName + 2 /* space ; */ ;
+ fStructCommentTab = fStructValueTab;
+ if (longestValue) {
+ fStructCommentTab += longestValue + 3 /* space = space */ ;
+ fStructValueTab -= 1 /* ; */ ;
+ }
// iterate through bmh children and see which comments fit on include lines
for (auto& member : fStructDef->fChildren) {
if (MarkType::kMember != member->fMarkType) {
@@ -574,9 +745,18 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
const Definition* method;
const Definition* clonedMethod = nullptr;
const Definition* memberStart = nullptr;
+ const Definition* memberEnd = nullptr;
fContinuation = nullptr;
bool inStruct = false;
+ bool inConstructor = false;
for (auto& child : def->fTokens) {
+ if (memberEnd) {
+ if (memberEnd != &child) {
+ continue;
+ }
+ fStart = child.fContentStart + 1;
+ memberEnd = nullptr;
+ }
if (child.fPrivate) {
continue;
}
@@ -588,6 +768,9 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
}
if (Definition::Type::kBracket == child.fType && Bracket::kParen == child.fBracket) {
if (!clonedMethod) {
+ if (inConstructor) {
+ fContinuation = child.fContentStart;
+ }
continue;
}
int alternate = 1;
@@ -598,8 +781,7 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
TextParser params(clonedMethod->fFileName, clonedMethod->fStart,
clonedMethod->fContentStart, clonedMethod->fLineCount);
params.skipToEndBracket('(');
- if (params.fEnd - params.fChar >= childLen &&
- !strncmp(params.fChar, child.fContentStart, childLen)) {
+ if (params.startsWith(child.fContentStart, childLen)) {
this->methodOut(clonedMethod, child);
break;
}
@@ -643,9 +825,12 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
this->methodOut(method, child);
continue;
}
+ if (inConstructor) {
+ continue;
+ }
methodName += "()";
method = root->find(methodName);
- if (MarkType::kDefinedBy == method->fMarkType) {
+ if (method && MarkType::kDefinedBy == method->fMarkType) {
method = method->fParent;
}
if (method) {
@@ -660,9 +845,13 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
if (!fDeferComment) {
fDeferComment = &child;
}
+ fLastComment = &child;
continue;
}
if (MarkType::kMethod == child.fMarkType) {
+ if (this->internalName(child)) {
+ continue;
+ }
const char* bodyEnd = fDeferComment ? fDeferComment->fContentStart - 1 :
child.fContentStart;
// FIXME: roll end-trimming into writeBlockTrim call
@@ -675,6 +864,7 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
}
fStart = child.fContentStart;
methodName = root->fName + "::" + child.fName;
+ inConstructor = root->fName == child.fName;
fContinuation = child.fContentEnd;
method = root->find(methodName);
if (!method) {
@@ -732,6 +922,13 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
if (nullptr == structDef) {
structDef = root->find(root->fName + "::" + child.fName);
}
+ if (!structDef) {
+ this->lf(2);
+ fIndent = 0;
+ this->writeBlock((int) (fStart - bodyEnd), bodyEnd);
+ this->lfcr();
+ continue;
+ }
Definition* codeBlock = nullptr;
Definition* nextBlock = nullptr;
for (auto test : structDef->fChildren) {
@@ -756,7 +953,7 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
}
break;
case KeyWord::kEnum: {
- this->fInEnum = true;
+ fInEnum = true;
this->enumHeaderOut(root, child);
this->enumSizeItems(child);
} break;
@@ -777,6 +974,7 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
case KeyWord::kPrivate:
case KeyWord::kProtected:
case KeyWord::kFriend:
+ case KeyWord::kTypedef:
break;
default:
SkASSERT(0);
@@ -795,21 +993,27 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
const char* structEnd = child.fContentEnd;
SkAssertResult('}' == structEnd[-1]);
--structEnd;
- this->writeBlock((int) (structEnd - fStart), fStart);
+ this->writeBlockTrim((int) (structEnd - fStart), fStart);
this->lf(2);
fStart = structEnd;
fIndent -= 4;
fContinuation = nullptr;
fDeferComment = nullptr;
} else {
- if (!this->populate(&child, root)) {
+ if (fInEnum && KeyWord::kClass == child.fChildren[0]->fKeyWord) {
+ if (!this->populate(child.fChildren[0], root)) {
+ return false;
+ }
+ } else if (!this->populate(&child, root)) {
return false;
}
}
continue;
}
if (Definition::Type::kBracket == child.fType) {
- if (KeyWord::kEnum == child.fParent->fKeyWord) {
+ if (KeyWord::kEnum == child.fParent->fKeyWord ||
+ (KeyWord::kClass == child.fParent->fKeyWord && child.fParent->fParent &&
+ KeyWord::kEnum == child.fParent->fParent->fKeyWord)) {
this->enumMembersOut(root, child);
this->writeString("};");
this->lf(2);
@@ -828,7 +1032,7 @@ bool IncludeWriter::populate(Definition* def, RootDefinition* root) {
}
if (Definition::Type::kWord == child.fType) {
if (MarkType::kMember == child.fMarkType) {
- this->structMemberOut(memberStart, child);
+ memberEnd = this->structMemberOut(memberStart, child);
fStart = child.fContentEnd + 1;
fDeferComment = nullptr;
}
@@ -953,6 +1157,12 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first)
rootDefIter = fBmhParser->fTopicMap.find(prefixedName);
if (fBmhParser->fTopicMap.end() != rootDefIter) {
rootDef = rootDefIter->second;
+ } else if (fStructDef) {
+ string localPrefix = fStructDef->fFiddle + '_' + undername;
+ rootDefIter = fBmhParser->fTopicMap.find(localPrefix);
+ if (fBmhParser->fTopicMap.end() != rootDefIter) {
+ rootDef = rootDefIter->second;
+ }
} else {
auto aliasIter = fBmhParser->fAliasMap.find(undername);
if (fBmhParser->fAliasMap.end() != aliasIter) {
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index b7c076671b..f048d64aab 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -140,7 +140,8 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
&& string::npos != ref.find_first_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ")) {
// FIXME: see isDefined(); check to see if fXX is a member of xx.fXX
if (('f' != ref[0] && string::npos == ref.find("()"))
- || '.' != t.backup(ref.c_str())) {
+// || '.' != t.backup(ref.c_str())
+ && ('k' != ref[0] && string::npos == ref.find("_Private"))) {
if (BmhParser::Resolvable::kOut != resolvable) {
t.reportError("missed camelCase");
return result;
@@ -284,6 +285,8 @@ void MdOut::childrenOut(const Definition* def, const char* start) {
fLineCount = def->fLineCount;
if (def->isRoot()) {
fRoot = const_cast<RootDefinition*>(def->asRoot());
+ } else if (MarkType::kEnumClass == def->fMarkType) {
+ fEnumClass = def;
}
BmhParser::Resolvable resolvable = this->resolvable(def->fMarkType);
for (auto& child : def->fChildren) {
@@ -298,6 +301,9 @@ void MdOut::childrenOut(const Definition* def, const char* start) {
end = def->fContentEnd;
this->resolveOut(start, end, resolvable);
}
+ if (MarkType::kEnumClass == def->fMarkType) {
+ fEnumClass = nullptr;
+ }
}
const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, bool report) const {
@@ -389,6 +395,18 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
return &iter.second;
}
}
+ if (fEnumClass) {
+ string fullName = fEnumClass->fName + "::" + ref;
+ for (auto child : fEnumClass->fChildren) {
+ if (fullName == child->fName) {
+ return child;
+ }
+ }
+ }
+ if (string::npos != ref.find("_Private")) {
+ return nullptr;
+ }
+ SkDebugf("");
}
if ('f' == ref[0]) {
// FIXME : find def associated with prior, e.g.: r.fX where 'SkPoint r' was earlier