aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkCanvas_Reference.bmh
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2017-09-01 15:51:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-01 20:10:51 +0000
commitce1012403bacf017c0d91c779fa9e9bddd1475f8 (patch)
treec37f3cf044fec75b6ad5e2e298363f3ea233e6cb /docs/SkCanvas_Reference.bmh
parentbd40a5bf5bef1ebb5400f0cf087a420a98bb707b (diff)
bookmaker spelling with fixed linux build
Work on spell-checker to identify errors and isolate more concepts requiring definitions. fix linux build Docs-Preview: https://skia.org/?cl=42103 Docs-Preview: https://skia.org/?cl=41180 Tbr: caryclark@google.com Bug: skia: 6898 Change-Id: Id939b0c2915c22e0fa1b15623c1a56fbe9d4051d Reviewed-on: https://skia-review.googlesource.com/42103 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'docs/SkCanvas_Reference.bmh')
-rw-r--r--docs/SkCanvas_Reference.bmh717
1 files changed, 385 insertions, 332 deletions
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index 8a4fe87fd0..632c7c1260 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -16,7 +16,7 @@ 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
+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.
@@ -53,7 +53,7 @@ This approach may be deprecated in the future.
# struct # description ##
#Legend ##
# Lattice # Divides Bitmap, Image into a rectangular grid. ##
-# SaveLayerRec # Contains state to create the layer offscreen. ##
+# SaveLayerRec # Contains state to create Layer. ##
#Table ##
#Subtopic ##
@@ -110,7 +110,7 @@ when no Surface is required, and some helpers implicitly create Raster_Surface.
# drawLine # Draws line segment between two points.##
# drawOval # Draws Oval using Clip, Matrix, and Paint. ##
# drawPaint # Fills Clip with Paint. ##
-# drawPatch # Draws cubic Coons patch. ##
+# drawPatch # Draws Coons patch. ##
# drawPath # Draws Path using Clip, Matrix, and Paint. ##
# drawPicture # Draws Picture using Clip and Matrix. ##
# drawPoint # Draws point at (x, y) position. ##
@@ -129,7 +129,7 @@ when no Surface is required, and some helpers implicitly create Raster_Surface.
# drawString # Draws null terminated string at (x, y) using font advance. ##
# drawVertices # Draws Vertices, a triangle mesh. ##
# flush() # Triggers execution of all pending draw operations. ##
-# getBaseLayerSize # Gets size of base layer in global coordinates. ##
+# getBaseLayerSize # Gets size of base Layer in global coordinates. ##
# getDeviceClipBounds # Returns IRect bounds of Clip. ##
# getDrawFilter # Legacy; to be deprecated. ##
# getGrContext # Returns GPU_Context of the GPU_Surface. ##
@@ -152,9 +152,9 @@ when no Surface is required, and some helpers implicitly create Raster_Surface.
# restoreToCount # Restores changes to Clip and Matrix to given depth. ##
# rotate() # Rotates Matrix. ##
# save() # Saves Clip and Matrix on stack. ##
-# saveLayer # Saves Clip and Matrix on stack; creates offscreen. ##
-# saveLayerAlpha # Saves Clip and Matrix on stack; creates offscreen; sets opacity. ##
-# saveLayerPreserveLCDTextRequests # Saves Clip and Matrix on stack; creates offscreen for LCD text. ##
+# saveLayer # Saves Clip and Matrix on stack; creates Layer. ##
+# saveLayerAlpha # Saves Clip and Matrix on stack; creates Layer; sets opacity. ##
+# saveLayerPreserveLCDTextRequests # Saves Clip and Matrix on stack; creates Layer for LCD text. ##
# scale() # Scales Matrix. ##
# setAllowSimplifyClip # Experimental. ##
# setDrawFilter # Legacy; to be deprecated. ##
@@ -204,7 +204,7 @@ Pixel buffer size should be info height times computed rowBytes.
in the center.
##
void draw(SkCanvas* ) {
- SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, premultipled
+ SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, Premultiplied
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
@@ -212,9 +212,9 @@ void draw(SkCanvas* ) {
// 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->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
+ 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
@@ -254,7 +254,7 @@ width and height are zero or positive;
pixels is not nullptr;
rowBytes is zero or large enough to contain width pixels of kN32_SkColorType.
-Pass zero for rowBytes to compute rowBytes from fo width and size of pixel.
+Pass zero for rowBytes to compute rowBytes from width and size of pixel.
If rowBytes is greater than zero, it must be equal to or greater than
width times bytes required for Image_Color_Type.
@@ -278,7 +278,7 @@ Pixel buffer size should be height times rowBytes.
void draw(SkCanvas* ) {
const int width = 3;
const int height = 3;
- SkPMColor pixels[height][width]; // allocate a 3x3 premultiplied bitmap on the stack
+ SkPMColor pixels[height][width]; // allocate a 3x3 Premultiplied bitmap on the stack
// create a SkCanvas backed by a raster device, and delete it when the
// function goes out of scope.
std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirectN32(
@@ -286,9 +286,9 @@ void draw(SkCanvas* ) {
height,
pixels[0], // top left of the bitmap
sizeof(pixels[0])); // byte width of the each row
- // write a pre-multiplied value for white into all pixels in the bitmap
+ // write a premultiplied value for white into all pixels in the bitmap
canvas->clear(SK_ColorWHITE);
- SkPMColor pmWhite = pixels[0][0]; // the premultiplied format may vary
+ SkPMColor pmWhite = pixels[0][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 pixels is ready to be read
@@ -367,7 +367,7 @@ void draw(SkCanvas* canvas) {
#Method SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr)
Creates Canvas of the specified dimensions without a Surface.
-Used by subclasses with custom implementations for draw methods.
+Used by Subclasses with custom implementations for draw methods.
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
@@ -448,13 +448,13 @@ The actual output depends on the installed fonts.
// create a bitmap 5 wide and 11 high
bitmap.allocPixels(SkImageInfo::MakeN32Premul(5, 11));
SkCanvas canvas(bitmap);
- canvas.clear(SK_ColorWHITE); // white is unpremultiplied, in ARGB order
+ canvas.clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order
SkPixmap pixmap; // provides guaranteed access to the drawn pixels
if (!canvas.peekPixels(&pixmap)) {
SkDebugf("peekPixels should never fail.\n");
}
const SkPMColor* pixels = pixmap.addr32(); // points to top left of bitmap
- SkPMColor pmWhite = pixels[0]; // the premultiplied format may vary
+ SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary
SkPaint paint; // by default, draws black, 12 point text
canvas.drawString("!", 1, 10, paint); // 1 char at baseline (1, 10)
for (int y = 0; y < bitmap.height(); ++y) {
@@ -540,13 +540,13 @@ The actual output depends on the installed fonts.
// create a bitmap 5 wide and 11 high
bitmap.allocPixels(SkImageInfo::MakeN32Premul(5, 11));
SkCanvas canvas(bitmap, SkSurfaceProps(0, kUnknown_SkPixelGeometry));
- canvas.clear(SK_ColorWHITE); // white is unpremultiplied, in ARGB order
+ canvas.clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order
SkPixmap pixmap; // provides guaranteed access to the drawn pixels
if (!canvas.peekPixels(&pixmap)) {
SkDebugf("peekPixels should never fail.\n");
}
const SkPMColor* pixels = pixmap.addr32(); // points to top left of bitmap
- SkPMColor pmWhite = pixels[0]; // the premultiplied format may vary
+ SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary
SkPaint paint; // by default, draws black, 12 point text
canvas.drawString("!", 1, 10, paint); // 1 char at baseline (1, 10)
for (int y = 0; y < bitmap.height(); ++y) {
@@ -579,14 +579,14 @@ The actual output depends on the installed fonts.
#Method virtual ~SkCanvas()
-Draw saved layers, if any.
+Draw saved Layers, if any.
Free up resources used by Canvas.
#Example
#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
+Canvas Layer draws into bitmap. saveLayerAlpha sets up an additional
+drawing surface that blends with the bitmap. When Layer goes out of
+scope, Layer Destructor is called. The saved Layer is restored, drawing
transparent letters.
##
void draw(SkCanvas* canvas) {
@@ -717,11 +717,11 @@ If Canvas is associated with GPU_Surface, resolves all pending GPU operations.
#Method virtual SkISize getBaseLayerSize() const
-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
+Gets the size of the base or root Layer in global canvas coordinates. The
+origin of the base Layer is always (0,0). The area available for drawing 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;
@@ -814,7 +814,7 @@ If pixels are inaccessible, info, rowBytes, and origin are unchanged.
#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;
+#Param origin storage for Canvas top Layer origin, its top left corner;
may be nullptr
##
@@ -832,11 +832,11 @@ void draw(SkCanvas* canvas) {
#Example
#Description
-Draws "ABC" on the device. Then draws "DEF" in an offscreen layer, and reads the
-offscreen to add a large dotted "DEF". Finally blends the offscreen with the
+Draws "ABC" on the device. Then draws "DEF" in Layer, and reads
+Layer to add a large dotted "DEF". Finally blends Layer with the
device.
-The offscreen and blended result appear on the CPU and GPU but the large dotted
+The Layer and blended result appear on the CPU and GPU but the large dotted
"DEF" appear only on the CPU.
##
void draw(SkCanvas* canvas) {
@@ -888,11 +888,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 generated by
+by the host platform's user interface. The custom context returned is 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 allocation ##
#Example
#Description
@@ -979,9 +979,14 @@ Canvas or Surface call may invalidate the pixmap values.
Copies rectangle of pixels from Canvas into dstPixels. Matrix and Clip are
ignored. Source rectangle corners are (srcX, srcY) and
-(this->imageInfo.width(), this->imageInfo.height()).
-Destination rectangle corners are (0, 0) and (dstInfo.width(), dstInfo.height()).
-Copies each readable pixel intersecting both rectangles, without scaling,
+#Formula
+(this->imageInfo.width(), this->imageInfo.height())
+##
+. Destination rectangle corners are (0, 0) and
+#Formula
+(dstInfo.width(), dstInfo.height())
+##
+. Copies each readable pixel intersecting both rectangles, without scaling,
converting to dstInfo.colorType() and dstInfo.alphaType() if required.
Pixels are readable when Device is raster, or backed by a GPU.
@@ -1020,7 +1025,7 @@ Does not copy, and returns false if:
#Description
A black circle drawn on a blue background provides an image to copy.
readPixels copies one quarter of the canvas into each of the four corners.
- The offscreen draws over the image.
+ The Layer draws over the image.
##
canvas->clear(SK_ColorBLUE);
SkPaint paint;
@@ -1039,11 +1044,11 @@ Does not copy, and returns false if:
#Example
#Description
- Canvas returned by Raster_Surface has premultiplied pixel values.
- clear() takes unpremultiplied input with Color_Alpha equal 0x80
- and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multipled by Color_Alpha
- to generate premultipled value 0x802B5580. readPixels converts pixel back
- to unpremultipled value 0x8056A9FF, introducing error.
+ Canvas returned by Raster_Surface has Premultiplied pixel values.
+ clear() takes Unpremultiplied input with Color_Alpha equal 0x80
+ and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multiplied by Color_Alpha
+ to generate Premultiplied value 0x802B5580. readPixels converts pixel back
+ to Unpremultiplied value 0x8056A9FF, introducing error.
##
canvas->clear(0x8055aaff);
for (SkAlphaType alphaType : { kPremul_SkAlphaType, kUnpremul_SkAlphaType } ) {
@@ -1070,9 +1075,14 @@ Does not copy, and returns false if:
Copies rectangle of pixels from Canvas into pixmap. Matrix and Clip are
ignored. Source rectangle corners are (srcX, srcY) and
-(this->imageInfo.width(), this->imageInfo.height()).
-Destination rectangle are (0, 0) and (pixmap.width(), pixmap.height()).
-Copies each readable pixel intersecting both rectangles, without scaling,
+#Formula
+(this->imageInfo.width(), this->imageInfo.height())
+##
+. Destination rectangle are (0, 0) and
+#Formula
+(pixmap.width(), pixmap.height())
+##
+. Copies each readable pixel intersecting both rectangles, without scaling,
converting to pixmap.colorType() and pixmap.alphaType() if required.
Pixels are readable when Device is raster, or backed by a GPU.
@@ -1106,9 +1116,9 @@ Does not copy, and returns false if:
#Example
#Description
- clear() takes unpremultiplied input with Color_Alpha equal 0x80
- and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multipled by Color_Alpha
- to generate premultipled value 0x802B5580.
+ clear() takes Unpremultiplied input with Color_Alpha equal 0x80
+ and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multiplied by Color_Alpha
+ to generate Premultiplied value 0x802B5580.
##
void draw(SkCanvas* canvas) {
canvas->clear(0x8055aaff);
@@ -1132,8 +1142,10 @@ Does not copy, and returns false if:
Copies rectangle of pixels from Canvas into bitmap. Matrix and Clip are
ignored. Source rectangle corners are (srcX, srcY) and
-(this->imageInfo.width(), this->imageInfo.height()).
-Destination rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
+#Formula
+(this->imageInfo.width(), this->imageInfo.height())
+##
+. Destination rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
Copies each readable pixel intersecting both rectangles, without scaling,
converting to bitmap.colorType() and bitmap.alphaType() if required.
@@ -1168,9 +1180,9 @@ Does not copy, and returns false if:
#Example
#Description
- clear() takes unpremultiplied input with Color_Alpha equal 0x80
- and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multipled by Color_Alpha
- to generate premultipled value 0x802B5580.
+ clear() takes Unpremultiplied input with Color_Alpha equal 0x80
+ and Color_RGB equal 0x55, 0xAA, 0xFF. Color_RGB is multiplied by Color_Alpha
+ to generate Premultiplied value 0x802B5580.
##
void draw(SkCanvas* canvas) {
canvas->clear(0x8055aaff);
@@ -1195,9 +1207,19 @@ void draw(SkCanvas* canvas) {
Copies rectangle from pixels to Canvas. Matrix and Clip are ignored.
Source rectangle corners are (0, 0) and (info.width(), info.height()).
Destination rectangle corners are (x, y) and
-(this->imageInfo.width(), this->imageInfo.height()). Copies each readable pixel
+#Formula
+(this->imageInfo.width(), this->imageInfo.height())
+##
+. Copies each readable pixel
intersecting both rectangles, without scaling, converting to
-this->imageInfo.colorType() and this->imageInfo.alphaType() if required.
+#Formula
+this->imageInfo.colorType()
+##
+and
+#Formula
+this->imageInfo.alphaType()
+##
+if required.
Pixels are writable when Device is raster, or backed by a GPU.
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
@@ -1215,7 +1237,15 @@ Does not copy, and returns false if:
#List
# Source and destination rectangles do not intersect. ##
-# pixels could not be converted to this->imageInfo.colorType() or this->imageInfo.alphaType(). ##
+# pixels could not be converted to
+#Formula
+this->imageInfo.colorType()
+##
+or
+#Formula
+this->imageInfo.alphaType()
+##
+. ##
# Canvas pixels are not writable; for instance, Canvas is document-based. ##
# rowBytes is too small to contain one row of pixels. ##
##
@@ -1248,11 +1278,25 @@ Does not copy, and returns false if:
#Method bool writePixels(const SkBitmap& bitmap, int x, int y)
Copies rectangle from pixels to Canvas. Matrix and Clip are ignored.
-Source rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
+Source rectangle corners are (0, 0) and
+#Formula
+(bitmap.width(), bitmap.height())
+##
+.
Destination rectangle corners are (x, y) and
-(this->imageInfo.width(), this->imageInfo.height()). Copies each readable pixel
+#Formula
+(this->imageInfo.width(), this->imageInfo.height())
+##
+. Copies each readable pixel
intersecting both rectangles, without scaling, converting to
-this->imageInfo.colorType() and this->imageInfo.alphaType() if required.
+#Formula
+this->imageInfo.colorType()
+##
+and
+#Formula
+this->imageInfo.alphaType()
+##
+if required.
Pixels are writable when Device is raster, or backed by a GPU.
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
@@ -1271,8 +1315,16 @@ Does not copy, and returns false if:
#List
# Source and destination rectangles do not intersect. ##
# bitmap does not have allocated pixels. ##
-# bitmap pixels could not be converted to this->imageInfo.colorType() or this->imageInfo.alphaType(). ##
-# Canvas pixels are not writable; for instance, Canvas is document-based. ##
+# bitmap pixels could not be converted to
+#Formula
+this->imageInfo.colorType()
+##
+or
+#Formula
+this->imageInfo.alphaType()
+##
+. ##
+# Canvas pixels are not writable; for instance, Canvas is document based. ##
# bitmap pixels are inaccessible; for instance, bitmap wraps a texture. ##
##
@@ -1417,30 +1469,112 @@ void draw(SkCanvas* canvas) {
##
# ------------------------------------------------------------------------------
-#Subtopic Layer
-Layer allocates a temporary offscreen Bitmap to draw into. When the drawing is
+#Method void restore()
+
+Removes changes to Matrix, Clip, and Draw_Filter since Canvas state was
+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());
+}
+##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int getSaveCount() const
+
+Returns the number of saved states, each containing: Matrix, Clip, and Draw_Filter.
+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 ##
+
+#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());
+}
+#StdOut
+depth = 1
+depth = 2
+depth = 1
+##
+##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void restoreToCount(int 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 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());
+}
+#StdOut
+depth = 1
+depth = 3
+depth = 1
+##
+##
+
+##
+
+#Topic State_Stack ##
+
+# ------------------------------------------------------------------------------
+
+#Topic Layer
+#Alias Layers
+
+Layer allocates a temporary 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.
+is restored, the Bitmap is drawn into the previous Layer.
-Layer may be initialized with the contents of the previous layer. When Layer is
+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.
#Method int saveLayer(const SkRect* bounds, const SkPaint* paint)
Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
-and allocates an offscreen Bitmap for subsequent drawing.
+and allocates a Bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
-and draws the offscreen bitmap.
+and draws the Bitmap.
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
+Rect bounds suggests but does not define the Bitmap size. To clip drawing to
a specific rectangle, use clipRect.
Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
@@ -1448,14 +1582,14 @@ Blend_Mode when restore() is called.
Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds hint to limit the size of the offscreen; may be nullptr ##
-#Param paint graphics state for offscreen; may be nullptr ##
+#Param bounds hint to limit the size of the Layer; may be nullptr ##
+#Param paint graphics state for Layer; may be nullptr ##
#Return depth of saved stack ##
#Example
#Description
-Rectangles are blurred by Image_Filter when restore() draws offscreen to main
+Rectangles are blurred by Image_Filter when restore() draws Layer to main
Canvas.
##
#Height 128
@@ -1479,15 +1613,15 @@ void draw(SkCanvas* canvas) {
#Method int saveLayer(const SkRect& bounds, const SkPaint* paint)
Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
-and allocates an offscreen Bitmap for subsequent drawing.
+and allocates a Bitmap for subsequent drawing.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
-and draws the offscreen Bitmap.
+and draws the Bitmap.
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
+Rect bounds suggests but does not define the Layer size. To clip drawing to
a specific rectangle, use clipRect.
Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
@@ -1495,16 +1629,16 @@ Blend_Mode when restore() is called.
Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds hint to limit the size of the offscreen; may be nullptr ##
-#Param paint graphics state for offscreen; may be nullptr ##
+#Param bounds hint to limit the size of Layer; may be nullptr ##
+#Param paint graphics state for Layer; may be nullptr ##
#Return depth of saved stack ##
#Example
#Description
-Rectangles are blurred by Image_Filter when restore() draws offscreen to main Canvas.
-The red rectangle is clipped; it does not fully fit on the offscreen Canvas.
-Image_Filter blurs past edge of offscreen so red rectangle is blurred on all sides.
+Rectangles are blurred by Image_Filter when restore() draws Layer to main Canvas.
+The red rectangle is clipped; it does not fully fit on Layer.
+Image_Filter blurs past edge of Layer so red rectangle is blurred on all sides.
##
#Height 128
void draw(SkCanvas* canvas) {
@@ -1527,17 +1661,17 @@ void draw(SkCanvas* canvas) {
#Method int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* paint)
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.
+and allocates a Bitmap for subsequent drawing.
+LCD_Text is preserved when the Layer is drawn to the prior Layer.
Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
-and draws the offscreen bitmap.
+and draws Layer.
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
+Rect bounds suggests but does not define the Layer size. To clip drawing to
a specific rectangle, use clipRect.
Optional Paint paint applies Color_Alpha, Color_Filter, Image_Filter, and
@@ -1546,11 +1680,11 @@ Blend_Mode when restore() is called.
Call restoreToCount with returned value 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
+prior Layer. LCD_Text drawn on a background with transparency may result in
incorrect banding.
-#Param bounds hint to limit the size of the offscreen; may be nullptr ##
-#Param paint graphics state for offscreen; may be nullptr ##
+#Param bounds hint to limit the size of Layer; may be nullptr ##
+#Param paint graphics state for Layer; may be nullptr ##
#Return depth of saved stack ##
@@ -1584,24 +1718,24 @@ incorrect banding.
#Method int saveLayerAlpha(const SkRect* bounds, U8CPU alpha)
Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
-and allocates an offscreen bitmap for subsequent drawing.
+and allocates 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.
+and blends Layer with alpha opacity onto prior Layer.
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
+Rect bounds suggests but does not define Layer size. To clip drawing to
a specific rectangle, use clipRect.
alpha of zero is fully transparent, 255 is fully opaque.
Call restoreToCount with returned value to restore this and subsequent saves.
-#Param bounds hint to limit the size of the offscreen; may be nullptr ##
-#Param alpha opacity of the offscreen ##
+#Param bounds hint to limit the size of Layer; may be nullptr ##
+#Param alpha opacity of Layer ##
#Return depth of saved stack ##
@@ -1636,20 +1770,20 @@ Call restoreToCount with returned value to restore this and subsequent saves.
##
SaveLayerFlags provides options that may be used in any combination in SaveLayerRec,
-defining how the offscreen allocated by saveLayer operates.
+defining how Layer allocated by saveLayer operates.
#Const kIsOpaque_SaveLayerFlag 1
- Creates offscreen without transparency. Flag is ignored if layer Paint contains
+ Creates Layer without transparency. Flag is ignored if Layer Paint contains
Image_Filter or Color_Filter.
##
#Const kPreserveLCDText_SaveLayerFlag 2
- Creates offscreen for LCD text. Flag is ignored if layer Paint contains
+ Creates Layer for LCD text. Flag is ignored if Layer Paint contains
Image_Filter or Color_Filter.
##
#Const kInitWithPrevious_SaveLayerFlag 4
- Initializes offscreen with the contents of the previous layer.
+ Initializes Layer with the contents of the previous Layer.
##
#Const kDontClipToLayer_Legacy_SaveLayerFlag 0x80000000
@@ -1657,14 +1791,14 @@ defining how the offscreen allocated by saveLayer operates.
to be deprecated: bug.skia.org/2440
##
Only present on Android.
- Skips setting a clip to the layer bounds.
+ 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.
+Canvas Layer captures red and blue circles scaled up by four.
+scalePaint blends Layer back with transparency.
##
void draw(SkCanvas* canvas) {
SkPaint redPaint, bluePaint, scalePaint;
@@ -1701,48 +1835,48 @@ void draw(SkCanvas* canvas) {
};
##
-SaveLayerRec contains the state used to create the layer offscreen.
+SaveLayerRec contains the state used to create the Layer.
#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
+ fBounds is used as a hint to limit the size of Layer; may be nullptr.
+ fBounds suggests but does not define Layer 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.
+ fPaint modifies how Layer overlays the prior Layer; may be nullptr.
Color_Alpha, Blend_Mode, Color_Filter, Draw_Looper, Image_Filter, and
- Mask_Filter affect the offscreen draw.
+ Mask_Filter affect Layer 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 an Image_Filter.
+ fBackdrop applies Image_Filter to the prior Layer when copying to the Layer;
+ may be nullptr. Use kInitWithPrevious_SaveLayerFlag to copy the
+ prior Layer without an Image_Filter.
##
#Member const SkImage* fClipMask
- restore() clips the layer offscreen by the alpha channel of fClipMask when
- the offscreen is copied to Device. fClipMask may be nullptr. .
+ restore() clips Layer by the Color_Alpha channel of fClipMask when
+ Layer is copied to Device. fClipMask may be nullptr. .
##
#Member const SkMatrix* fClipMatrix
- fClipMatrix transforms fClipMask before it clips the layer offscreen. If
+ fClipMatrix transforms fClipMask before it clips Layer. 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 without transparency,
+ create Layer for LCD text, and to create Layer 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
+Canvas Layer captures a red Anti-aliased circle and a blue Aliased circle scaled
+up by four. After drawing another red circle without scaling on top, the Layer is
transferred to the main canvas.
##
void draw(SkCanvas* canvas) {
@@ -1787,9 +1921,9 @@ 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 Layer dimensions; may be nullptr ##
+#Param paint applied to Layer when overlaying prior Layer; may be nullptr ##
+#Param saveLayerFlags SaveLayerRec options to modify Layer ##
#Return SaveLayerRec with empty backdrop ##
@@ -1812,14 +1946,13 @@ 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;
+#Param bounds Layer dimensions; may be nullptr ##
+#Param paint applied to Layer when overlaying prior Layer;
may be nullptr
##
-#Param backdrop prior layer copied to offscreen with Image_Filter;
- may be nullptr
+#Param backdrop prior Layer copied with Image_Filter; may be nullptr
##
-#Param saveLayerFlags SaveLayerRec options to modify offscreen ##
+#Param saveLayerFlags SaveLayerRec options to modify Layer ##
#Return SaveLayerRec fully specified ##
@@ -1846,23 +1979,23 @@ Not ready for general use.
##
Sets fBounds, fPaint, fBackdrop, fClipMask, fClipMatrix, and fSaveLayerFlags.
-clipMatrix uses alpha channel of image, transformed by clipMatrix, to clip layer
-when drawn to Canvas.
+clipMatrix uses Color_Alpha channel of image, transformed by clipMatrix, to clip
+Layer when drawn to Canvas.
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 bounds Layer dimensions; may be nullptr ##
+#Param paint graphics state applied to Layer when overlaying prior
+ Layer; may be nullptr
##
-#Param backdrop prior layer copied to offscreen with Image_Filter;
+#Param backdrop prior Layer copied with Image_Filter;
may be nullptr
##
-#Param clipMask clip applied to layer; 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 ##
+#Param saveLayerFlags SaveLayerRec options to modify Layer ##
#Return SaveLayerRec fully specified ##
@@ -1875,28 +2008,28 @@ Implementation is incomplete; has no effect if Device is GPU-backed.
#Method int saveLayer(const SaveLayerRec& layerRec)
Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
-and allocates an offscreen bitmap for subsequent drawing.
+and allocates 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.
+and blends Bitmap with Color_Alpha opacity onto the prior Layer.
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.
+SaveLayerRec contains the state used to create the Layer.
Call restoreToCount with returned value to restore this and subsequent saves.
-#Param layerRec offscreen state ##
+#Param layerRec Layer state ##
#Return depth of save state stack ##
#Example
#Description
-The example draws an image, and saves it into a layer with kInitWithPrevious_SaveLayerFlag.
-Next it punches a hole in the layer and restore with SkBlendMode::kPlus.
-Where the layer was cleared, the original image will draw unchanged.
+The example draws an image, and saves it into a Layer with kInitWithPrevious_SaveLayerFlag.
+Next it punches a hole in Layer and restore with SkBlendMode::kPlus.
+Where Layer was cleared, the original image will draw unchanged.
Outside of the circle the mandrill is brightened.
##
#Image 3
@@ -1917,87 +2050,7 @@ Outside of the circle the mandrill is brightened.
##
-#Subtopic Layer ##
-
-# ------------------------------------------------------------------------------
-
-#Method void restore()
-
-Removes changes to Matrix, Clip, and Draw_Filter since Canvas state was
-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());
-}
-##
-
-##
-
-# ------------------------------------------------------------------------------
-
-#Method int getSaveCount() const
-
-Returns the number of saved states, each containing: Matrix, Clip, and Draw_Filter.
-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 ##
-
-#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());
-}
-#StdOut
-depth = 1
-depth = 2
-depth = 1
-##
-##
-
-##
-
-# ------------------------------------------------------------------------------
-
-#Method void restoreToCount(int 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 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());
-}
-#StdOut
-depth = 1
-depth = 3
-depth = 1
-##
-##
-
-##
-
-#Topic State_Stack ##
+#Topic Layer ##
# ------------------------------------------------------------------------------
#Topic Matrix
@@ -2007,7 +2060,7 @@ depth = 1
Translate Matrix by dx along the x-axis and dy along the y-axis.
Mathematically, replace Matrix with a translation matrix
-pre-multiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of moving the drawing by (dx, dy) before transforming
the result with Matrix.
@@ -2057,7 +2110,7 @@ void draw(SkCanvas* canvas) {
Scale Matrix by sx on the x-axis and sy on the y-axis.
Mathematically, replace Matrix with a scale matrix
-pre-multiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of scaling the drawing by (sx, sy) before transforming
the result with Matrix.
@@ -2089,7 +2142,7 @@ void draw(SkCanvas* canvas) {
Rotate Matrix by degrees. Positive degrees rotates clockwise.
Mathematically, replace Matrix with a rotation matrix
-pre-multiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of rotating the drawing by degrees before transforming
the result with Matrix.
@@ -2126,9 +2179,9 @@ void draw(SkCanvas* canvas) {
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
+Mathematically, construct a rotation matrix. Premultiply the rotation matrix by
a translation matrix, then replace Matrix with the resulting matrix
-pre-multiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of rotating the drawing about a given point before
transforming the result with Matrix.
@@ -2160,7 +2213,7 @@ 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.
+Mathematically, replace Matrix with a skew matrix Premultiplied with Matrix.
This has the effect of skewing the drawing by (sx, sy) before transforming
the result with Matrix.
@@ -2201,12 +2254,12 @@ the result with Matrix.
#Method void concat(const SkMatrix& matrix)
-Replace Matrix with matrix pre-multiplied with existing Matrix.
+Replace Matrix with matrix Premultiplied with existing Matrix.
This has the effect of transforming the drawn geometry by matrix, before
transforming the result with existing Matrix.
-#Param matrix matrix to pre-multiply with existing Matrix ##
+#Param matrix matrix to Premultiply with existing Matrix ##
#Example
void draw(SkCanvas* canvas) {
@@ -2315,14 +2368,14 @@ prior Clip to form the replacement Clip. Use SkClipOp::kDifference
to subtract Path from Clip; use SkClipOp::kIntersect to intersect Path
with Clip.
-A clipping Path may be anti-aliased; if Path, after transformation, is
+A clipping Path may be Anti-aliased; if Path, after transformation, is
composed of horizontal and vertical lines, clearing Anti-alias allows whole pixels
-to either be inside or outside the clip. The fastest drawing has a aliased,
-rectanglar clip.
+to either be inside or outside the clip. The fastest drawing has a Aliased,
+rectangular clip.
If clipping Path has Anti-alias set, clip may partially clip a pixel, requiring
that drawing blend partially with the destination along the edge. A rotated
-rectangular anti-aliased clip looks smoother but draws slower.
+rectangular Anti-aliased clip looks smoother but draws slower.
Clip can combine with Rect and Round_Rect primitives; like
Path, these are transformed by Matrix before they are combined with Clip.
@@ -2333,10 +2386,10 @@ and is unaffected by Matrix.
#Example
#Height 90
#Description
- Draw a red circle with an aliased clip and an anti-aliased clip.
+ Draw a red circle with an Aliased clip and an Anti-aliased clip.
Use an image filter to zoom into the pixels drawn.
- 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.
+ 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);
@@ -2363,12 +2416,12 @@ and is unaffected by Matrix.
#Method void clipRect(const SkRect& rect, SkClipOp op, bool doAntiAlias)
Replace Clip with the intersection or difference of Clip and rect,
-with an aliased or anti-aliased clip edge. rect is transformed by Matrix
+with an Aliased or Anti-aliased clip edge. rect is transformed by Matrix
before it is combined with Clip.
#Param rect Rect to combine with Clip ##
#Param op Clip_Op to apply to Clip ##
-#Param doAntiAlias true if Clip is to be anti-aliased ##
+#Param doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Height 128
@@ -2393,7 +2446,7 @@ void draw(SkCanvas* canvas) {
#Method void clipRect(const SkRect& rect, SkClipOp op)
Replace Clip with the intersection or difference of Clip and rect.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+Resulting Clip is Aliased; pixels are fully contained by the clip.
rect is transformed by Matrix before it is combined with Clip.
#Param rect Rect to combine with Clip ##
@@ -2421,18 +2474,18 @@ void draw(SkCanvas* canvas) {
#Method void clipRect(const SkRect& rect, bool doAntiAlias = false)
Replace Clip with the intersection of Clip and rect.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+Resulting Clip is Aliased; pixels are fully contained by the clip.
rect is transformed by Matrix
before it is combined with Clip.
#Param rect Rect to combine with Clip ##
-#Param doAntiAlias true if Clip is to be anti-aliased ##
+#Param doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Height 133
#Description
- A circle drawn in pieces looks uniform when drawn aliased.
- The same circle pieces blend with pixels more than once when anti-aliased,
+ A circle drawn in pieces looks uniform when drawn Aliased.
+ 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) {
@@ -2461,12 +2514,12 @@ void draw(SkCanvas* canvas) {
#Method void androidFramework_setDeviceClipRestriction(const SkIRect& rect)
-Sets the max clip rectangle, which can be set by clipRect, clipRRect and
+Sets the maximum clip rectangle, which can be set by clipRect, clipRRect and
clipPath and intersect the current clip with the specified rect.
-The max clip affects only future ops (it is not retroactive).
+The maximum clip affects only future clipping operations; it is not retroactive.
The clip restriction is not recorded in pictures.
-Pass an empty rect to disable max clip.
+Pass an empty rect to disable maximum clip.
#Private
This is private API to be used only by Android framework.
@@ -2480,13 +2533,13 @@ This is private API to be used only by Android framework.
#Method void clipRRect(const SkRRect& rrect, SkClipOp op, bool doAntiAlias)
Replace Clip with the intersection or difference of Clip and rrect,
-with an aliased or anti-aliased clip edge.
+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 doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Height 128
@@ -2509,7 +2562,7 @@ void draw(SkCanvas* canvas) {
#Method void clipRRect(const SkRRect& rrect, SkClipOp op)
Replace Clip with the intersection or difference of Clip and rrect.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+Resulting Clip is Aliased; pixels are fully contained by the clip.
rrect is transformed by Matrix before it is combined with Clip.
#Param rrect Round_Rect to combine with Clip ##
@@ -2533,11 +2586,11 @@ void draw(SkCanvas* canvas) {
#Method void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
Replace Clip with the intersection of Clip and rrect,
-with an aliased or anti-aliased clip edge.
+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 doAntiAlias true if Clip is to be antialiased ##
+#Param doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Height 128
@@ -2557,14 +2610,14 @@ void draw(SkCanvas* canvas) {
#Method void clipPath(const SkPath& path, SkClipOp op, bool doAntiAlias)
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
+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.
#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 doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Description
@@ -2598,7 +2651,7 @@ void draw(SkCanvas* canvas) {
#Method void clipPath(const SkPath& path, SkClipOp op)
Replace Clip with the intersection or difference of Clip and path.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+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.
@@ -2639,14 +2692,14 @@ void draw(SkCanvas* canvas) {
#Method void clipPath(const SkPath& path, bool doAntiAlias = false)
Replace Clip with the intersection of Clip and path.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+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.
#Param path Path to combine with Clip ##
-#Param doAntiAlias true if Clip is to be antialiased ##
+#Param doAntiAlias true if Clip is to be Anti-aliased ##
#Example
#Height 212
@@ -2686,7 +2739,7 @@ void draw(SkCanvas* canvas) {
Only used for testing.
##
-Set to simplify clip stack using path ops.
+Set to simplify clip stack using PathOps.
##
@@ -2695,7 +2748,7 @@ Set to simplify clip stack using path ops.
#Method void clipRegion(const SkRegion& deviceRgn, SkClipOp op = SkClipOp::kIntersect)
Replace Clip with the intersection or difference of Clip and Region deviceRgn.
-Resulting Clip is aliased; pixels are fully contained by the clip.
+Resulting Clip is Aliased; pixels are fully contained by the clip.
deviceRgn is unaffected by Matrix.
#Param deviceRgn Region to combine with Clip ##
@@ -2703,8 +2756,8 @@ deviceRgn is unaffected by Matrix.
#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
+ region is unaffected by canvas rotation; iRect is affected by canvas rotation.
+ Both clips are Aliased; this is not noticeable on Region clip because it
aligns to pixel boundaries.
##
void draw(SkCanvas* canvas) {
@@ -2802,7 +2855,7 @@ Return bounds of Clip, transformed by inverse of Matrix. If Clip is empty,
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.
+is Anti-aliased.
#Return bounds of Clip in local coordinates ##
@@ -2846,7 +2899,7 @@ Return bounds of Clip, transformed by inverse of Matrix. If Clip is empty,
return false, and set bounds to SkRect::MakeEmpty, where all Rect sides equal zero.
bounds is outset by one to account for partial pixel coverage if Clip
-is anti-aliased.
+is Anti-aliased.
#Param bounds Rect of Clip in local coordinates ##
@@ -3490,7 +3543,7 @@ void draw(SkCanvas* canvas) {
Draw Round_Rect outer and inner
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;
+In paint: Paint_Style determines if Round_Rect 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.
@@ -3569,7 +3622,7 @@ if stroked, Paint_Stroke_Width describes the line thickness.
#Method void drawCircle(SkPoint center, SkScalar radius, const SkPaint& paint)
-Draw Circle at (cx, cy) with radius using Clip, Matrix, and Paint paint.
+Draw Circle at center 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.
@@ -3673,8 +3726,8 @@ 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 rx axis length in x of oval describing rounded corners ##
+#Param ry axis length in y of oval describing rounded corners ##
#Param paint stroke, blend, color, and so on, used to draw ##
#Example
@@ -3861,22 +3914,22 @@ 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 source Rect,
+provided to drawImageRect, trading off speed for precision.
-Image_Filter in Paint may sample multiple pixels in the image. Rect src
+Image_Filter in Paint may sample multiple pixels in the image. Source Rect
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.
+it cannot read outside the bounds, when sampling near the edge of source Rect.
SrcRectConstraint specifies whether an Image_Filter is allowed to read pixels
-outside Rect src.
+outside source Rect.
#Const kStrict_SrcRectConstraint
- Requires Image_Filter to respect Rect src,
+ Requires Image_Filter to respect source Rect,
sampling only inside of its bounds, possibly with a performance penalty.
##
#Const kFast_SrcRectConstraint
- Permits Image_Filter to sample outside of Rect src
+ Permits Image_Filter to sample outside of source Rect
by half the width of Image_Filter, permitting it to run faster but with
error at the image edges.
##
@@ -3886,7 +3939,7 @@ outside Rect src.
#Description
redBorder contains a black and white checkerboard bordered by red.
redBorder is drawn scaled by 16 on the left.
- The middle and right bitmaps are filtered checkboards.
+ The middle and right bitmaps are filtered checkerboards.
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.
##
@@ -4002,7 +4055,7 @@ 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
+sample within isrc; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param image Image containing pixels, dimensions, and format ##
@@ -4011,7 +4064,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint filter strictly within src or draw faster ##
+#Param constraint filter strictly within isrc or draw faster ##
#Example
#Image 4
@@ -4045,7 +4098,7 @@ 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
+sample within image; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param image Image containing pixels, dimensions, and format ##
@@ -4053,7 +4106,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint filter strictly within src or draw faster ##
+#Param constraint filter strictly within image or draw faster ##
#Example
#Image 4
@@ -4143,7 +4196,7 @@ 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
+sample within image; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param image Image containing pixels, dimensions, and format ##
@@ -4152,7 +4205,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint filter strictly within src or draw faster ##
+#Param constraint filter strictly within image or draw faster ##
#Example
#Height 64
@@ -4193,7 +4246,7 @@ 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
+sample within image; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param image Image containing pixels, dimensions, and format ##
@@ -4201,7 +4254,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint filter strictly within src or draw faster ##
+#Param constraint filter strictly within image or draw faster ##
#Example
#Height 64
@@ -4233,7 +4286,7 @@ void draw(SkCanvas* canvas) {
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
+the center. Corners are unmodified 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.
@@ -4257,9 +4310,9 @@ replicates the image's edge color when it samples outside of its bounds.
#Height 128
#Description
The leftmost image is smaller than center; only corners are drawn, all scaled to fit.
- The second image equals the size of center; only corners are drawn, unscaled.
- 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.
+ The second image equals the size of center; only corners are drawn without scaling.
+ The remaining images are larger than center. All corners draw without scaling.
+ The sides and center are scaled if needed to take up the remaining space.
##
void draw(SkCanvas* canvas) {
SkIRect center = { 20, 10, 50, 40 };
@@ -4299,7 +4352,7 @@ void draw(SkCanvas* canvas) {
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
+the center. Corners are not scaled, 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.
@@ -4324,7 +4377,7 @@ replicates the image's edge color when it samples outside of its bounds.
#Description
The two leftmost images has four corners and sides to the left and right of center.
The leftmost image scales the width of corners proportionately to fit.
- The third and fourth image corners are unscaled; the sides and center are scaled to
+ The third and fourth image corners are not scaled; the sides and center are scaled to
fill the remaining space.
The rightmost image has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
@@ -4487,7 +4540,7 @@ 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
+sample within isrc; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
@@ -4496,7 +4549,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint sample strictly within src, or draw faster ##
+#Param constraint sample strictly within isrc, or draw faster ##
#Example
#Height 64
@@ -4532,7 +4585,7 @@ void draw(SkCanvas* canvas) {
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
Draw Bitmap bitmap, scaled and translated to fill Rect dst.
-isrc is on integer pixel boundaries; dst may include fractional boundaries.
+bitmap bounds 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,
@@ -4545,7 +4598,7 @@ 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
+sample within bitmap; set to kFast_SrcRectConstraint allows sampling outside to
improve performance.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
@@ -4553,7 +4606,7 @@ improve performance.
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
and so on; or nullptr
##
-#Param constraint filter strictly within src or draw faster ##
+#Param constraint filter strictly within bitmap or draw faster ##
#Example
#Height 64
@@ -4584,7 +4637,7 @@ void draw(SkCanvas* canvas) {
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
+and the center. Corners are not scaled, or scaled down proportionately if their
sides are larger than dst; center and four sides are scaled to fit remaining
space, if any.
@@ -4611,7 +4664,7 @@ outside of its bounds.
#Description
The two leftmost bitmap draws has four corners and sides to the left and right of center.
The leftmost bitmap draw scales the width of corners proportionately to fit.
- The third and fourth draw corners are unscaled; the sides and center are scaled to
+ The third and fourth draw corners are not scaled; the sides and center are scaled to
fill the remaining space.
The rightmost bitmap draw has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
@@ -4761,7 +4814,7 @@ outside of its bounds.
#Description
The two leftmost bitmap draws has four corners and sides to the left and right of center.
The leftmost bitmap draw scales the width of corners proportionately to fit.
- The third and fourth draw corners are unscaled; the sides are scaled to
+ The third and fourth draw corners are not scaled; the sides are scaled to
fill the remaining space; the center is transparent.
The rightmost bitmap draw has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.
@@ -4837,8 +4890,8 @@ outside of its bounds.
#Height 128
#Description
The leftmost image is smaller than center; only corners are drawn, all scaled to fit.
- The second image equals the size of center; only corners are drawn, unscaled.
- The remaining images are larger than center. All corners draw unscaled. The sides
+ The second image equals the size of center; only corners are drawn without scaling.
+ The remaining images are larger than center. All corners draw without scaling. The sides
are scaled if needed to take up the remaining space; the center is transparent.
##
void draw(SkCanvas* canvas) {
@@ -4897,9 +4950,9 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
-#Param text character code points or glyphs drawn ##
+#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 ##
@@ -4953,9 +5006,9 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
-#Param string character code points or glyphs drawn,
+#Param string character code points or Glyphs drawn,
ending with a char value of zero
##
#Param x start of string on x-axis ##
@@ -4986,9 +5039,9 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
-#Param string character code points or glyphs drawn,
+#Param string character code points or Glyphs drawn,
ending with a char value of zero
##
#Param x start of string on x-axis ##
@@ -5011,7 +5064,7 @@ filled 12 point black glyphs.
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
+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
@@ -5022,12 +5075,12 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
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 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 ##
@@ -5055,23 +5108,23 @@ void draw(SkCanvas* canvas) {
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.
+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;
+UTF-8. xpos 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.
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.
+filled 12 point black Glyphs.
Layout engines such as Harfbuzz typically position each glyph
-rather than using the font's advance widths if all glyphs share the same
+rather than using the font's advance widths if all Glyphs share the same
baseline.
-#Param text character code points or glyphs drawn ##
+#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 ##
@@ -5110,9 +5163,9 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
-#Param text character code points or glyphs drawn ##
+#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 ##
@@ -5158,12 +5211,12 @@ 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, draws
-filled 12 point black glyphs.
+filled 12 point black Glyphs.
-#Param text character code points or glyphs drawn ##
+#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
+#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 ##
@@ -5204,13 +5257,13 @@ 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.
+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.
+filled 12 point black Glyphs.
-#Param text character code points or glyphs drawn ##
+#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 ##
@@ -5248,7 +5301,7 @@ void draw(SkCanvas* canvas) {
Draw Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
-blob contains glyphs, their positions, and paint attributes specific to text:
+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,
@@ -5257,7 +5310,7 @@ 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 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 ##
@@ -5298,7 +5351,7 @@ Image_Filter, and Draw_Looper; apply to blob.
Draw Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
-blob contains glyphs, their positions, and paint attributes specific to text:
+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,
@@ -5307,7 +5360,7 @@ 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 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 ##
@@ -5553,7 +5606,7 @@ void draw(SkCanvas* canvas) {
#Method void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkBlendMode mode, const SkPaint& paint)
-Draw a cubic Coons patch: the interpolation of four cubics with shared corners,
+Draws a Coons patch: the interpolation of four cubics with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
@@ -5561,8 +5614,8 @@ 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
+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,
@@ -5573,7 +5626,7 @@ corners in top left, top right, bottom right, bottom left order.
#Param cubics Path_Cubic array, sharing common points ##
#Param colors Color array, one for each corner ##
-#Param texCoords Point array of texure coordinates, mapping Shader to corners;
+#Param texCoords Point array of texture coordinates, mapping Shader to corners;
may be nullptr
#Param ##
#Param mode Blend_Mode for colors, and for Shader if paint has one ##
@@ -5611,7 +5664,7 @@ void draw(SkCanvas* canvas) {
#Method void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], const SkPaint& paint)
-Draw a cubic Coons patch: the interpolation of four cubics with shared corners,
+Draws Cubic Coons patch: the interpolation of four cubics with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
@@ -5619,8 +5672,8 @@ 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
+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,
@@ -5631,7 +5684,7 @@ corners in top left, top right, bottom right, bottom left order.
#Param cubics Path_Cubic array, sharing common points ##
#Param colors Color array, one for each corner ##
-#Param texCoords Point array of texure coordinates, mapping Shader to corners;
+#Param texCoords Point array of texture coordinates, mapping Shader to corners;
may be nullptr
#Param ##
#Param paint Shader, Color_Filter, Blend_Mode, used to draw ##
@@ -5701,7 +5754,7 @@ atlas, and RSXform xform transforms it into destination space.
xform, text, and colors if present, must contain count entries.
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.
+If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
#Param xform RSXform mappings for sprites in atlas ##
@@ -5742,7 +5795,7 @@ 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.
+If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
#Param xform RSXform mappings for sprites in atlas ##
@@ -5782,7 +5835,7 @@ 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.
+If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
#Param xform RSXform mappings for sprites in atlas ##
@@ -5818,7 +5871,7 @@ 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.
+If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
#Param xform RSXform mappings for sprites in atlas ##