aboutsummaryrefslogtreecommitdiffhomepage
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
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>
-rw-r--r--docs/SkCanvas_Reference.bmh717
-rw-r--r--docs/SkPaint_Reference.bmh268
-rw-r--r--docs/SkPath_Reference.bmh143
-rw-r--r--docs/undocumented.bmh96
-rw-r--r--site/user/api/SkCanvas_Reference.md677
-rw-r--r--site/user/api/SkPaint_Reference.md282
-rw-r--r--site/user/api/SkPath_Reference.md135
-rw-r--r--site/user/api/undocumented.md32
-rw-r--r--site/user/api/usingBookmaker.md4
-rw-r--r--tools/bookmaker/bookmaker.cpp143
-rw-r--r--tools/bookmaker/bookmaker.h157
-rw-r--r--tools/bookmaker/includeParser.cpp26
-rw-r--r--tools/bookmaker/includeWriter.cpp50
-rw-r--r--tools/bookmaker/mdOut.cpp23
-rw-r--r--tools/bookmaker/spellCheck.cpp250
15 files changed, 1706 insertions, 1297 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 ##
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index e25a51c5f3..30007f185a 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -20,7 +20,7 @@ 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 how SkPaint::kAntiAlias_Flag
+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.
@@ -46,7 +46,7 @@ Shader attached to Paint.
# Anti-alias # Approximating coverage with transparency. ##
# Dither # Distributing color error. ##
# Device_Text # Increase precision of glyph position. ##
-# Font_Embedded_Bitmaps # Custom-sized bitmap glyphs. ##
+# Font_Embedded_Bitmaps # Custom sized bitmap Glyphs. ##
# Automatic_Hinting # Always adjust glyph paths. ##
# Vertical_Text # Orient text from top to bottom. ##
# Fake_Bold # Approximate font styles. ##
@@ -72,12 +72,12 @@ Shader attached to Paint.
# Text_Size # Overall height in points. ##
# Text_Scale_X # Text horizontal scale. ##
# Text_Skew_X # Text horizontal slant. ##
-# Text_Encoding # Text encoded as characters or glyphs. ##
+# Text_Encoding # Text encoded as characters or Glyphs. ##
# Font_Metrics # Common glyph dimensions. ##
# Measure_Text # Width, height, bounds of text. ##
-# Text_Path # Geometry of glyphs. ##
+# Text_Path # Geometry of Glyphs. ##
# Text_Intercepts # Advanced underline, strike through. ##
-# Fast_Bounds # Appproxiate area required by Paint. ##
+# Fast_Bounds # Approximate area required by Paint. ##
#Table ##
#Subtopic ##
@@ -139,12 +139,12 @@ Shader attached to Paint.
# canComputeFastBounds # Returns true if settings allow for fast bounds computation. ##
# computeFastBounds # Returns fill bounds for quick reject tests. ##
# computeFastStrokeBounds # Returns stroke bounds for quick reject tests. ##
-# containsText # Returns if all text corresponds to glyphs. ##
-# countText # Returns number of glyphs in text. ##
+# containsText # Returns if all text corresponds to Glyphs. ##
+# countText # Returns number of Glyphs in text. ##
# doComputeFastBounds # Returns bounds for quick reject tests. ##
# flatten() # Serializes into a buffer. ##
# getAlpha # Returns Color_Alpha, color opacity. ##
-# getBlendMode # Returns Blend_Mode, how colors combine with dest. ##
+# getBlendMode # Returns Blend_Mode, how colors combine with Device. ##
# getColor # Returns Color_Alpha and Color_RGB, one drawing color. ##
# getColorFilter # Returns Color_Filter, how colors are altered. ##
# getDrawLooper # Returns Draw_Looper, multiple layers. ##
@@ -179,9 +179,9 @@ Shader attached to Paint.
# getTextSize # Returns text size in points. ##
# getTextWidths # Returns advance and bounds for each glyph in text. ##
# getTypeface # Returns Typeface, font description. ##
-# glyphsToUnichars # Converts glyphs into text. ##
+# glyphsToUnichars # Converts Glyphs into text. ##
# isAntiAlias # Returns true if Anti-alias is set. ##
-# isAutohinted # Returns true if glyphs are always hinted. ##
+# isAutohinted # Returns true if Glyphs are always hinted. ##
# isDevKernText # Returns true if Full_Hinting_Spacing is set. ##
# isDither # Returns true if Dither is set. ##
# isEmbeddedBitmapText # Returns true if Font_Embedded_Bitmaps is set. ##
@@ -204,7 +204,7 @@ Shader attached to Paint.
# setAlpha # Sets Color_Alpha, color opacity. ##
# setAntiAlias # Sets or clears Anti-alias. ##
# setARGB # Sets color by component. ##
-# setAutohinted # Sets glyphs to always be hinted. ##
+# setAutohinted # Sets Glyphs to always be hinted. ##
# setBlendMode # Sets Blend_Mode, how colors combine with destination. ##
# setColor # Sets Color_Alpha and Color_RGB, one drawing color. ##
# setColorFilter # Sets Color_Filter, alters color. ##
@@ -236,7 +236,7 @@ Shader attached to Paint.
# setTypeface # Sets Typeface, font description. ##
# setVerticalText # Sets or clears Vertical_Text. ##
# textToGlyphs # Converts text into glyph indices. ##
-# toString # Converts Paint to machine parsable form (Developer_Mode) ##
+# toString # Converts Paint to machine readable form. ##
# unflatten() # Populates from a serialized stream. ##
#Table ##
#Subtopic ##
@@ -255,7 +255,7 @@ Constructs Paint with default values.
# attribute # default value ##
#Legend ##
# Anti-alias # false ##
-# Blend_Mode # SkBlendMode::kSrcOver ##
+# Blend_Mode # SkBlendMode::kSrcOver ##
# Color # SK_ColorBLACK ##
# Color_Alpha # 255 ##
# Color_Filter # nullptr ##
@@ -290,7 +290,7 @@ Constructs Paint with default values.
#Table ##
The flags, text size, hinting, and miter limit may be overridden at compile time by defining
-paint default values. The overrides may be included in SkUserConfig.h or predefined by the
+paint default values. The overrides may be included in "SkUserConfig.h" or predefined by the
build system.
#Return default initialized Paint ##
@@ -622,7 +622,7 @@ flatten() at an earlier time.
SkReadBuffer class is not public, so unflatten() cannot be meaningfully called
by the client.
-#Param buffer serialized data to unflatten ##
+#Param buffer serialized data describing Paint content ##
# why is unflatten() public?
#Bug 6172 ##
@@ -669,7 +669,7 @@ as the Font_Engine.
With FreeType, this is equivalent in spirit to the
FT_LOAD_TARGET_LIGHT value supplied to FT_Load_Glyph. It chooses a
lighter hinting algorithm for non-monochrome modes.
- Generated glyphs may be fuzzy but better resemble their original shape.
+ Generated Glyphs may be fuzzy but better resemble their original shape.
##
#Const kNormal_Hinting 2
Modifies glyph outlines to improve constrast. This is the default.
@@ -733,9 +733,9 @@ Set SkPaintDefaults_Hinting at compile time to change the default setting.
# Hinting # value # effect on generated glyph outlines ##
##
# kNo_Hinting # 0 # leaves glyph outlines unchanged from their native representation ##
- # kSlight_Hinting # 1 # modifies glyph outlines minimally to improve constrast ##
- # kNormal_Hinting # 2 # modifies glyph outlines to improve constrast ##
- # kFull_Hinting # 3 # modifies glyph outlines for maxiumum constrast ##
+ # kSlight_Hinting # 1 # modifies glyph outlines minimally to improve contrast ##
+ # kNormal_Hinting # 2 # modifies glyph outlines to improve contrast ##
+ # kFull_Hinting # 3 # modifies glyph outlines for maximum contrast ##
##
#Param hintingLevel one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting ##
@@ -901,19 +901,19 @@ Anti-alias drawing approximates partial pixel coverage with transparency.
If kAntiAlias_Flag is clear, pixel centers contained by the shape edge are drawn opaque.
If kAntiAlias_Flag is set, pixels are drawn with Color_Alpha equal to their coverage.
-The rule for aliased pixels is inconsistent across platforms. A shape edge
+The rule for Aliased pixels is inconsistent across platforms. A shape edge
passing through the pixel center may, but is not required to, draw the pixel.
-Raster_Engine draws aliased pixels whose centers are on or to the right of the start of an
+Raster_Engine draws Aliased pixels whose centers are on or to the right of the start of an
active Path edge, and whose center is to the left of the end of the active Path edge.
#ToDo add illustration of raster pixels ##
-A platform may only support anti-aliased drawing. Some GPU-backed platforms use
-supersampling to anti-alias all drawing, and have no mechanism to selectively
-alias.
+A platform may only support Anti-aliased drawing. Some GPU-backed platforms use
+Supersampling to Anti-alias all drawing, and have no mechanism to selectively
+Alias.
-The amount of coverage computed for anti-aliased pixels also varies across platforms.
+The amount of coverage computed for Anti-aliased pixels also varies across platforms.
Anti-alias is disabled by default.
Anti-alias can be enabled by default by setting SkPaintDefaults_Flags to kAntiAlias_Flag
@@ -924,8 +924,8 @@ at compile time.
#Description
A red line is drawn with transparency on the edges to make it look smoother.
A blue line draws only where the pixel centers are contained.
- The lines are drawn into an offscreen bitmap, then drawn magified to make the
- aliasing easier to see.
+ The lines are drawn into Bitmap, then drawn magnified to make the
+ Aliasing easier to see.
##
void draw(SkCanvas* canvas) {
@@ -1000,7 +1000,7 @@ at compile time.
# ------------------------------------------------------------------------------
#Topic Dither
-Dither increases fidelity by adjusting the color of adjcent pixels.
+Dither increases fidelity by adjusting the color of adjacent pixels.
This can help to smooth color transitions and reducing banding in gradients.
Dithering lessens visible banding from kRGB_565_SkColorType
and kRGBA_8888_SkColorType gradients,
@@ -1133,7 +1133,7 @@ LCD_Text and Subpixel_Text increase the precision of glyph position.
When set, Flags kLCDRenderText_Flag takes advantage of the organization of Color_RGB stripes that
create a color, and relies
-on the small size of the stripe and visual perception to make the color fringing inperceptible.
+on the small size of the stripe and visual perception to make the color fringing imperceptible.
LCD_Text can be enabled on devices that orient stripes horizontally or vertically, and that order
the color components as Color_RGB or Color_RBG.
@@ -1149,8 +1149,8 @@ kLCDRenderText_Flag or kSubpixelText_Flag (or both) at compile time.
#Example
#Description
Four commas are drawn normally and with combinations of LCD_Text and Subpixel_Text.
- When Subpixel_Text is disabled, the comma glyphs are indentical, but not evenly spaced.
- When Subpixel_Text is enabled, the comma glyphs are unique, but appear evenly spaced.
+ When Subpixel_Text is disabled, the comma Glyphs are identical, but not evenly spaced.
+ When Subpixel_Text is enabled, the comma Glyphs are unique, but appear evenly spaced.
##
SkBitmap bitmap;
@@ -1254,7 +1254,7 @@ of the color increases, the edge of the glyph appears to move towards the outsid
#Method bool isSubpixelText() const
- If true, glyphs at different sub-pixel positions may differ on pixel edge coverage.
+ If true, Glyphs at different sub-pixel positions may differ on pixel edge coverage.
Equivalent to getFlags masked with kSubpixelText_Flag.
@@ -1278,7 +1278,7 @@ SkDebugf("paint.isSubpixelText() %c= !!(paint.getFlags() & SkPaint::kSubpixelTex
#Method void setSubpixelText(bool subpixelText)
- Requests, but does not require, that glyphs respect sub-pixel positioning.
+ Requests, but does not require, that Glyphs respect sub-pixel positioning.
Sets kSubpixelText_Flag if subpixelText is true.
Clears kSubpixelText_Flag if subpixelText is false.
@@ -1305,13 +1305,13 @@ SkDebugf("paint.isSubpixelText() %c= !!(paint.getFlags() & SkPaint::kSubpixelTex
When set, Flags kLCDRenderText_Flag takes advantage of the organization of Color_RGB stripes that
create a color, and relies
-on the small size of the stripe and visual perception to make the color fringing inperceptible.
+on the small size of the stripe and visual perception to make the color fringing imperceptible.
LCD_Text can be enabled on devices that orient stripes horizontally or vertically, and that order
the color components as Color_RGB or Color_RBG.
#Method bool isLCDRenderText() const
- If true, glyphs may use LCD striping to improve glyph edges.
+ If true, Glyphs may use LCD striping to improve glyph edges.
Returns true if Flags kLCDRenderText_Flag is set.
@@ -1335,7 +1335,7 @@ SkDebugf("paint.isLCDRenderText() %c= !!(paint.getFlags() & SkPaint::kLCDRenderT
#Method void setLCDRenderText(bool lcdText)
- Requests, but does not require, that glyphs use LCD striping for glyph edges.
+ Requests, but does not require, that Glyphs use LCD striping for glyph edges.
Sets kLCDRenderText_Flag if lcdText is true.
Clears kLCDRenderText_Flag if lcdText is false.
@@ -1363,7 +1363,7 @@ SkDebugf("paint.isLCDRenderText() %c= !!(paint.getFlags() & SkPaint::kLCDRenderT
#Topic Font_Embedded_Bitmaps
#Alias Font_Embedded_Bitmaps # long-winded enough, alias so I don't type Paint_Font_...
-Font_Embedded_Bitmaps allows selecting custom-sized bitmap glyphs.
+Font_Embedded_Bitmaps allows selecting custom sized bitmap Glyphs.
Flags kEmbeddedBitmapText_Flag when set chooses an embedded bitmap glyph over an outline contained
in a font if the platform supports this option.
@@ -1380,10 +1380,11 @@ kEmbeddedBitmapText_Flag at compile time.
#ToDo image will only output on Ubuntu ... how to handle that in fiddle? ##
#Platform !fiddle
#Description
- The hintgasp TrueType font in the Skia resources/fonts directory includes an embedded
- bitmap glyph at odd font sizes. This example works on platforms that use FreeType
- as their Font_Engine.
- Windows may, but is not required to, return a bitmap glyph if kEmbeddedBitmapText_Flag is set.
+ The "hintgasp" TrueType font in the Skia resources/fonts directory
+ includes an embedded bitmap Glyph at odd font sizes. This example works
+ on platforms that use FreeType as their Font_Engine.
+ Windows may, but is not required to, return a bitmap glyph if
+ kEmbeddedBitmapText_Flag is set.
##
#Image embeddedbitmap.png
@@ -1406,7 +1407,7 @@ kEmbeddedBitmapText_Flag at compile time.
#Method bool isEmbeddedBitmapText() const
- If true, Font_Engine may return glyphs from font bitmaps instead of from outlines.
+ If true, Font_Engine may return Glyphs from font bitmaps instead of from outlines.
Equivalent to getFlags masked with kEmbeddedBitmapText_Flag.
@@ -1460,7 +1461,7 @@ kEmbeddedBitmapText_Flag at compile time.
#Substitute auto-hinting
If Hinting is set to kNormal_Hinting or kFull_Hinting, Automatic_Hinting
-instructs the Font_Manager to always hint glyphs.
+instructs the Font_Manager to always hint Glyphs.
Automatic_Hinting has no effect if Hinting is set to kNo_Hinting or
kSlight_Hinting.
@@ -1470,7 +1471,7 @@ Automatic_Hinting only affects platforms that use FreeType as the Font_Manager.
If true, and if Hinting is set to kNormal_Hinting or kFull_Hinting, and if
platform uses FreeType as the Font_Manager, instruct the Font_Manager to always hint
- glyphs.
+ Glyphs.
Equivalent to getFlags masked with kAutoHinting_Flag.
@@ -1498,7 +1499,7 @@ Automatic_Hinting only affects platforms that use FreeType as the Font_Manager.
#Method void setAutohinted(bool useAutohinter)
If Hinting is set to kNormal_Hinting or kFull_Hinting and useAutohinter is set,
- instruct the Font_Manager to always hint glyphs.
+ instruct the Font_Manager to always hint Glyphs.
Automatic_Hinting has no effect if Hinting is set to kNo_Hinting or
kSlight_Hinting.
@@ -1536,13 +1537,13 @@ Automatic_Hinting only affects platforms that use FreeType as the Font_Manager.
#Topic Vertical_Text
Text may be drawn by positioning each glyph, or by positioning the first glyph and
-using Font_Advance to position subsequent glyphs. By default, each successive glyph
-is positioned to the right of the preceeding glyph. Vertical_Text sets successive
-glyphs to position below the preceeding glyph.
+using Font_Advance to position subsequent Glyphs. By default, each successive glyph
+is positioned to the right of the preceding glyph. Vertical_Text sets successive
+Glyphs to position below the preceding glyph.
-Skia can translate text character codes as a series of glyphs, but does not implement
+Skia can translate text character codes as a series of Glyphs, but does not implement
font substitution,
-textual substitution, line layout, or contextual spacing like kerning pairs. Use
+textual substitution, line layout, or contextual spacing like Kerning pairs. Use
a text shaping engine like #A HarfBuzz # http://harfbuzz.org/ ## to translate text runs
into glyph series.
@@ -1571,7 +1572,7 @@ void draw(SkCanvas* canvas) {
#Method bool isVerticalText() const
- If true, glyphs are drawn top to bottom instead of left to right.
+ If true, Glyphs are drawn top to bottom instead of left to right.
Equivalent to getFlags masked with kVerticalText_Flag.
@@ -1628,8 +1629,8 @@ bold font face using the platform's Font_Manager.
Use Text_Skew_X to approximate an italic font style when the italic font face
is not available.
-A FreeType-based port may define SK_USE_FREETYPE_EMBOLDEN at compile time to direct
-the font engine to create the bold glyphs. Otherwise, the extra bold is computed
+A FreeType based port may define SK_USE_FREETYPE_EMBOLDEN at compile time to direct
+the font engine to create the bold Glyphs. Otherwise, the extra bold is computed
by increasing the stroke width and setting the Style to kStrokeAndFill_Style as needed.
Fake_Bold is disabled by default.
@@ -1678,7 +1679,7 @@ void draw(SkCanvas* canvas) {
#Method void setFakeBoldText(bool fakeBoldText)
- Use increased stroke width when creating glyph bitmaps to approximate bolding.
+ Use increased stroke width when creating glyph bitmaps to approximate a bold typeface.
Sets kFakeBoldText_Flag if fakeBoldText is true.
Clears kFakeBoldText_Flag if fakeBoldText is false.
@@ -1704,13 +1705,13 @@ void draw(SkCanvas* canvas) {
#Topic Full_Hinting_Spacing
#Alias Full_Hinting_Spacing # long winded enough -- maybe things with two underscores auto-aliased?
-Full_Hinting_Spacing adjusts the character spacing by the difference of the
-hinted and unhinted left and right side bearings,
-if Hinting is set to kFull_Hinting. Full_Hinting_Spacing only
-applies to platforms that use FreeType as their Font_Engine.
+if Hinting is set to kFull_Hinting, Full_Hinting_Spacing adjusts the character
+spacing by the difference of the hinted and Unhinted Left_Side_Bearing and
+Right_Side_Bearing. Full_Hinting_Spacing only applies to platforms that use
+FreeType as their Font_Engine.
-Full_Hinting_Spacing is not related to text kerning, where the space between
-a specific pair of characters is adjusted using data in the font's kerning tables.
+Full_Hinting_Spacing is not related to text Kerning, where the space between
+a specific pair of characters is adjusted using data in the font's Kerning tables.
#Method bool isDevKernText() const
@@ -1760,8 +1761,8 @@ a specific pair of characters is adjusted using data in the font's kerning table
Filter_Quality trades speed for image filtering when the image is scaled.
A lower Filter_Quality draws faster, but has less fidelity.
A higher Filter_Quality draws slower, but looks better.
-If the image is unscaled, the Filter_Quality choice will not result in a noticable
-difference.
+If the image is drawn without scaling, the Filter_Quality choice will not result
+in a noticeable difference.
Filter_Quality is used in Paint passed as a parameter to
#List
@@ -1846,7 +1847,7 @@ or stroked shape in a
32-bit value. Each component occupies 8-bits, ranging from zero: no contribution;
to 255: full intensity. All values in any combination are valid.
-Color is not premultiplied;
+Color is not Premultiplied;
Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color_RGB_Blue, and Color_RGB_Green.
The bit positions of Color_Alpha and Color_RGB are independent of the bit positions
@@ -1875,7 +1876,7 @@ on the output device, which may have more or fewer bits, and may have a differen
#Method SkColor getColor() const
- Retrieves Color_Alpha and Color_RGB, unpremultiplied, packed into 32 bits.
+ Retrieves Alpha and Color_RGB, Unpremultiplied, packed into 32 bits.
Use helpers SkColorGetA, SkColorGetR, SkColorGetG, and SkColorGetB to extract
a color component.
@@ -1899,8 +1900,8 @@ on the output device, which may have more or fewer bits, and may have a differen
#Method void setColor(SkColor color)
- Sets Color_Alpha and Color_RGB used when stroking and filling. The color is a 32-bit value,
- unpremutiplied, packing 8-bit components for Color_Alpha, Color_RGB_Red, Color_RGB_Blue, and Color_RGB_Green.
+ Sets Alpha and Color_RGB used when stroking and filling. The color is a 32-bit value,
+ Unpremultiplied, packing 8-bit components for Alpha, Red, Blue, and Green.
#Param color Unpremultiplied Color_ARGB ##
@@ -1929,9 +1930,9 @@ Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color
#Method uint8_t getAlpha() const
- Retrieves Color_Alpha from the Color used when stroking and filling.
+ Retrieves Alpha from the Color used when stroking and filling.
- #Return Color_Alpha ranging from zero, fully transparent, to 255, fully opaque ##
+ #Return Alpha ranging from zero, fully transparent, to 255, fully opaque ##
#Example
SkPaint paint;
@@ -1946,13 +1947,13 @@ Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color
#Method void setAlpha(U8CPU a)
- Replaces Color_Alpha, leaving Color_RGB
+ Replaces Alpha, leaving Color_RGB
unchanged. An out of range value triggers an assert in the debug
build. a is a value from zero to 255.
a set to zero makes Color fully transparent; a set to 255 makes Color
fully opaque.
- #Param a Color_Alpha component of Color ##
+ #Param a Alpha component of Color ##
#Example
SkPaint paint;
@@ -1972,8 +1973,7 @@ Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color
#Method void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Sets Color used when drawing solid fills. The color components range from 0 to 255.
- The color is unpremultiplied;
- Color_Alpha sets the transparency independent of Color_RGB.
+ The color is Unpremultiplied; Alpha sets the transparency independent of Color_RGB.
#Param a amount of Color_Alpha, from fully transparent (0) to fully opaque (255) ##
#Param r amount of Color_RGB_Red, from no red (0) to full red (255) ##
@@ -2033,7 +2033,7 @@ Stroke_Width of zero has a special meaning and switches drawing to use Hairline.
Hairline draws the thinnest continuous frame. If kAntiAlias_Flag is clear, adjacent pixels
flow horizontally, vertically,or diagonally.
-#ToDo what is the description of anti-aliased hairlines? ##
+#ToDo what is the description of Anti-aliased hairlines? ##
Path drawing with Hairline may hit the same pixel more than once. For instance, Path containing
two lines in one Path_Contour will draw the corner point once, but may both lines may draw the adjacent
@@ -2062,8 +2062,8 @@ a fill draw.
#Const kFill_Style 0
Set to fill geometry.
- Applies to Rect, Region, Round_Rect, Circle, Oval, Path, and Text.
- Bitmap, Image, Patch, Region, Sprite, and Vertices are painted as if
+ Applies to Rect, Region, Round_Rect, Circles, Ovals, Path, and Text.
+ Bitmap, Image, Patches, Region, Sprites, and Vertices are painted as if
kFill_Style is set, and ignore the set Style.
The Path_Fill_Type specifies additional rules to fill the area outside the path edge,
and to create an unfilled hole inside the shape.
@@ -2072,16 +2072,15 @@ a fill draw.
#Const kStroke_Style 1
Set to stroke geometry.
- Applies to Rect, Region, Round_Rect, Arc, Circle, Oval,
- Path, and Text.
- Arc, Line, Point, and Point_Array are always drawn as if kStroke_Style is set,
+ Applies to Rect, Region, Round_Rect, Arcs, Circles, Ovals, Path, and Text.
+ Arcs, Lines, and Points, are always drawn as if kStroke_Style is set,
and ignore the set Style.
The stroke construction is unaffected by the Path_Fill_Type.
##
#Const kStrokeAndFill_Style 2
Set to stroke and fill geometry.
- Applies to Rect, Region, Round_Rect, Circle, Oval, Path, and Text.
+ Applies to Rect, Region, Round_Rect, Circles, Ovals, Path, and Text.
Path is treated as if it is set to SkPath::kWinding_FillType,
and the set Path_Fill_Type is ignored.
##
@@ -2264,7 +2263,7 @@ Miter_Limit can be computed from the corner angle:
Miter_Limit default value is 4.
The default may be changed at compile time by setting SkPaintDefaults_MiterLimit
-in SkUserConfig.h or as a define supplied by the build environment.
+in "SkUserConfig.h" or as a define supplied by the build environment.
Here are some miter limits and the angles that triggers them.
#Table
@@ -2673,8 +2672,8 @@ returns false since Hairline has no filled equivalent.
#Example
#Height 192
#Description
- A very small quad stroke is turned into a filled path with increasing levels of precision.
- At the lowest precision, the quad stroke is approximated by a rectangle.
+ A very small Quad stroke is turned into a filled path with increasing levels of precision.
+ At the lowest precision, the Quad stroke is approximated by a rectangle.
At the highest precision, the filled path has high fidelity compared to the original stroke.
##
void draw(SkCanvas* canvas) {
@@ -3141,7 +3140,7 @@ If Paint has no Path_Effect, the path geometry is unaltered when filled or strok
# ------------------------------------------------------------------------------
#Topic Mask_Filter_Methods
-Mask_Filter uses Color_Alpha of the shape drawn to create Mask_Alpha.
+Mask_Filter uses coverage of the shape drawn to create Mask_Alpha.
Mask_Filter operates at a lower level than Rasterizer; Mask_Filter takes a Mask,
and returns a Mask.
Mask_Filter may change the geometry and transparency of the shape, such as creating a blur effect.
@@ -3329,7 +3328,7 @@ and returns a Mask.
Rasterizer may change the geometry and transparency of the shape, such as
creating a shadow effect. Rasterizer forms the base of Rasterizer_Layer, which
creates effects like embossing and outlining.
-Rasterizer applies to Rect, Region, Round_Rect, Arc, Circle, Oval,
+Rasterizer applies to Rect, Region, Round_Rect, Arcs, Circles, Ovals,
Path, and Text.
#Example
@@ -3450,7 +3449,7 @@ Image_Filter operates on the pixel representation of the shape, as modified by P
with Blend_Mode set to SkBlendMode::kSrcOver. Image_Filter creates a new bitmap,
which is drawn to the device using the set Blend_Mode.
Image_Filter is higher level than Mask_Filter; for instance, an Image_Filter
-can operate on all channels of Color, while Mask_Filter generates Color_Alpha only.
+can operate on all channels of Color, while Mask_Filter generates Alpha only.
Image_Filter operates independently of and can be used in combination with
Mask_Filter and Rasterizer.
@@ -3690,11 +3689,11 @@ Deprecated.
##
Align adjusts the text relative to the text position.
-Align affects glyphs drawn with: SkCanvas::drawText, SkCanvas::drawPosText,
+Align affects Glyphs drawn with: SkCanvas::drawText, SkCanvas::drawPosText,
SkCanvas::drawPosTextH, SkCanvas::drawTextOnPath,
SkCanvas::drawTextOnPathHV, SkCanvas::drawTextRSXform, SkCanvas::drawTextBlob,
and SkCanvas::drawString;
-as well as calls that place text glyphs like getTextWidths and getTextPath.
+as well as calls that place text Glyphs like getTextWidths and getTextPath.
The text position is set by the font for both horizontal and vertical text.
Typically, for horizontal text, the position is to the left side of the glyph on the
@@ -4105,7 +4104,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Font_Metrics
-Font_Metrics describe dimensions common to the glyphs in Typeface.
+Font_Metrics describe dimensions common to the Glyphs in Typeface.
The dimensions are computed by Font_Manager from font data and do not take
Paint settings other than Text_Size into account.
@@ -4195,7 +4194,7 @@ void draw(SkCanvas* canvas) {
FontMetrics is filled out by getFontMetrics. FontMetrics contents reflect the values
computed by Font_Manager using Typeface. Values are set to zero if they are
- not availble.
+ not available.
fUnderlineThickness and fUnderlinePosition have a bit set in fFlags if their values
are valid, since their value may be zero.
@@ -4271,12 +4270,12 @@ void draw(SkCanvas* canvas) {
##
#Member SkScalar fXMin
- Minimum bounding box x value for all glyphs.
+ Minimum bounding box x value for all Glyphs.
Typically less than zero.
##
#Member SkScalar fXMax
- Maximum bounding box x value for all glyphs.
+ Maximum bounding box x value for all Glyphs.
Typically greater than zero.
##
@@ -4325,8 +4324,8 @@ void draw(SkCanvas* canvas) {
#Method bool hasUnderlineThickness(SkScalar* thickness) const
If Font_Metrics has a valid underline thickness, return true, and set
- thickness to that value. If it doesn't, return false, and ignore
- thickness.
+ thickness to that value. If the underline thickness is not valid,
+ return false, and ignore thickness.
#Param thickness storage for underline width ##
@@ -4339,8 +4338,8 @@ void draw(SkCanvas* canvas) {
#Method bool hasUnderlinePosition(SkScalar* position) const
If Font_Metrics has a valid underline position, return true, and set
- position to that value. If it doesn't, return false, and ignore
- position.
+ position to that value. If the underline position is not valid,
+ return false, and ignore position.
#Param position storage for underline position ##
@@ -4353,8 +4352,8 @@ void draw(SkCanvas* canvas) {
#Method bool hasStrikeoutThickness(SkScalar* thickness) const
If Font_Metrics has a valid strikeout thickness, return true, and set
- thickness to that value. If it doesn't, return false, and ignore
- thickness.
+ thickness to that value. If the underline thickness is not valid,
+ return false, and ignore thickness.
#Param thickness storage for strikeout width ##
@@ -4367,8 +4366,8 @@ void draw(SkCanvas* canvas) {
#Method bool hasStrikeoutPosition(SkScalar* position) const
If Font_Metrics has a valid strikeout position, return true, and set
- position to that value. If it doesn't, return false, and ignore
- position.
+ position to that value. If the underline position is not valid,
+ return false, and ignore position.
#Param position storage for strikeout position ##
@@ -4448,7 +4447,7 @@ void draw(SkCanvas* canvas) {
#Method SkRect getFontBounds() const
-Returns the union of bounds of all glyphs.
+Returns the union of bounds of all Glyphs.
Returned dimensions are computed by Font_Manager from font data,
ignoring Hinting. Includes Text_Size, Text_Scale_X,
and Text_Skew_X, but not Fake_Bold or Path_Effect.
@@ -4457,7 +4456,7 @@ If Text_Size is large, Text_Scale_X is one, and Text_Skew_X is zero,
returns the same bounds as Font_Metrics { FontMetrics::fXMin,
FontMetrics::fTop, FontMetrics::fXMax, FontMetrics::fBottom }.
-#Return union of bounds of all glyphs ##
+#Return union of bounds of all Glyphs ##
#Example
SkPaint paint;
@@ -4495,7 +4494,7 @@ If byteLength includes a partial character, the partial character is ignored.
If Text_Encoding is kUTF8_TextEncoding and
text contains an invalid UTF-8 sequence, zero is returned.
-#Param text character stroage encoded with Text_Encoding ##
+#Param text character storage encoded with Text_Encoding ##
#Param byteLength length of character storage in bytes ##
#Param glyphs storage for glyph indices; may be nullptr ##
@@ -4520,14 +4519,14 @@ text contains an invalid UTF-8 sequence, zero is returned.
#Method int countText(const void* text, size_t byteLength) const
- Returns the number of glyphs in text.
- Uses Text_Encoding to count the glyphs.
+ Returns the number of Glyphs in text.
+ Uses Text_Encoding to count the Glyphs.
Returns the same result as textToGlyphs.
-#Param text character stroage encoded with Text_Encoding ##
+#Param text character storage encoded with Text_Encoding ##
#Param byteLength length of character storage in bytes ##
-#Return number of glyphs represented by text of length byteLength ##
+#Return number of Glyphs represented by text of length byteLength ##
#Example
SkPaint paint;
@@ -4552,9 +4551,9 @@ text contains an invalid UTF-8 sequence, zero is returned.
returns true if all glyph indices in text are non-zero;
does not check to see if text contains valid glyph indices for Typeface.
- Returns true if bytelength is zero.
+ Returns true if byteLength is zero.
- #Param text array of characters or glyphs ##
+ #Param text array of characters or Glyphs ##
#Param byteLength number of bytes in text array ##
#Return true if all text corresponds to a non-zero glyph index ##
@@ -4781,7 +4780,7 @@ text contains an invalid UTF-8 sequence, zero is returned.
#Example
#Height 160
#Description
- Bounds of glyphs increase for stroked text, but text advance remains the same.
+ Bounds of Glyphs increase for stroked text, but text advance remains the same.
The underlines show the text advance, spaced to keep them distinct.
##
void draw(SkCanvas* canvas) {
@@ -4821,7 +4820,7 @@ text contains an invalid UTF-8 sequence, zero is returned.
# ------------------------------------------------------------------------------
#Topic Text_Path
-Text_Path describes the geometry of glyphs used to draw text.
+Text_Path describes the geometry of Glyphs used to draw text.
#Method void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y,
SkPath* path) const
@@ -4836,7 +4835,7 @@ Uses x, y, and Text_Align to position path.
#Param length number of bytes of text ##
#Param x x-coordinate of the origin of the text ##
#Param y y-coordinate of the origin of the text ##
- #Param path geometry of the glyphs ##
+ #Param path geometry of the Glyphs ##
#Example
#Description
@@ -4872,12 +4871,12 @@ pos contains a position for each glyph.
#Param text character codes or glyph indices ##
#Param length number of bytes of text ##
#Param pos positions of each glyph ##
- #Param path geometry of the glyphs ##
+ #Param path geometry of the Glyphs ##
#Example
#Height 85
#Description
- Simplifies three glyphs to eliminate overlaps, and strokes the result.
+ Simplifies three Glyphs to eliminate overlaps, and strokes the result.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -4897,16 +4896,16 @@ pos contains a position for each glyph.
# ------------------------------------------------------------------------------
#Topic Text_Intercepts
-Text_Intercepts describe the intersection of drawn text glyphs with a pair
+Text_Intercepts describe the intersection of drawn text Glyphs with a pair
of lines parallel to the text advance. Text_Intercepts permits creating a
-underline that skips descenders.
+underline that skips Descenders.
#Method int getTextIntercepts(const void* text, size_t length, SkScalar x, SkScalar y,
const SkScalar bounds[2], SkScalar* intervals) const
Returns the number of intervals that intersect bounds.
bounds describes a pair of lines parallel to the text advance.
- The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+ The return count is zero or a multiple of two, and is at most twice the number of Glyphs in
the string.
Uses Text_Encoding to decode text, Typeface to get the glyph paths,
and Text_Size, Fake_Bold, and Path_Effect to scale and modify the glyph paths.
@@ -4928,7 +4927,7 @@ underline that skips descenders.
#Example
#Height 128
#Description
-Underline uses intercepts to draw on either side of the glyph descender.
+Underline uses intercepts to draw on either side of the glyph Descender.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -4959,7 +4958,7 @@ void draw(SkCanvas* canvas) {
Returns the number of intervals that intersect bounds.
bounds describes a pair of lines parallel to the text advance.
- The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+ The return count is zero or a multiple of two, and is at most twice the number of Glyphs in
the string.
Uses Text_Encoding to decode text, Typeface to get the glyph paths,
and Text_Size, Fake_Bold, and Path_Effect to scale and modify the glyph paths.
@@ -4979,7 +4978,7 @@ void draw(SkCanvas* canvas) {
#Example
#Description
- Text intercepts draw on either side of, but not inside, glyphs in a run.
+ Text intercepts draw on either side of, but not inside, Glyphs in a run.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -5012,7 +5011,7 @@ void draw(SkCanvas* canvas) {
Returns the number of intervals that intersect bounds.
bounds describes a pair of lines parallel to the text advance.
- The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+ The return count is zero or a multiple of two, and is at most twice the number of Glyphs in
the string.
Uses Text_Encoding to decode text, Typeface to get the glyph paths,
and Text_Size, Fake_Bold, and Path_Effect to scale and modify the glyph paths.
@@ -5070,17 +5069,17 @@ void draw(SkCanvas* canvas) {
Returns the number of intervals that intersect bounds.
bounds describes a pair of lines parallel to the text advance.
- The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+ The return count is zero or a multiple of two, and is at most twice the number of Glyphs in
the string.
Uses Text_Encoding to decode text, Typeface to get the glyph paths,
and Text_Size, Fake_Bold, and Path_Effect to scale and modify the glyph paths.
- Uses pos array and Text_Align to position intervals.
+ Uses run array and Text_Align to position intervals.
Pass nullptr for intervals to determine the size of the interval array.
intervals are cached to improve performance for multiple calls.
- #Param blob glyphs, positions, and text paint attributes ##
+ #Param blob Glyphs, positions, and text paint attributes ##
#Param bounds lower and upper line parallel to the advance ##
#Param intervals returned intersections; may be nullptr ##
@@ -5127,8 +5126,8 @@ void draw(SkCanvas* canvas) {
Returns true if Paint prevents all drawing;
otherwise, the Paint may or may not allow drawing.
- Returns true if Blend_Mode and Color_Alpha are enabled,
- and computed Color_Alpha is zero.
+ Returns true if, for example, Blend_Mode combined with Color_Alpha computes a
+ new Alpha of zero.
#Return true if Paint prevents all drawing ##
@@ -5187,13 +5186,13 @@ Paint may draw to.
Only call this if canComputeFastBounds returned true. This takes a
raw rectangle (the raw bounds of a shape), and adjusts it for stylistic
effects in the paint (e.g. stroking). If needed, it uses the storage
- rect parameter. It returns the adjusted bounds that can then be used
+ parameter. It returns the adjusted bounds that can then be used
for SkCanvas::quickReject tests.
- The returned rect will either be orig or storage, thus the caller
+ The returned Rect will either be orig or storage, thus the caller
should not rely on storage being set to the result, but should always
- use the retured value. It is legal for orig and storage to be the same
- rect.
+ use the returned value. It is legal for orig and storage to be the same
+ Rect.
#Private
e.g.
@@ -5231,8 +5230,9 @@ Paint may draw to.
(to be made private)
##
- Take the style explicitly, so the caller can force us to be stroked
- without having to make a copy of the paint just to change that field.
+ Computes the bounds, overriding the Paint Style. This can be used to
+ account for additional width required by stroking orig, without
+ altering Style set to fill.
#Param orig geometry modified by Paint when drawn ##
#Param storage computed bounds of geometry ##
@@ -5252,9 +5252,11 @@ Paint may draw to.
macro expands to: void toString(SkString* str) const;
##
-Converts Paint to machine parsable form in developer mode.
+Creates string representation of Paint. The representation is read by
+internal debugging tools. The interface and implementation may be
+suppressed by defining SK_IGNORE_TO_STRING.
-#Param str storage for string containing parsable Paint ##
+#Param str storage for string representation of Paint ##
#Example
SkPaint paint;
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index e4b9770543..ca17a9cc8f 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -16,7 +16,7 @@ the middle entry as the end of the first Line and the start of the second Line.
Path components Arc, Rect, Round_Rect, Circle, and Oval are composed of
Lines and Curves with as many Verbs and Points required
for an exact description. Once added to Path, these components may lose their
-identity; although Path can be inspected to determine if it decribes a single
+identity; although Path can be inspected to determine if it describes a single
Rect, Oval, Round_Rect, and so on.
#Example
@@ -103,7 +103,7 @@ SkPath::kMove_Verb; each SkPath::kMove_Verb that follows starts a new Contour.
#Example
#Description
Each SkPath::moveTo starts a new Contour, and content after SkPath::close()
-also starts a new Contour. Since SkPath::conicTo wasn't preceded by
+also starts a new Contour. Since SkPath::conicTo is not preceded by
SkPath::moveTo, the first Point of the third Contour starts at the last Point
of the second Contour.
##
@@ -188,10 +188,10 @@ Paths contain geometry. Paths may be empty, or contain one or more Verbs that
outline a figure. Path always starts with a move verb to a Cartesian
coordinate, and may be followed by additional verbs that add lines or curves.
Adding a close verb makes the geometry into a continuous loop, a closed contour.
-Paths may contain any number of contours, each beginnning with a move verb.
+Paths may contain any number of contours, each beginning with a move verb.
Path contours may contain only a move verb, or may also contain lines,
-quadratic Beziers, conics, and cubic Beziers. Path contours may be open or
+Quadratic_Beziers, Conics, and Cubic_Beziers. Path contours may be open or
closed.
When used to draw a filled area, Path describes whether the fill is inside or
@@ -210,7 +210,7 @@ SkPath::updateBoundsCache to make Path thread safe.
# constants # description ##
#Legend ##
# AddPathMode # Sets addPath options. ##
-# ArcSize # Sets arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep, SkScalar x, SkScalar y) options. ##
+# ArcSize # Used by arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep, SkScalar x, SkScalar y).##
# Convexity # Returns if Path is convex or concave. ##
# Direction # Sets Contour clockwise or counterclockwise. ##
# FillType # Sets winding rule and inverse fill. ##
@@ -279,8 +279,8 @@ SkPath::updateBoundsCache to make Path thread safe.
# countPoints # Returns Point_Array length. ##
# countVerbs # Returns Verb_Array length. ##
# cubicTo # Appends Cubic. ##
-# dump() # Sends text representation using floats to stdout. ##
-# dumpHex # Sends text representation using hexadecimal to stdout. ##
+# dump() # Sends text representation using floats to standard output. ##
+# dumpHex # Sends text representation using hexadecimal to standard output. ##
# getBounds # Returns maximum and minimum of Point_Array. ##
# getConvexity # Returns geometry convexity, computing if necessary. ##
# getConvexityOrUnknown # Returns geometry convexity if known. ##
@@ -569,7 +569,7 @@ Releases ownership of any shared data and deletes data if Path is sole owner.
#Example
#Description
-delete calls Path destructor, but copy of original in path2 is unaffected.
+delete calls Path Destructor, but copy of original in path2 is unaffected.
##
void draw(SkCanvas* canvas) {
SkPath* path = new SkPath();
@@ -596,7 +596,7 @@ Copying Paths by assignment is very efficient and never allocates memory.
Paths are always copied by value from the interface; the underlying shared
pointers are not exposed.
-#Param path Verb_Array, Point_Array, Weights, amd Fill_Type to copy ##
+#Param path Verb_Array, Point_Array, Weights, and Fill_Type to copy ##
#Return Path copied by value ##
@@ -708,7 +708,7 @@ Return true if Paths contain equal Verbs and equal Weights.
If Paths contain one or more Conics, the Weights must match.
conicTo may add different Verbs depending on Conic_Weight, so it is not
-trival to interpolate a pair of Paths containing Conics with different
+trivial to interpolate a pair of Paths containing Conics with different
Conic_Weight values.
#Param compare Path to compare ##
@@ -1289,7 +1289,7 @@ void draw(SkCanvas* canvas) {
unsigned* start = nullptr) const
Returns true if constructed by addRoundRect, addRRect; and if construction
-is not empty, not Rect, and not Oval. Path constructed with other other calls
+is not empty, not Rect, and not Oval. Path constructed with other calls
will not return true though Path draws Round_Rect.
rrect receives bounds of Round_Rect.
@@ -1305,9 +1305,13 @@ Triggers performance optimizations on some GPU_Surface implementations.
#Param dir storage for Direction; may be nullptr ##
#Param start storage for start of Round_Rect; may be nullptr ##
-#Return true for Round_Rect Path constructed by addRoundRect or addRRect ##
+#Return true if Path contains only Round_Rect ##
#Example
+#Description
+Draw rounded rectangle and its bounds. Draw an arc indicating where the rounded
+rectangle starts and its direction.
+##
void draw(SkCanvas* canvas) {
SkPaint paint;
SkPath path;
@@ -1343,7 +1347,7 @@ void draw(SkCanvas* canvas) {
#Method void reset()
-Sets Path to its intial state.
+Sets Path to its initial state.
Removes Verb_Array, Point_Array, and Weights, and sets FillType to kWinding_FillType.
Internal storage associated with Path is released.
@@ -1364,7 +1368,7 @@ Internal storage associated with Path is released.
#Method void rewind()
-Sets Path to its intial state, preserving internal storage.
+Sets Path to its initial state, preserving internal storage.
Removes Verb_Array, Point_Array, and Weights, and sets FillType to kWinding_FillType.
Internal storage associated with Path is retained.
@@ -1535,7 +1539,7 @@ Mark temporary paths, discarded or modified after use, as volatile
to inform Device that the path need not be cached.
Mark animating Path volatile to improve performance.
-Mark unchanging Path non-volative to improve repeated rendering.
+Mark unchanging Path non-volatile to improve repeated rendering.
Raster_Surface Path draws are affected by volatile for some shadows.
GPU_Surface Path draws are affected by volatile for some shadows and concave geometries.
@@ -1582,8 +1586,8 @@ If false, returns true if p1 equals or nearly equals p2.
#Example
#Description
-As single precision floats, 100 and 100.000001f have the same bit representation,
-and are exactly equal. 100 and 100.0001f have different bit representations, and
+As single precision floats, 100 and 100.000001 have the same bit representation,
+and are exactly equal. 100 and 100.0001 have different bit representations, and
are not exactly equal, but are nearly equal.
##
void draw(SkCanvas* canvas) {
@@ -1617,9 +1621,9 @@ Test if Quad is degenerate.
Quad with no length or that moves a very short distance is degenerate; it is
treated as a point.
-#Param p1 quad start point ##
-#Param p2 quad control point ##
-#Param p3 quad end point ##
+#Param p1 Quad start point ##
+#Param p2 Quad control point ##
+#Param p3 Quad end point ##
#Param exact if true, returns true only if p1, p2, and p3 are equal;
if false, returns true if p1, p2, and p3 are equal or nearly equal
##
@@ -1628,9 +1632,9 @@ treated as a point.
#Example
#Description
-As single precision floats: 100, 100.00001f, and 100.00002f have different bit representations
+As single precision floats: 100, 100.00001, and 100.00002 have different bit representations
but nearly the same value. Translating all three by 1000 gives them the same bit representation;
-the fractional portion of the number can't be represented by the float and is lost.
+the fractional portion of the number can not be represented by the float and is lost.
##
void draw(SkCanvas* canvas) {
auto debugster = [](const SkPath& path, bool exact) -> void {
@@ -1669,10 +1673,10 @@ Test if Cubic is degenerate.
Cubic with no length or that moves a very short distance is degenerate; it is
treated as a point.
-#Param p1 cubic start point ##
-#Param p2 cubic control point 1 ##
-#Param p3 cubic control point 2 ##
-#Param p4 cubic end point ##
+#Param p1 Cubic start point ##
+#Param p2 Cubic control point 1 ##
+#Param p3 Cubic control point 2 ##
+#Param p4 Cubic end point ##
#Param exact if true, returns true only if p1, p2, p3, and p4 are equal;
if false, returns true if p1, p2, p3, and p4 are equal or nearly equal
##
@@ -1759,7 +1763,7 @@ second move is not line
Point_Array contains Points satisfying the allocated Points for
each Verb in Verb_Array. For instance, Path containing one Contour with Line
-and Quad is described by Verb_Array: move to, line to, quad to; and
+and Quad is described by Verb_Array: Verb::kMoveTo, Verb::kLineTo, Verb::kQuadTo; and
one Point for move, one Point for Line, two Points for Quad; totaling four Points.
Point_Array may be read directly from Path with getPoints, or inspected with
@@ -1960,7 +1964,7 @@ Cached state is also exchanged. swap() internally exchanges pointers, so
it is lightweight and does not allocate memory.
swap() usage has largely been replaced by operator=(const SkPath& path).
-Paths do not copy their content on assignment util they are written to,
+Paths do not copy their content on assignment until they are written to,
making assignment as efficient as swap().
#Param other Path exchanged by value ##
@@ -2163,7 +2167,7 @@ grows Path Verb_Array and Point_Array to contain extraPtCount additional Points.
May improve performance and use less memory by
reducing the number and size of allocations when creating Path.
-#Param extraPtCount number of additional Points to preallocate ##
+#Param extraPtCount number of additional Points to allocate ##
#Example
#Height 192
@@ -2257,7 +2261,7 @@ void draw(SkCanvas* canvas) {
Adds beginning of Contour relative to Last_Point.
If Path is empty, starts Contour at (dx, dy).
Otherwise, start Contour at Last_Point offset by (dx, dy).
-Function name stands for relative move to.
+Function name stands for "relative move to".
#Param dx offset from Last_Point x to Contour start x ##
#Param dy offset from Last_Point y to Contour start y ##
@@ -2365,7 +2369,7 @@ kClose_Verb, Last_Point is set to (0, 0) before adding Line.
Appends kMove_Verb to Verb_Array and (0, 0) to Point_Array, if needed;
then appends kLine_Verb to Verb_Array and Line end to Point_Array.
Line end is Last_Point plus Vector (dx, dy).
-Function name stands for relative line to.
+Function name stands for "relative line to".
#Param dx offset from Last_Point x to Line end x ##
#Param dy offset from Last_Point y to Line end y ##
@@ -2395,8 +2399,10 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Quad
-#Substitute quads
+#Alias Quad
#Alias Quads
+#Alias Quadratic_Bezier
+#Alias Quadratic_Beziers
Quad describes a quadratic Bezier, a second-order curve identical to a section
of a parabola. Quad begins at a start Point, curves towards a control Point,
@@ -2529,7 +2535,7 @@ void draw(SkCanvas* canvas) {
control and Quad end to Point_Array.
Quad control is Last_Point plus Vector (dx1, dy1).
Quad end is Last_Point plus Vector (dx2, dy2).
- Function name stands for relative quad to.
+ Function name stands for "relative quad to".
#Param dx1 offset from Last_Point x to Quad control x ##
#Param dy1 offset from Last_Point x to Quad control y ##
@@ -2561,7 +2567,6 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Conic
-#Substitute conics
#Alias Conics
Conic describes a conical section: a piece of an ellipse, or a piece of a
@@ -2573,9 +2578,8 @@ Each Conic in Path adds two Points and one Conic_Weight. Conic_Weights in Path
may be inspected with Iter, or with RawIter.
#Subtopic Weight
-#Substitute weights
-#Alias Weights
#Alias Conic_Weights
+#Alias Weights
Weight determines both the strength of the control Point and the type of Conic.
If Weight is exactly one, then Conic is identical to Quad; it is always a
@@ -2651,7 +2655,7 @@ done
##
##
-If weight is greater than one, Conic is a hyperbolic segment. As w gets large,
+If weight is greater than one, Conic is a hyperbolic segment. As weight gets large,
a hyperbolic segment can be approximated by straight lines connecting the
control Point with the end Points.
@@ -2767,7 +2771,7 @@ void draw(SkCanvas* canvas) {
#Height 128
#Description
Conics and arcs use identical representations. As the arc sweep increases
- the conic weight also increases, but remains smaller than one.
+ the Conic_Weight also increases, but remains smaller than one.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -2817,7 +2821,7 @@ void draw(SkCanvas* canvas) {
control is Last_Point plus Vector (dx1, dy1).
end is Last_Point plus Vector (dx2, dy2).
- Function name stands for relative conic to.
+ Function name stands for "relative conic to".
#Param dx1 offset from Last_Point x to Conic control x ##
#Param dy1 offset from Last_Point x to Conic control y ##
@@ -2849,10 +2853,12 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Cubic
-#Substitute cubics
+#Alias Cubic
#Alias Cubics
+#Alias Cubic_Bezier
+#Alias Cubic_Beziers
-Cubic describes a cubic Bezier, a third-order curve.
+Cubic describes a Bezier curve segment described by a third-order polynomial.
Cubic begins at a start Point, curving towards the first control Point;
and curves from the end Point towards the second control Point.
@@ -2970,7 +2976,7 @@ to Point_Array.
control and Cubic end to Point_Array.
Cubic control is Last_Point plus Vector (dx1, dy1).
Cubic end is Last_Point plus Vector (dx2, dy2).
- Function name stands for relative cubic to.
+ Function name stands for "relative cubic to".
#Param x1 offset from Last_Point x to first Cubic control x ##
#Param y1 offset from Last_Point x to first Cubic control y ##
@@ -3335,7 +3341,7 @@ Arc sweep is always less than 180 degrees. If radius is zero, or if
tangents are nearly parallel, arcTo appends Line from last Path Point to (x1, y1).
arcTo appends at most one Line and one Conic.
-arcTo implements the functionality of PostScript_arct and HTML_Canvas_arcTo.
+arcTo implements the functionality of PostScript_Arct and HTML_Canvas_ArcTo.
#Param x1 x common to pair of tangents ##
#Param y1 y common to pair of tangents ##
@@ -3398,7 +3404,7 @@ Arc sweep is always less than 180 degrees. If radius is zero, or if
tangents are nearly parallel, arcTo appends Line from last Path Point to p1.
arcTo appends at most one Line and one Conic.
-arcTo implements the functionality of PostScript_arct and HTML_Canvas_arcTo.
+arcTo implements the functionality of PostScript_Arct and HTML_Canvas_ArcTo.
#Param p1 Point common to pair of tangents ##
#Param p2 end of second tangent ##
@@ -3499,7 +3505,7 @@ void draw(SkCanvas* canvas) {
#Method void arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
Direction sweep, SkScalar x, SkScalar y)
-Append Arc to Path. Arc is implemented by one or more Conic weighted to describe part of Oval
+Append Arc to Path. Arc is implemented by one or more Conics weighted to describe part of Oval
with radii (rx, ry) rotated by xAxisRotate degrees. Arc curves from last Path Point to (x, y),
choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.
@@ -3508,13 +3514,13 @@ or if last Path Point equals (x, y). arcTo scales radii (rx, ry) to fit last Pat
(x, y) if both are greater than zero but too small.
arcTo appends up to four Conic curves.
-arcTo implements the functionatlity of SVG_Arc, although SVG sweep-flag value is
-opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while kCW_Direction
+arcTo implements the functionality of SVG_Arc, although SVG "sweep-flag" value is
+opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while kCW_Direction
cast to int is zero.
#Param rx radius in x before x-axis rotation ##
#Param ry radius in y before x-axis rotation ##
-#Param xAxisRotate x-axis rotation in degrees; positve values are clockwise ##
+#Param xAxisRotate x-axis rotation in degrees; positive values are clockwise ##
#Param largeArc chooses smaller or larger Arc ##
#Param sweep chooses clockwise or counterclockwise Arc ##
#Param x end of Arc ##
@@ -3557,15 +3563,15 @@ and smaller or larger.
Arc sweep is always less than 360 degrees. arcTo appends Line to xy if either radii are zero,
or if last Path Point equals (x, y). arcTo scales radii r to fit last Path Point and
-xy if both are greater than zero but too small.
+xy if both are greater than zero but too small to describe an arc.
arcTo appends up to four Conic curves.
-arcTo implements the functionatlity of SVG_Arc, although SVG sweep-flag value is
-opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while kCW_Direction
-cast to int is zero.
+arcTo implements the functionality of SVG_Arc, although SVG "sweep-flag" value is
+opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while
+kCW_Direction cast to int is zero.
#Param r radii in x and y before x-axis rotation ##
-#Param xAxisRotate x-axis rotation in degrees; positve values are clockwise ##
+#Param xAxisRotate x-axis rotation in degrees; positive values are clockwise ##
#Param largeArc chooses smaller or larger Arc ##
#Param sweep chooses clockwise or counterclockwise Arc ##
#Param xy end of Arc ##
@@ -3594,8 +3600,8 @@ void draw(SkCanvas* canvas) {
Direction sweep, SkScalar dx, SkScalar dy)
Append Arc to Path, relative to last Path Point. Arc is implemented by one or
-more Conic, weighted to describe part of Oval with radii (r.fX, r.fY) rotated by
-xAxisRotate degrees. Arc curves from last Path Point (x0, y0) to
+more Conic, weighted to describe part of Oval with radii (rx, ry) rotated by
+xAxisRotate degrees. Arc curves from last Path Point (x0, y0) to end Point
#Formula
(x0 + dx, y0 + dy)
##
@@ -3603,18 +3609,19 @@ xAxisRotate degrees. Arc curves from last Path Point (x0, y0) to
counterclockwise, and smaller or larger. If Path is empty, the start Arc Point
is (0, 0).
-Arc sweep is always less than 360 degrees. arcTo appends Line to xy if either
-radii are zero, or if last Path Point equals (x, y). arcTo scales radii r to fit
-last Path Point and xy if both are greater than zero but too small.
+Arc sweep is always less than 360 degrees. arcTo appends Line to end Point
+if either radii are zero, or if last Path Point equals end Point.
+arcTo scales radii (rx, ry) to fit last Path Point and end Point if both are
+greater than zero but too small to describe an arc.
arcTo appends up to four Conic curves.
-arcTo implements the functionatlity of SVG_Arc, although SVG sweep-flag value is
-opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while
+arcTo implements the functionality of SVG_Arc, although SVG "sweep-flag" value is
+opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while
kCW_Direction cast to int is zero.
#Param rx radius in x before x-axis rotation ##
#Param ry radius in y before x-axis rotation ##
-#Param xAxisRotate x-axis rotation in degrees; positve values are clockwise ##
+#Param xAxisRotate x-axis rotation in degrees; positive values are clockwise ##
#Param largeArc chooses smaller or larger Arc ##
#Param sweep chooses clockwise or counterclockwise Arc ##
#Param dx x offset end of Arc from last Path Point ##
@@ -3645,7 +3652,7 @@ void draw(SkCanvas* canvas) {
#Method void close()
Append kClose_Verb to Path. A closed Contour connects the first and last Point
-with Line, forming a continous loop. Open and closed Contour draw the same
+with Line, forming a continuous loop. Open and closed Contour draw the same
with SkPaint::kFill_Style. With SkPaint::kStroke_Style, open Contour draws
Paint_Stroke_Cap at Contour start and end; closed Contour draws
Paint_Stroke_Join at Contour start and end.
@@ -3862,7 +3869,7 @@ void draw(SkCanvas* canvas) {
#Method bool isRect(SkRect* rect, bool* isClosed = nullptr, Direction* direction = nullptr) const
-Returns true if Path is eqivalent to Rect when filled.
+Returns true if Path is equivalent to Rect when filled.
If false: rect, isClosed, and direction are unchanged.
If true: rect, isClosed, and direction are written to if not nullptr.
@@ -4466,7 +4473,7 @@ Add Contour created from Line array, adding
#Formula
count - 1
##
-Line segments. Contour added starts at pt[0], then adds a line
+Line segments. Contour added starts at pts[0], then adds a line
for every additional Point in pts array. If close is true,
appends kClose_Verb to Path, connecting pts[count - 1] and pts[0].
@@ -5036,13 +5043,13 @@ for (int y = 2; y < 256; y += 9) {
#Method void dump(SkWStream* stream, bool forceClose, bool dumpAsHex) const
Writes text representation of Path to stream. If stream is nullptr, dump() writes to
-stdout. Set forceClose to true to get
+standard output. Set forceClose to true to get
edges used to fill Path. Set dumpAsHex true to get exact binary representations
of floating point numbers used in Point_Array and Conic_Weights.
#Param stream writable Stream receiving Path text representation; may be nullptr ##
#Param forceClose true if missing kClose_Verb is output ##
-#Param dumpAsHex true if SkScalar values are written as hexidecimal ##
+#Param dumpAsHex true if SkScalar values are written as hexadecimal ##
#Example
SkPath path;
@@ -5084,7 +5091,7 @@ path.close();
#Method void dump() const
-Writes text representation of Path to stdout. The representation may be
+Writes text representation of Path to standard output. The representation may be
directly compiled as C++ code. Floating point values are written
with limited precision; it may not be possible to reconstruct original Path
from output.
@@ -5113,7 +5120,7 @@ path is not equal to copy
#Method void dumpHex() const
-Writes text representation of Path to stdout. The representation may be
+Writes text representation of Path to standard output. The representation may be
directly compiled as C++ code. Floating point values are written
in hexadecimal to preserve their exact bit pattern. The output reconstructs the
original Path.
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 0be5a0f0c5..9a7c488d67 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -1,30 +1,24 @@
# external references that will be documented eventually ...
#External
- DirectWrite TrueType Windows Linux Android
+ DirectWrite TrueType Windows Linux Android iOS
FreeType FreeType-based Harfbuzz
- PostScript PostScript_arct
- OS_X Core_Graphics Core_Text iOS
+ Descenders Kerning Unhinted
LCD RGB
- Premultiplied Unpremultiplied
Unicode Unicode5 UTF-8 UTF-16 UTF-32 ASCII Unichar
- HTML_Canvas HTML_Canvas_arcTo
API
CPU
GPU GPU-backed OpenGL Vulkan
- NULL
RFC
Bezier Coons Cartesian
- C C++
+ C C++ Destructor Subclasses
SaveLayerFlags # not external; need to add typedef support
- SkUserConfig.h # not external, but still thinking about how markup refers to this
+ SkUserConfig # 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
SK_BUILD_FOR_ANDROID_FRAMEWORK # ditto
- Developer_Mode # ditto
- Draw_Layer # ditto
- Raster_Engine # ditto
+ SK_IGNORE_TO_STRING # ditto
# FreeType related
FT_LOAD_TARGET_LIGHT
@@ -36,8 +30,18 @@ FT_Load_Glyph
#External ##
+#Topic Alias
+#Alias Aliased
+#Alias Aliasing
+##
+
+#Topic Anti-alias
+#Alias Anti-aliased
+#Alias Anti-aliasing
+##
+
#Topic Arc
-#Substitute arcs
+#Alias Arcs
#Topic ##
#Topic BBH_Factory
@@ -64,7 +68,7 @@ FT_Load_Glyph
#Topic ##
#Topic Circle
-#Substitute circles
+#Alias Circles
#Topic ##
#Topic Clip_Op
@@ -103,18 +107,18 @@ FT_Load_Glyph
#Const SK_ColorWHITE 0xFFFFFFFF
##
#Subtopic Alpha
- #Substitute alpha
+ #Alias Alpha
#Subtopic ##
#Subtopic RGB
#Substitute RGB
#Subtopic Red
- #Substitute red
+ #Alias Red
#Subtopic ##
#Subtopic Blue
- #Substitute blue
+ #Alias Blue
#Subtopic ##
#Subtopic Green
- #Substitute green
+ #Alias Green
#Subtopic ##
#Subtopic ##
#Subtopic ARGB
@@ -139,6 +143,14 @@ FT_Load_Glyph
#Topic Color_Space
##
+#Topic Core_Graphics
+#Substitute Core Graphics
+##
+
+#Topic Core_Text
+#Substitute Core Text
+##
+
#Topic Curve
#Alias Curves
##
@@ -166,6 +178,9 @@ FT_Load_Glyph
##
##
+#Topic Draw_Layer
+##
+
#Topic Draw_Looper
#Class SkDrawLooper
#Class ##
@@ -207,6 +222,7 @@ FT_Load_Glyph
#Topic ##
#Topic Glyph
+#Alias Glyphs
##
#Topic GPU_Context
@@ -217,6 +233,13 @@ FT_Load_Glyph
#Substitute GPU surface
##
+#Topic HTML_Canvas
+ #Substitute HTML Canvas
+ #Subtopic ArcTo
+ #Substitute HTML Canvas arcTo
+ ##
+##
+
#Topic Image
#Subtopic Alpha_Type
#Enum SkAlphaType
@@ -277,8 +300,10 @@ FT_Load_Glyph
##
##
+#Topic Left_Side_Bearing
+##
+
#Topic Line
-#Substitute lines
#Alias Lines
#Topic ##
@@ -324,8 +349,12 @@ FT_Load_Glyph
#Typedef ##
#Topic ##
+#Topic OS_X
+#Substitute OS X
+##
+
#Topic Oval
-#Substitute ovals
+#Alias Ovals
#Topic ##
#Topic Paint_Defaults
@@ -340,7 +369,7 @@ FT_Load_Glyph
#Topic ##
#Topic Patch
-#Substitute patches
+#Alias Patches
#Topic ##
#Topic Path_Effect
@@ -395,6 +424,20 @@ FT_Load_Glyph
#Subtopic ##
#Topic ##
+#Topic PostScript
+#Substitute PostScript
+#Subtopic Arct
+#Substitute PostScript arct
+##
+##
+
+#Topic Premultiply
+#Alias Premultiplied
+##
+
+#Topic Raster_Engine
+##
+
#Topic Raster_Handle_Allocator
#Class SkRasterHandleAllocator
#Struct Rec
@@ -437,6 +480,9 @@ FT_Load_Glyph
##
#Topic ##
+#Topic Right_Side_Bearing
+##
+
#Topic Round_Rect
#Class SkRRect
#Method void dump() const
@@ -466,7 +512,7 @@ FT_Load_Glyph
#Topic ##
#Topic Sprite
-#Substitute sprites
+#Alias Sprites
#Topic ##
#Topic Stream
@@ -479,6 +525,9 @@ FT_Load_Glyph
#Class ##
#Topic ##
+#Topic Supersampling
+##
+
#Topic Surface
#Class SkSurface
#Method static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo&, void* pixels, size_t rowBytes,
@@ -517,13 +566,16 @@ FT_Load_Glyph
#Class ##
#Topic ##
+#Topic Unpremultiply
+#Alias Unpremultiplied
+##
+
#Topic Vector
#Struct SkVector
##
##
#Topic Vertices
-#Substitute vertices
#Subtopic Colors
##
#Subtopic Texs
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index a4a83ddfc3..1848816aff 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -17,7 +17,7 @@ Request <a href="#Canvas">Canvas</a> from <a href="undocumented#Surface">Surface
<a href="#Canvas">Canvas</a> generated by <a href="undocumented#GPU_Surface">GPU Surface</a> uses <a href="undocumented#Vulkan">Vulkan</a> or <a href="undocumented#OpenGL">OpenGL</a> to draw to the <a href="undocumented#GPU">GPU</a>.
To draw to a document, obtain <a href="#Canvas">Canvas</a> from <a href="#Canvas">SVG Canvas</a>, <a href="#PDF">Document PDF</a>, or <a href="#Recorder">Picture Recorder</a>.
-Document-based <a href="#Canvas">Canvas</a> and other <a href="#Canvas">Canvas</a> subclasses reference <a href="undocumented#Device">Device</a> describing the
+<a href="undocumented#Document">Document</a> based <a href="#Canvas">Canvas</a> and other <a href="#Canvas">Canvas</a> <a href="undocumented#Subclasses">Subclasses</a> reference <a href="undocumented#Device">Device</a> describing the
destination.
<a href="#Canvas">Canvas</a> can be constructed to draw to <a href="undocumented#Bitmap">Bitmap</a> without first creating <a href="undocumented#Raster_Surface">Raster Surface</a>.
@@ -46,7 +46,7 @@ This approach may be deprecated in the future.
| struct | description |
| --- | --- |
| <a href="#SkCanvas_Lattice">Lattice</a> | Divides <a href="undocumented#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a> into a rectangular grid. |
-| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | Contains state to create the layer offscreen. |
+| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | Contains state to create <a href="#Layer">Layer</a>. |
## <a name="Constructors"></a> Constructors
@@ -95,7 +95,7 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_drawLine">drawLine</a> | Draws line segment between two points. |
| <a href="#SkCanvas_drawOval">drawOval</a> | Draws <a href="undocumented#Oval">Oval</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawPaint">drawPaint</a> | Fills <a href="#Clip">Clip</a> with <a href="SkPaint_Reference#Paint">Paint</a>. |
-| <a href="#SkCanvas_drawPatch">drawPatch</a> | Draws cubic <a href="undocumented#Coons">Coons</a> patch. |
+| <a href="#SkCanvas_drawPatch">drawPatch</a> | Draws <a href="undocumented#Coons">Coons</a> patch. |
| <a href="#SkCanvas_drawPath">drawPath</a> | Draws <a href="SkPath_Reference#Path">Path</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawPicture">drawPicture</a> | Draws <a href="undocumented#Picture">Picture</a> using <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_drawPoint">drawPoint</a> | Draws point at (x, y) position. |
@@ -114,7 +114,7 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_drawString">drawString</a> | Draws null terminated string at (x, y) using font advance. |
| <a href="#SkCanvas_drawVertices">drawVertices</a> | Draws <a href="undocumented#Vertices">Vertices</a>, a triangle mesh. |
| <a href="#SkCanvas_flush">flush</a> | Triggers execution of all pending draw operations. |
-| <a href="#SkCanvas_getBaseLayerSize">getBaseLayerSize</a> | Gets size of base layer in global coordinates. |
+| <a href="#SkCanvas_getBaseLayerSize">getBaseLayerSize</a> | Gets size of base <a href="#Layer">Layer</a> in global coordinates. |
| <a href="#SkCanvas_getDeviceClipBounds">getDeviceClipBounds</a> | Returns <a href="undocumented#IRect">IRect</a> bounds of <a href="#Clip">Clip</a>. |
| <a href="#SkCanvas_getDrawFilter">getDrawFilter</a> | Legacy; to be deprecated. |
| <a href="#SkCanvas_getGrContext">getGrContext</a> | Returns <a href="undocumented#GPU_Context">GPU Context</a> of the <a href="undocumented#GPU_Surface">GPU Surface</a>. |
@@ -137,15 +137,14 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_restoreToCount">restoreToCount</a> | Restores changes to <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> to given depth. |
| <a href="#SkCanvas_rotate">rotate</a> | Rotates <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_save">save</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack. |
-| <a href="#SkCanvas_saveLayer">saveLayer</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates offscreen. |
-| <a href="#SkCanvas_saveLayerAlpha">saveLayerAlpha</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates offscreen; sets opacity. |
-| <a href="#SkCanvas_saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates offscreen for <a href="undocumented#LCD">LCD</a> text. |
+| <a href="#SkCanvas_saveLayer">saveLayer</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates <a href="#Layer">Layer</a>. |
+| <a href="#SkCanvas_saveLayerAlpha">saveLayerAlpha</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates <a href="#Layer">Layer</a>; sets opacity. |
+| <a href="#SkCanvas_saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a> | Saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates <a href="#Layer">Layer</a> for <a href="undocumented#LCD">LCD</a> text. |
| <a href="#SkCanvas_scale">scale</a> | Scales <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_setAllowSimplifyClip">setAllowSimplifyClip</a> | Experimental. |
| <a href="#SkCanvas_setDrawFilter">setDrawFilter</a> | Legacy; to be deprecated. |
| <a href="#SkCanvas_setMatrix">setMatrix</a> | Sets <a href="#Matrix">Matrix</a>. |
-| <a href="#SkCanvas_skew">skew</a> | Skews <a href="#Matrix">Matrix</a>. |
-| <a href="#SkCanvas_translate">translate</a> | Translates <a href="#Matrix">Matrix</a>. |
+| <a href="#SkCanvas_skew">skew</a> | Skews <a href="#Matrix">Matrix</a>. | <a href="#SkCanvas_translate">translate</a> | Translates <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_writePixels">writePixels</a> | Copies and converts rectangle of pixels to <a href="#Canvas">Canvas</a>. |
<a name="SkCanvas_MakeRasterDirect"></a>
@@ -190,7 +189,7 @@ interval from one <a href="undocumented#Surface">Surface</a> row to the next, or
### Example
-<div><fiddle-embed name="30839f66c2d267e021d0cabb81ef1123"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
+<div><fiddle-embed name="11be884b8b4213a450b6dc43673bf807"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
in the center.</div>
#### Example Output
@@ -230,7 +229,7 @@ Valid parameters include:
<a href="#SkCanvas_MakeRasterDirectN32_pixels">pixels</a> is not nullptr;
<a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> is zero or large enough to contain <a href="#SkCanvas_MakeRasterDirectN32_width">width</a> <a href="#SkCanvas_MakeRasterDirectN32_pixels">pixels</a> of <a href="undocumented#SkColorType">kN32 SkColorType</a>.
-Pass zero for <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> to compute <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> from fo <a href="#SkCanvas_MakeRasterDirectN32_width">width</a> and size of pixel.
+Pass zero for <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> to compute <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> from <a href="#SkCanvas_MakeRasterDirectN32_width">width</a> and size of pixel.
If <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> is greater than zero, it must be equal to or greater than
<a href="#SkCanvas_MakeRasterDirectN32_width">width</a> times bytes required for <a href="#Color_Type">Image Color Type</a>.
@@ -256,7 +255,7 @@ interval from one <a href="undocumented#Surface">Surface</a> row to the next, or
### Example
-<div><fiddle-embed name="bc8d576bf09358cf0e972b72efba936c"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
+<div><fiddle-embed name="93010950fe3540f7427d8ff82dc5562a"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
in the center.</div>
#### Example Output
@@ -309,7 +308,7 @@ SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr)
</pre>
Creates <a href="#Canvas">Canvas</a> of the specified dimensions without a <a href="undocumented#Surface">Surface</a>.
-Used by subclasses with custom implementations for draw methods.
+Used by <a href="undocumented#Subclasses">Subclasses</a> with custom implementations for draw methods.
If <a href="#SkCanvas_int_int_const_SkSurfaceProps_star_props">props</a> equals nullptr, <a href="#Properties">Surface Properties</a> are created with <a href="#Properties_Legacy_Font_Host">Surface Properties Legacy Font Host</a> settings,
which choose the pixel striping direction and order. Since a platform may dynamically
@@ -407,7 +406,7 @@ storage of <a href="undocumented#Raster_Surface">Raster Surface</a></td>
### Example
-<div><fiddle-embed name="cc6d6fd6d9aa98b12984e11ef52172ec"><div>The actual output depends on the installed fonts.</div>
+<div><fiddle-embed name="93082df2fb33ca62202dc047532b3861"><div>The actual output depends on the installed fonts.</div>
#### Example Output
@@ -497,7 +496,7 @@ device independent fonts</td>
### Example
-<div><fiddle-embed name="5ddec03684bb09f94b016dc205cb173b"><div>The actual output depends on the installed fonts.</div>
+<div><fiddle-embed name="216c9cd6ec6a8fa48135d792a7003572"><div>The actual output depends on the installed fonts.</div>
#### Example Output
@@ -526,14 +525,14 @@ device independent fonts</td>
virtual ~SkCanvas()
</pre>
-Draw saved layers, if any.
+Draw saved <a href="#Layer">Layers</a>, if any.
Free up resources used by <a href="#Canvas">Canvas</a>.
### Example
-<div><fiddle-embed name="b7bc91ff16c9b9351b2a127f35394b82"><div><a href="#Canvas">Canvas</a> offscreen draws into bitmap. <a href="#SkCanvas_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
+<div><fiddle-embed name="b7bc91ff16c9b9351b2a127f35394b82"><div><a href="#Canvas">Canvas</a> <a href="#Layer">Layer</a> draws into bitmap. <a href="#SkCanvas_saveLayerAlpha">saveLayerAlpha</a> sets up an additional
+drawing surface that blends with the bitmap. When <a href="#Layer">Layer</a> goes out of
+scope, <a href="#Layer">Layer</a> <a href="undocumented#Destructor">Destructor</a> is called. The saved <a href="#Layer">Layer</a> is restored, drawing
transparent letters.</div></fiddle-embed></div>
### See Also
@@ -660,13 +659,13 @@ If <a href="#Canvas">Canvas</a> is associated with <a href="undocumented#GPU_Sur
virtual SkISize getBaseLayerSize() const
</pre>
-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 <a href="#Layer">Layer</a> in global canvas coordinates. The
+origin of the base <a href="#Layer">Layer</a> is always (0,0). The area available for drawing may be
smaller (due to clipping or <a href="#SkCanvas_saveLayer">saveLayer</a>).
### Return Value
-integral width and height of base layer
+integral width and height of base <a href="#Layer">Layer</a>
### Example
@@ -766,7 +765,7 @@ storage for writable pixels' <a href="#Info">Image Info</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_accessTopLayerPixels_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
storage for writable pixels' row bytes; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_accessTopLayerPixels_origin"> <code><strong>origin </strong></code> </a></td> <td>
-storage for <a href="#Canvas">Canvas</a> top layer <a href="#SkCanvas_accessTopLayerPixels_origin">origin</a>, its top left corner;
+storage for <a href="#Canvas">Canvas</a> top <a href="#Layer">Layer</a> <a href="#SkCanvas_accessTopLayerPixels_origin">origin</a>, its top left corner;
may be nullptr</td>
</tr>
</table>
@@ -781,11 +780,11 @@ address of pixels, or nullptr if inaccessible
### Example
-<div><fiddle-embed name="a7ac9c21bbabcdeeca00f72a61cd0f3e"><div>Draws "" on the device. Then draws "" in an offscreen layer, and reads the
-offscreen to add a large dotted "". Finally blends the offscreen with the
+<div><fiddle-embed name="a7ac9c21bbabcdeeca00f72a61cd0f3e"><div>Draws "" on the device. Then draws "" in <a href="#Layer">Layer</a>, and reads
+<a href="#Layer">Layer</a> to add a large dotted "". Finally blends <a href="#Layer">Layer</a> with the
device.
-The offscreen and blended result appear on the <a href="undocumented#CPU">CPU</a> and <a href="undocumented#GPU">GPU</a> but the large dotted
+The <a href="#Layer">Layer</a> and blended result appear on the <a href="undocumented#CPU">CPU</a> and <a href="undocumented#GPU">GPU</a> but the large dotted
"" appear only on the <a href="undocumented#CPU">CPU</a>.</div></fiddle-embed></div>
---
@@ -800,13 +799,13 @@ SkRasterHandleAllocator::Handle accessTopRasterHandle() const
Returns custom context that tracks the <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a>.
Use <a href="undocumented#Raster_Handle_Allocator">Raster Handle Allocator</a> to blend <a href="undocumented#Skia">Skia</a> 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
<a href="#SkRasterHandleAllocator_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 allocation
### Example
@@ -878,9 +877,8 @@ bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
</pre>
Copies rectangle of pixels from <a href="#Canvas">Canvas</a> into <a href="#SkCanvas_readPixels_dstPixels">dstPixels</a>. <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> are
-ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_srcX">srcX</a>, <a href="#SkCanvas_readPixels_srcY">srcY</a>) and
-(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
-Destination rectangle corners are (0, 0) and (<a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.width(), <a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.height()).
+ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_srcX">srcX</a>, <a href="#SkCanvas_readPixels_srcY">srcY</a>) and(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
+Destination rectangle corners are (0, 0) and(<a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.width(), <a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.height()).
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.colorType() and <a href="#SkCanvas_readPixels_dstInfo">dstInfo</a>.alphaType() if required.
@@ -929,15 +927,15 @@ true if pixels were copied
<div><fiddle-embed name="2964297993747769b0760874c19e0168"><div>A black circle drawn on a blue background provides an image to copy.
<a href="#SkCanvas_readPixels">readPixels</a> copies one quarter of the canvas into each of the four corners.
-The offscreen draws over the image.</div></fiddle-embed></div>
+The <a href="#Layer">Layer</a> draws over the image.</div></fiddle-embed></div>
### Example
-<div><fiddle-embed name="481e990e923a0ed34654f4361b94f096"><div><a href="#Canvas">Canvas</a> returned by <a href="undocumented#Raster_Surface">Raster Surface</a> has premultiplied pixel values.
-<a href="#SkCanvas_clear">clear</a> takes unpremultiplied input with <a href="#Alpha">Color Alpha</a> equal 0x80
-and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multipled by <a href="#Alpha">Color Alpha</a>
-to generate premultipled value 0x802B5580. <a href="#SkCanvas_readPixels">readPixels</a> converts pixel back
-to unpremultipled value 0x8056A9FF, introducing error.</div>
+<div><fiddle-embed name="481e990e923a0ed34654f4361b94f096"><div><a href="#Canvas">Canvas</a> returned by <a href="undocumented#Raster_Surface">Raster Surface</a> has <a href="#Premultiply">Premultiplied</a> pixel values.
+<a href="#SkCanvas_clear">clear</a> takes <a href="#Unpremultiply">Unpremultiplied</a> input with <a href="#Alpha">Color Alpha</a> equal 0x80
+and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multiplied by <a href="#Alpha">Color Alpha</a>
+to generate <a href="#Premultiply">Premultiplied</a> value 0x802B5580. <a href="#SkCanvas_readPixels">readPixels</a> converts pixel back
+to <a href="#Unpremultiply">Unpremultiplied</a> value 0x8056A9FF, introducing error.</div>
#### Example Output
@@ -959,9 +957,8 @@ bool readPixels(const SkPixmap& pixmap, int srcX, int srcY)
</pre>
Copies rectangle of pixels from <a href="#Canvas">Canvas</a> into <a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>. <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> are
-ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_2_srcX">srcX</a>, <a href="#SkCanvas_readPixels_2_srcY">srcY</a>) and
-(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
-Destination rectangle are (0, 0) and (<a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.width(), <a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.height()).
+ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_2_srcX">srcX</a>, <a href="#SkCanvas_readPixels_2_srcY">srcY</a>) and(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
+Destination rectangle are (0, 0) and(<a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.width(), <a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.height()).
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.colorType() and <a href="#SkCanvas_readPixels_2_pixmap">pixmap</a>.alphaType() if required.
@@ -1005,9 +1002,9 @@ true if pixels were copied
### Example
-<div><fiddle-embed name="85f199032943b6483722c34a91c4e20f"><div><a href="#SkCanvas_clear">clear</a> takes unpremultiplied input with <a href="#Alpha">Color Alpha</a> equal 0x80
-and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multipled by <a href="#Alpha">Color Alpha</a>
-to generate premultipled value 0x802B5580.</div>
+<div><fiddle-embed name="85f199032943b6483722c34a91c4e20f"><div><a href="#SkCanvas_clear">clear</a> takes <a href="#Unpremultiply">Unpremultiplied</a> input with <a href="#Alpha">Color Alpha</a> equal 0x80
+and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multiplied by <a href="#Alpha">Color Alpha</a>
+to generate <a href="#Premultiply">Premultiplied</a> value 0x802B5580.</div>
#### Example Output
@@ -1028,8 +1025,7 @@ bool readPixels(const SkBitmap& bitmap, int srcX, int srcY)
</pre>
Copies rectangle of pixels from <a href="#Canvas">Canvas</a> into <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>. <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> are
-ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_3_srcX">srcX</a>, <a href="#SkCanvas_readPixels_3_srcY">srcY</a>) and
-(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
+ignored. Source rectangle corners are (<a href="#SkCanvas_readPixels_3_srcX">srcX</a>, <a href="#SkCanvas_readPixels_3_srcY">srcY</a>) and(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
Destination rectangle corners are (0, 0) and (<a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>.width(), <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>.height()).
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>.colorType() and <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>.alphaType() if required.
@@ -1074,9 +1070,9 @@ true if pixels were copied
### Example
-<div><fiddle-embed name="af6dec8ef974aa67bf102f29915bcd6a"><div><a href="#SkCanvas_clear">clear</a> takes unpremultiplied input with <a href="#Alpha">Color Alpha</a> equal 0x80
-and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multipled by <a href="#Alpha">Color Alpha</a>
-to generate premultipled value 0x802B5580.</div>
+<div><fiddle-embed name="af6dec8ef974aa67bf102f29915bcd6a"><div><a href="#SkCanvas_clear">clear</a> takes <a href="#Unpremultiply">Unpremultiplied</a> input with <a href="#Alpha">Color Alpha</a> equal 0x80
+and <a href="#RGB">Color RGB</a> equal 0x55, 0xAA, 0xFF. <a href="#RGB">Color RGB</a> is multiplied by <a href="#Alpha">Color Alpha</a>
+to generate <a href="#Premultiply">Premultiplied</a> value 0x802B5580.</div>
#### Example Output
@@ -1102,10 +1098,9 @@ bool writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes,
Copies rectangle from <a href="#SkCanvas_writePixels_pixels">pixels</a> to <a href="#Canvas">Canvas</a>. <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> are ignored.
Source rectangle corners are (0, 0) and (<a href="#SkCanvas_writePixels_info">info</a>.width(), <a href="#SkCanvas_writePixels_info">info</a>.height()).
-Destination rectangle corners are (<a href="#SkCanvas_writePixels_x">x</a>, <a href="#SkCanvas_writePixels_y">y</a>) and
-(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()). Copies each readable pixel
-intersecting both rectangles, without scaling, converting to
-this-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType() and this-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType() if required.
+Destination rectangle corners are (<a href="#SkCanvas_writePixels_x">x</a>, <a href="#SkCanvas_writePixels_y">y</a>) and(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
+Copies each readable pixel
+intersecting both rectangles, without scaling, converting tothis-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType()andthis-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType()if required.
Pixels are writable when <a href="undocumented#Device">Device</a> is raster, or backed by a <a href="undocumented#GPU">GPU</a>.
Pixels are not writable when <a href="#SkCanvas">SkCanvas</a> is returned by <a href="#SkDocument_beginPage">SkDocument::beginPage</a>,
@@ -1123,7 +1118,7 @@ Does not copy, and returns false if:
<table> <tr>
<td>Source and destination rectangles do not intersect.</td> </tr> <tr>
- <td><a href="#SkCanvas_writePixels_pixels">pixels</a> could not be converted to this-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType() or this-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType().</td> </tr> <tr>
+ <td><a href="#SkCanvas_writePixels_pixels">pixels</a> could not be converted tothis-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType()orthis-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType().</td> </tr> <tr>
<td><a href="#Canvas">Canvas</a> <a href="#SkCanvas_writePixels_pixels">pixels</a> are not writable; for instance, <a href="#Canvas">Canvas</a> is document-based.</td> </tr> <tr>
<td><a href="#SkCanvas_writePixels_rowBytes">rowBytes</a> is too small to contain one row of <a href="#SkCanvas_writePixels_pixels">pixels</a>.</td> </tr>
</table>
@@ -1162,11 +1157,11 @@ bool writePixels(const SkBitmap& bitmap, int x, int y)
</pre>
Copies rectangle from pixels to <a href="#Canvas">Canvas</a>. <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> are ignored.
-Source rectangle corners are (0, 0) and (<a href="#SkCanvas_writePixels_2_bitmap">bitmap</a>.width(), <a href="#SkCanvas_writePixels_2_bitmap">bitmap</a>.height()).
-Destination rectangle corners are (<a href="#SkCanvas_writePixels_2_x">x</a>, <a href="#SkCanvas_writePixels_2_y">y</a>) and
-(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()). Copies each readable pixel
-intersecting both rectangles, without scaling, converting to
-this-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType() and this-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType() if required.
+Source rectangle corners are (0, 0) and(<a href="#SkCanvas_writePixels_2_bitmap">bitmap</a>.width(), <a href="#SkCanvas_writePixels_2_bitmap">bitmap</a>.height()).
+
+Destination rectangle corners are (<a href="#SkCanvas_writePixels_2_x">x</a>, <a href="#SkCanvas_writePixels_2_y">y</a>) and(this-><a href="#SkCanvas_imageInfo">imageInfo</a>.width(), this-><a href="#SkCanvas_imageInfo">imageInfo</a>.height()).
+Copies each readable pixel
+intersecting both rectangles, without scaling, converting tothis-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType()andthis-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType()if required.
Pixels are writable when <a href="undocumented#Device">Device</a> is raster, or backed by a <a href="undocumented#GPU">GPU</a>.
Pixels are not writable when <a href="#SkCanvas">SkCanvas</a> is returned by <a href="#SkDocument_beginPage">SkDocument::beginPage</a>,
@@ -1185,8 +1180,8 @@ Does not copy, and returns false if:
<table> <tr>
<td>Source and destination rectangles do not intersect.</td> </tr> <tr>
<td><a href="#SkCanvas_writePixels_2_bitmap">bitmap</a> does not have allocated pixels.</td> </tr> <tr>
- <td><a href="#SkCanvas_writePixels_2_bitmap">bitmap</a> pixels could not be converted to this-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType() or this-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType().</td> </tr> <tr>
- <td><a href="#Canvas">Canvas</a> pixels are not writable; for instance, <a href="#Canvas">Canvas</a> is document-based.</td> </tr> <tr>
+ <td><a href="#SkCanvas_writePixels_2_bitmap">bitmap</a> pixels could not be converted tothis-><a href="#SkCanvas_imageInfo">imageInfo</a>.colorType()orthis-><a href="#SkCanvas_imageInfo">imageInfo</a>.alphaType().</td> </tr> <tr>
+ <td><a href="#Canvas">Canvas</a> pixels are not writable; for instance, <a href="#Canvas">Canvas</a> is document based.</td> </tr> <tr>
<td><a href="#SkCanvas_writePixels_2_bitmap">bitmap</a> pixels are inaccessible; for instance, <a href="#SkCanvas_writePixels_2_bitmap">bitmap</a> wraps a texture.</td> </tr>
</table>
@@ -1278,16 +1273,100 @@ the red square is not translated, and is drawn at the origin.</div></fiddle-embe
---
-## <a name="Layer"></a> Layer
+<a name="SkCanvas_restore"></a>
+## restore
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void restore()
+</pre>
+
+Removes changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> since <a href="#Canvas">Canvas</a> state was
+last saved. The state is removed from the stack.
+
+Does nothing if the stack is empty.
+
+### Example
+
+<div><fiddle-embed name="e78471212a67f2f4fd39496e17a30d17"></fiddle-embed></div>
+
+---
+
+<a name="SkCanvas_getSaveCount"></a>
+## getSaveCount
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int getSaveCount() const
+</pre>
+
+Returns the number of saved states, each containing: <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>.
+Equals the number of <a href="#SkCanvas_save">save</a> calls less the number of <a href="#SkCanvas_restore">restore</a> calls plus one.
+The <a href="#SkCanvas_save">save</a> count of a new canvas is one.
+
+### Return Value
+
+depth of <a href="#SkCanvas_save">save</a> state stack
+
+### Example
+
+<div><fiddle-embed name="005f2b207e078baac596681924fe591e">
+
+#### Example Output
+
+~~~~
+depth = 1
+depth = 2
+depth = 1
+~~~~
+
+</fiddle-embed></div>
+
+---
+
+<a name="SkCanvas_restoreToCount"></a>
+## restoreToCount
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void restoreToCount(int saveCount)
+</pre>
+
+Restores state to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> values when <a href="#SkCanvas_save">save</a>, <a href="#SkCanvas_saveLayer">saveLayer</a>,
+<a href="#SkCanvas_saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a>, or <a href="#SkCanvas_saveLayerAlpha">saveLayerAlpha</a> returned <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a>.
-<a href="#State_Stack_Layer">Layer</a> allocates a temporary offscreen <a href="undocumented#Bitmap">Bitmap</a> to draw into. When the drawing is
+Does nothing if <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a> is greater than state stack count.
+Restores state to initial values if <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a> is less than or equal to one.
+
+### Parameters
+
+<table> <tr> <td><a name="SkCanvas_restoreToCount_saveCount"> <code><strong>saveCount </strong></code> </a></td> <td>
+depth of state stack to <a href="#SkCanvas_restore">restore</a></td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="9ed0d56436e114c7097fd49eed1aea47">
+
+#### Example Output
+
+~~~~
+depth = 1
+depth = 3
+depth = 1
+~~~~
+
+</fiddle-embed></div>
+
+---
+
+# <a name="Layer"></a> Layer
+<a href="#Layer">Layer</a> allocates a temporary <a href="undocumented#Bitmap">Bitmap</a> to draw into. When the drawing is
complete, the <a href="undocumented#Bitmap">Bitmap</a> is drawn into the <a href="#Canvas">Canvas</a>.
-<a href="#State_Stack_Layer">Layer</a> is saved in a stack along with other saved state. When state with a <a href="#State_Stack_Layer">Layer</a>
-is restored, the offscreen <a href="undocumented#Bitmap">Bitmap</a> is drawn into the previous layer.
+<a href="#Layer">Layer</a> is saved in a stack along with other saved state. When state with a <a href="#Layer">Layer</a>
+is restored, the <a href="undocumented#Bitmap">Bitmap</a> is drawn into the previous <a href="#Layer">Layer</a>.
-<a href="#State_Stack_Layer">Layer</a> may be initialized with the contents of the previous layer. When <a href="#State_Stack_Layer">Layer</a> is
-restored, its <a href="undocumented#Bitmap">Bitmap</a> can be modified by <a href="SkPaint_Reference#Paint">Paint</a> passed to <a href="#State_Stack_Layer">Layer</a> to apply
+<a href="#Layer">Layer</a> may be initialized with the contents of the previous <a href="#Layer">Layer</a>. When <a href="#Layer">Layer</a> is
+restored, its <a href="undocumented#Bitmap">Bitmap</a> can be modified by <a href="SkPaint_Reference#Paint">Paint</a> passed to <a href="#Layer">Layer</a> to apply
<a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>.
<a name="SkCanvas_saveLayer"></a>
@@ -1298,15 +1377,15 @@ int saveLayer(const SkRect* bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates an offscreen <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and draws the offscreen bitmap.
+and draws the <a href="undocumented#Bitmap">Bitmap</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to
+<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_bounds">bounds</a> suggests but does not define the <a href="undocumented#Bitmap">Bitmap</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayer_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1317,9 +1396,9 @@ Call <a href="#SkCanvas_restoreToCount">restoreToCount</a> with returned value t
### Parameters
<table> <tr> <td><a name="SkCanvas_saveLayer_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-hint to limit the size of the offscreen; may be nullptr</td>
+hint to limit the size of the <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_saveLayer_paint"> <code><strong>paint </strong></code> </a></td> <td>
-graphics state for offscreen; may be nullptr</td>
+graphics state for <a href="#Layer">Layer</a>; may be nullptr</td>
</tr>
</table>
@@ -1329,7 +1408,7 @@ depth of saved stack
### Example
-<div><fiddle-embed name="05f9b6fa6b5007aea89dfe66c306855d"><div>Rectangles are blurred by <a href="undocumented#Image_Filter">Image Filter</a> when <a href="#SkCanvas_restore">restore</a> draws offscreen to main
+<div><fiddle-embed name="05f9b6fa6b5007aea89dfe66c306855d"><div>Rectangles are blurred by <a href="undocumented#Image_Filter">Image Filter</a> when <a href="#SkCanvas_restore">restore</a> draws <a href="#Layer">Layer</a> to main
<a href="#Canvas">Canvas</a>.</div></fiddle-embed></div>
---
@@ -1339,15 +1418,15 @@ int saveLayer(const SkRect& bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates an offscreen <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and draws the offscreen <a href="undocumented#Bitmap">Bitmap</a>.
+and draws the <a href="undocumented#Bitmap">Bitmap</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_2_bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to
+<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_2_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayer_2_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1358,9 +1437,9 @@ Call <a href="#SkCanvas_restoreToCount">restoreToCount</a> with returned value t
### Parameters
<table> <tr> <td><a name="SkCanvas_saveLayer_2_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-hint to limit the size of the offscreen; may be nullptr</td>
+hint to limit the size of <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_saveLayer_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
-graphics state for offscreen; may be nullptr</td>
+graphics state for <a href="#Layer">Layer</a>; may be nullptr</td>
</tr>
</table>
@@ -1370,9 +1449,9 @@ depth of saved stack
### Example
-<div><fiddle-embed name="812f3c8f8b93e8c7e55528c7a22887bf"><div>Rectangles are blurred by <a href="undocumented#Image_Filter">Image Filter</a> when <a href="#SkCanvas_restore">restore</a> draws offscreen to main <a href="#Canvas">Canvas</a>.
-The red rectangle is clipped; it does not fully fit on the offscreen <a href="#Canvas">Canvas</a>.
-<a href="undocumented#Image_Filter">Image Filter</a> blurs past edge of offscreen so red rectangle is blurred on all sides.</div></fiddle-embed></div>
+<div><fiddle-embed name="812f3c8f8b93e8c7e55528c7a22887bf"><div>Rectangles are blurred by <a href="undocumented#Image_Filter">Image Filter</a> when <a href="#SkCanvas_restore">restore</a> draws <a href="#Layer">Layer</a> to main <a href="#Canvas">Canvas</a>.
+The red rectangle is clipped; it does not fully fit on <a href="#Layer">Layer</a>.
+<a href="undocumented#Image_Filter">Image Filter</a> blurs past edge of <a href="#Layer">Layer</a> so red rectangle is blurred on all sides.</div></fiddle-embed></div>
---
@@ -1384,16 +1463,16 @@ int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates an offscreen bitmap for subsequent drawing.
-<a href="SkPaint_Reference#LCD_Text">LCD Text</a> is preserved when the offscreen is drawn to the prior layer.
+and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+<a href="SkPaint_Reference#LCD_Text">LCD Text</a> is preserved when the <a href="#Layer">Layer</a> is drawn to the prior <a href="#Layer">Layer</a>.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and draws the offscreen bitmap.
+and draws <a href="#Layer">Layer</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to
+<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1402,15 +1481,15 @@ Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLaye
Call <a href="#SkCanvas_restoreToCount">restoreToCount</a> with returned value to <a href="#SkCanvas_restore">restore</a> this and subsequent saves.
Draw text on an opaque background so that <a href="SkPaint_Reference#LCD_Text">LCD Text</a> blends correctly with the
-prior layer. <a href="SkPaint_Reference#LCD_Text">LCD Text</a> drawn on a background with transparency may result in
+prior <a href="#Layer">Layer</a>. <a href="SkPaint_Reference#LCD_Text">LCD Text</a> drawn on a background with transparency may result in
incorrect banding.
### Parameters
<table> <tr> <td><a name="SkCanvas_saveLayerPreserveLCDTextRequests_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-hint to limit the size of the offscreen; may be nullptr</td>
+hint to limit the size of <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_saveLayerPreserveLCDTextRequests_paint"> <code><strong>paint </strong></code> </a></td> <td>
-graphics state for offscreen; may be nullptr</td>
+graphics state for <a href="#Layer">Layer</a>; may be nullptr</td>
</tr>
</table>
@@ -1432,16 +1511,16 @@ int saveLayerAlpha(const SkRect* bounds, U8CPU alpha)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates an offscreen bitmap for subsequent drawing.
+and allocates <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and blends the offscreen bitmap with <a href="#SkCanvas_saveLayerAlpha_alpha">alpha</a> opacity onto the prior layer.
+and blends <a href="#Layer">Layer</a> with <a href="#SkCanvas_saveLayerAlpha_alpha">alpha</a> opacity onto prior <a href="#Layer">Layer</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerAlpha_bounds">bounds</a> suggests but does not define the offscreen size. To clip drawing to
+<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerAlpha_bounds">bounds</a> suggests but does not define <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
<a href="#SkCanvas_saveLayerAlpha_alpha">alpha</a> of zero is fully transparent, 255 is fully opaque.
@@ -1451,9 +1530,9 @@ Call <a href="#SkCanvas_restoreToCount">restoreToCount</a> with returned value t
### Parameters
<table> <tr> <td><a name="SkCanvas_saveLayerAlpha_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-hint to limit the size of the offscreen; may be nullptr</td>
+hint to limit the size of <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_saveLayerAlpha_alpha"> <code><strong>alpha </strong></code> </a></td> <td>
-opacity of the offscreen</td>
+opacity of <a href="#Layer">Layer</a></td>
</tr>
</table>
@@ -1480,32 +1559,32 @@ enum {
typedef uint32_t <a href="undocumented#SaveLayerFlags">SaveLayerFlags</a>;</pre>
<a href="undocumented#SaveLayerFlags">SaveLayerFlags</a> provides options that may be used in any combination in <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a>,
-defining how the offscreen allocated by <a href="#SkCanvas_saveLayer">saveLayer</a> operates.
+defining how <a href="#Layer">Layer</a> allocated by <a href="#SkCanvas_saveLayer">saveLayer</a> operates.
### Constants
<table>
<tr>
- <td><a name="SkCanvas_kIsOpaque_SaveLayerFlag"> <code><strong>SkCanvas::kIsOpaque_SaveLayerFlag </strong></code> </a></td><td>1</td><td>Creates offscreen without transparency. Flag is ignored if layer <a href="SkPaint_Reference#Paint">Paint</a> contains
+ <td><a name="SkCanvas_kIsOpaque_SaveLayerFlag"> <code><strong>SkCanvas::kIsOpaque_SaveLayerFlag </strong></code> </a></td><td>1</td><td>Creates <a href="#Layer">Layer</a> without transparency. Flag is ignored if <a href="#Layer">Layer</a> <a href="SkPaint_Reference#Paint">Paint</a> contains
<a href="undocumented#Image_Filter">Image Filter</a> or <a href="undocumented#Color_Filter">Color Filter</a>.</td>
</tr>
<tr>
- <td><a name="SkCanvas_kPreserveLCDText_SaveLayerFlag"> <code><strong>SkCanvas::kPreserveLCDText_SaveLayerFlag </strong></code> </a></td><td>2</td><td>Creates offscreen for <a href="undocumented#LCD">LCD</a> text. Flag is ignored if layer <a href="SkPaint_Reference#Paint">Paint</a> contains
+ <td><a name="SkCanvas_kPreserveLCDText_SaveLayerFlag"> <code><strong>SkCanvas::kPreserveLCDText_SaveLayerFlag </strong></code> </a></td><td>2</td><td>Creates <a href="#Layer">Layer</a> for <a href="undocumented#LCD">LCD</a> text. Flag is ignored if <a href="#Layer">Layer</a> <a href="SkPaint_Reference#Paint">Paint</a> contains
<a href="undocumented#Image_Filter">Image Filter</a> or <a href="undocumented#Color_Filter">Color Filter</a>.</td>
</tr>
<tr>
- <td><a name="SkCanvas_kInitWithPrevious_SaveLayerFlag"> <code><strong>SkCanvas::kInitWithPrevious_SaveLayerFlag </strong></code> </a></td><td>4</td><td>Initializes offscreen with the contents of the previous layer.</td>
+ <td><a name="SkCanvas_kInitWithPrevious_SaveLayerFlag"> <code><strong>SkCanvas::kInitWithPrevious_SaveLayerFlag </strong></code> </a></td><td>4</td><td>Initializes <a href="#Layer">Layer</a> with the contents of the previous <a href="#Layer">Layer</a>.</td>
</tr>
<tr>
<td><a name="SkCanvas_kDontClipToLayer_Legacy_SaveLayerFlag"> <code><strong>SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag </strong></code> </a></td><td>0x80000000</td><td>Only present on <a href="undocumented#Android">Android</a>.
-Skips setting a clip to the layer bounds.</td>
+Skips setting a clip to the <a href="#Layer">Layer</a> bounds.</td>
</tr>
</table>
### Example
-<div><fiddle-embed name="d314c688925d2c549d4762f5cc6e6a1a"><div><a href="#Canvas">Canvas</a> layer captures red and blue circles scaled up by four.
-scalePaint blends offscreen back with transparency.</div></fiddle-embed></div>
+<div><fiddle-embed name="d314c688925d2c549d4762f5cc6e6a1a"><div><a href="#Canvas">Canvas</a> <a href="#Layer">Layer</a> captures red and blue circles scaled up by four.
+scalePaint blends <a href="#Layer">Layer</a> back with transparency.</div></fiddle-embed></div>
@@ -1521,47 +1600,47 @@ const <a href="undocumented#SkImageFilter">SkImageFilter</a>* <a href="#SkCan
<a href="undocumented#SaveLayerFlags">SaveLayerFlags</a> <a href="#SkCanvas_SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>;
};</pre>
-<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> contains the state used to create the layer offscreen.
+<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> contains the state used to create the <a href="#Layer">Layer</a>.
<a name="SkCanvas_SaveLayerRec_fBounds"> <code><strong>const SkRect* fBounds</strong></code> </a>
-<a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a> is used as a hint to limit the size of the offscreen; may be nullptr.
-<a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a> suggests but does not define the offscreen size. To clip drawing to
+<a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a> is used as a hint to limit the size of <a href="#Layer">Layer</a>; may be nullptr.
+<a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a> suggests but does not define <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
<a name="SkCanvas_SaveLayerRec_fPaint"> <code><strong>const SkPaint* fPaint</strong></code> </a>
-<a href="#SkCanvas_SaveLayerRec_fPaint">fPaint</a> modifies how the offscreen overlays the prior layer; may be nullptr.
+<a href="#SkCanvas_SaveLayerRec_fPaint">fPaint</a> modifies how <a href="#Layer">Layer</a> overlays the prior <a href="#Layer">Layer</a>; may be nullptr.
<a href="#Alpha">Color Alpha</a>, <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Draw_Looper">Draw Looper</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
-<a href="undocumented#Mask_Filter">Mask Filter</a> affect the offscreen draw.
+<a href="undocumented#Mask_Filter">Mask Filter</a> affect <a href="#Layer">Layer</a> draw.
<a name="SkCanvas_SaveLayerRec_fBackdrop"> <code><strong>const SkImageFilter* fBackdrop</strong></code> </a>
-<a href="#SkCanvas_SaveLayerRec_fBackdrop">fBackdrop</a> applies <a href="undocumented#Image_Filter">Image Filter</a> to the prior layer when copying to the layer
-offscreen; may be nullptr. Use <a href="#SkCanvas_kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a> to copy the
-prior layer without an <a href="undocumented#Image_Filter">Image Filter</a>.
+<a href="#SkCanvas_SaveLayerRec_fBackdrop">fBackdrop</a> applies <a href="undocumented#Image_Filter">Image Filter</a> to the prior <a href="#Layer">Layer</a> when copying to the <a href="#Layer">Layer</a>;
+may be nullptr. Use <a href="#SkCanvas_kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a> to copy the
+prior <a href="#Layer">Layer</a> without an <a href="undocumented#Image_Filter">Image Filter</a>.
<a name="SkCanvas_SaveLayerRec_fClipMask"> <code><strong>const SkImage* fClipMask</strong></code> </a>
-<a href="#SkCanvas_restore">restore</a> clips the layer offscreen by the alpha channel of <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> when
-the offscreen is copied to <a href="undocumented#Device">Device</a>. <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> may be nullptr. .
+<a href="#SkCanvas_restore">restore</a> clips <a href="#Layer">Layer</a> by the <a href="#Alpha">Color Alpha</a> channel of <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> when
+<a href="#Layer">Layer</a> is copied to <a href="undocumented#Device">Device</a>. <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> may be nullptr. .
<a name="SkCanvas_SaveLayerRec_fClipMatrix"> <code><strong>const SkMatrix* fClipMatrix</strong></code> </a>
-<a href="#SkCanvas_SaveLayerRec_fClipMatrix">fClipMatrix</a> transforms <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> before it clips the layer offscreen. If
+<a href="#SkCanvas_SaveLayerRec_fClipMatrix">fClipMatrix</a> transforms <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> before it clips <a href="#Layer">Layer</a>. If
<a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a> describes a translucent gradient, it may be scaled and rotated
without introducing artifacts. <a href="#SkCanvas_SaveLayerRec_fClipMatrix">fClipMatrix</a> may be nullptr.
<a name="SkCanvas_SaveLayerRec_fSaveLayerFlags"> <code><strong>SaveLayerFlags fSaveLayerFlags</strong></code> </a>
-<a href="#SkCanvas_SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a> are used to create layer offscreen without transparency,
-create layer offscreen for <a href="undocumented#LCD">LCD</a> text, and to create layer offscreen with the
-contents of the previous layer.
+<a href="#SkCanvas_SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a> are used to create <a href="#Layer">Layer</a> without transparency,
+create <a href="#Layer">Layer</a> for <a href="undocumented#LCD">LCD</a> text, and to create <a href="#Layer">Layer</a> with the
+contents of the previous <a href="#Layer">Layer</a>.
### Example
-<div><fiddle-embed name="7b18146582fc2440656b839a173ed500"><div><a href="#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
+<div><fiddle-embed name="7b18146582fc2440656b839a173ed500"><div><a href="#Canvas">Canvas</a> <a href="#Layer">Layer</a> captures a red <a href="undocumented#Anti_alias">Anti-aliased</a> circle and a blue <a href="#Alias">Aliased</a> circle scaled
+up by four. After drawing another red circle without scaling on top, the <a href="#Layer">Layer</a> is
transferred to the main canvas.</div></fiddle-embed></div>
<a name="SkCanvas_SaveLayerRec_SaveLayerRec"></a>
@@ -1601,11 +1680,11 @@ Sets <a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a>, <a href="#SkCanvas_Sa
### Parameters
<table> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_2_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-offscreen dimensions; may be nullptr</td>
+<a href="#Layer">Layer</a> dimensions; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
-applied to offscreen when overlaying prior layer; may be nullptr</td>
+applied to <a href="#Layer">Layer</a> when overlaying prior <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_2_saveLayerFlags"> <code><strong>saveLayerFlags </strong></code> </a></td> <td>
-<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td>
+<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify <a href="#Layer">Layer</a></td>
</tr>
</table>
@@ -1637,15 +1716,14 @@ Sets <a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a>, <a href="#SkCanvas_Sa
### Parameters
<table> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_3_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-offscreen dimensions; may be nullptr</td>
+<a href="#Layer">Layer</a> dimensions; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_3_paint"> <code><strong>paint </strong></code> </a></td> <td>
-applied to offscreen when overlaying prior layer;
+applied to <a href="#Layer">Layer</a> when overlaying prior <a href="#Layer">Layer</a>;
may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_3_backdrop"> <code><strong>backdrop </strong></code> </a></td> <td>
-prior layer copied to offscreen with <a href="undocumented#Image_Filter">Image Filter</a>;
-may be nullptr</td>
+prior <a href="#Layer">Layer</a> copied with <a href="undocumented#Image_Filter">Image Filter</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_3_saveLayerFlags"> <code><strong>saveLayerFlags </strong></code> </a></td> <td>
-<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td>
+<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify <a href="#Layer">Layer</a></td>
</tr>
</table>
@@ -1674,28 +1752,28 @@ SaveLayerRec(const SkRect* bounds, const SkPaint* paint,
</pre>
Not ready for general use.Sets <a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</a>, <a href="#SkCanvas_SaveLayerRec_fPaint">fPaint</a>, <a href="#SkCanvas_SaveLayerRec_fBackdrop">fBackdrop</a>, <a href="#SkCanvas_SaveLayerRec_fClipMask">fClipMask</a>, <a href="#SkCanvas_SaveLayerRec_fClipMatrix">fClipMatrix</a>, and <a href="#SkCanvas_SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>.
-<a href="#SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMatrix">clipMatrix</a> uses alpha channel of image, transformed by <a href="#SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMatrix">clipMatrix</a>, to clip layer
-when drawn to <a href="#Canvas">Canvas</a>.
+<a href="#SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMatrix">clipMatrix</a> uses <a href="#Alpha">Color Alpha</a> channel of image, transformed by <a href="#SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMatrix">clipMatrix</a>, to clip
+<a href="#Layer">Layer</a> when drawn to <a href="#Canvas">Canvas</a>.
Implementation is incomplete; has no effect if <a href="undocumented#Device">Device</a> is <a href="undocumented#GPU_backed">GPU-backed</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-offscreen dimensions; may be nullptr</td>
+<a href="#Layer">Layer</a> dimensions; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_paint"> <code><strong>paint </strong></code> </a></td> <td>
-graphics state applied to offscreen when overlaying prior
-layer; may be nullptr</td>
+graphics state applied to <a href="#Layer">Layer</a> when overlaying prior
+<a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_backdrop"> <code><strong>backdrop </strong></code> </a></td> <td>
-prior layer copied to offscreen with <a href="undocumented#Image_Filter">Image Filter</a>;
+prior <a href="#Layer">Layer</a> copied with <a href="undocumented#Image_Filter">Image Filter</a>;
may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMask"> <code><strong>clipMask </strong></code> </a></td> <td>
-clip applied to layer; may be nullptr</td>
+clip applied to <a href="#Layer">Layer</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMatrix"> <code><strong>clipMatrix </strong></code> </a></td> <td>
matrix applied to <a href="#SkCanvas_SaveLayerRec_SaveLayerRec_4_clipMask">clipMask</a>; may be nullptr to use
identity matrix</td>
</tr> <tr> <td><a name="SkCanvas_SaveLayerRec_SaveLayerRec_4_saveLayerFlags"> <code><strong>saveLayerFlags </strong></code> </a></td> <td>
-<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify offscreen</td>
+<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> options to modify <a href="#Layer">Layer</a></td>
</tr>
</table>
@@ -1710,23 +1788,23 @@ int saveLayer(const SaveLayerRec& layerRec)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates an offscreen bitmap for subsequent drawing.
+and allocates <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and blends the offscreen bitmap with alpha opacity onto the prior layer.
+and blends <a href="undocumented#Bitmap">Bitmap</a> with <a href="#Alpha">Color Alpha</a> opacity onto the prior <a href="#Layer">Layer</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> contains the state used to create the layer offscreen.
+<a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> contains the state used to create the <a href="#Layer">Layer</a>.
Call <a href="#SkCanvas_restoreToCount">restoreToCount</a> with returned value to <a href="#SkCanvas_restore">restore</a> this and subsequent saves.
### Parameters
<table> <tr> <td><a name="SkCanvas_saveLayer_3_layerRec"> <code><strong>layerRec </strong></code> </a></td> <td>
-offscreen state</td>
+<a href="#Layer">Layer</a> state</td>
</tr>
</table>
@@ -1736,98 +1814,13 @@ depth of <a href="#SkCanvas_save">save</a> state stack
### Example
-<div><fiddle-embed name="0da8c199f1d9ec4d1b9c5d1114d6cbd6"><div>The example draws an image, and saves it into a layer with <a href="#SkCanvas_kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a>.
-Next it punches a hole in the layer and <a href="#SkCanvas_restore">restore</a> with <a href="#SkBlendMode_kPlus">SkBlendMode::kPlus</a>.
-Where the layer was cleared, the original image will draw unchanged.
+<div><fiddle-embed name="0da8c199f1d9ec4d1b9c5d1114d6cbd6"><div>The example draws an image, and saves it into a <a href="#Layer">Layer</a> with <a href="#SkCanvas_kInitWithPrevious_SaveLayerFlag">kInitWithPrevious SaveLayerFlag</a>.
+Next it punches a hole in <a href="#Layer">Layer</a> and <a href="#SkCanvas_restore">restore</a> with <a href="#SkBlendMode_kPlus">SkBlendMode::kPlus</a>.
+Where <a href="#Layer">Layer</a> was cleared, the original image will draw unchanged.
Outside of the circle the mandrill is brightened.</div></fiddle-embed></div>
---
-<a name="SkCanvas_restore"></a>
-## restore
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void restore()
-</pre>
-
-Removes changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> since <a href="#Canvas">Canvas</a> state was
-last saved. The state is removed from the stack.
-
-Does nothing if the stack is empty.
-
-### Example
-
-<div><fiddle-embed name="e78471212a67f2f4fd39496e17a30d17"></fiddle-embed></div>
-
----
-
-<a name="SkCanvas_getSaveCount"></a>
-## getSaveCount
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-int getSaveCount() const
-</pre>
-
-Returns the number of saved states, each containing: <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>.
-Equals the number of <a href="#SkCanvas_save">save</a> calls less the number of <a href="#SkCanvas_restore">restore</a> calls plus one.
-The <a href="#SkCanvas_save">save</a> count of a new canvas is one.
-
-### Return Value
-
-depth of <a href="#SkCanvas_save">save</a> state stack
-
-### Example
-
-<div><fiddle-embed name="005f2b207e078baac596681924fe591e">
-
-#### Example Output
-
-~~~~
-depth = 1
-depth = 2
-depth = 1
-~~~~
-
-</fiddle-embed></div>
-
----
-
-<a name="SkCanvas_restoreToCount"></a>
-## restoreToCount
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void restoreToCount(int saveCount)
-</pre>
-
-Restores state to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> values when <a href="#SkCanvas_save">save</a>, <a href="#SkCanvas_saveLayer">saveLayer</a>,
-<a href="#SkCanvas_saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a>, or <a href="#SkCanvas_saveLayerAlpha">saveLayerAlpha</a> returned <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a>.
-
-Does nothing if <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a> is greater than state stack count.
-Restores state to initial values if <a href="#SkCanvas_restoreToCount_saveCount">saveCount</a> is less than or equal to one.
-
-### Parameters
-
-<table> <tr> <td><a name="SkCanvas_restoreToCount_saveCount"> <code><strong>saveCount </strong></code> </a></td> <td>
-depth of state stack to <a href="#SkCanvas_restore">restore</a></td>
- </tr>
-</table>
-
-### Example
-
-<div><fiddle-embed name="9ed0d56436e114c7097fd49eed1aea47">
-
-#### Example Output
-
-~~~~
-depth = 1
-depth = 3
-depth = 1
-~~~~
-
-</fiddle-embed></div>
-
----
-
# <a name="Matrix"></a> Matrix
<a name="SkCanvas_translate"></a>
@@ -1840,7 +1833,7 @@ void translate(SkScalar dx, SkScalar dy)
Translate <a href="#Matrix">Matrix</a> by <a href="#SkCanvas_translate_dx">dx</a> along the x-axis and <a href="#SkCanvas_translate_dy">dy</a> along the y-axis.
Mathematically, replace <a href="#Matrix">Matrix</a> with a translation matrix
-pre-multiplied with <a href="#Matrix">Matrix</a>.
+<a href="#Premultiply">Premultiplied</a> with <a href="#Matrix">Matrix</a>.
This has the effect of moving the drawing by (<a href="#SkCanvas_translate_dx">dx</a>, <a href="#SkCanvas_translate_dy">dy</a>) before transforming
the result with <a href="#Matrix">Matrix</a>.
@@ -1876,7 +1869,7 @@ void scale(SkScalar sx, SkScalar sy)
Scale <a href="#Matrix">Matrix</a> by <a href="#SkCanvas_scale_sx">sx</a> on the x-axis and <a href="#SkCanvas_scale_sy">sy</a> on the y-axis.
Mathematically, replace <a href="#Matrix">Matrix</a> with a <a href="#SkCanvas_scale">scale</a> matrix
-pre-multiplied with <a href="#Matrix">Matrix</a>.
+<a href="#Premultiply">Premultiplied</a> with <a href="#Matrix">Matrix</a>.
This has the effect of scaling the drawing by (<a href="#SkCanvas_scale_sx">sx</a>, <a href="#SkCanvas_scale_sy">sy</a>) before transforming
the result with <a href="#Matrix">Matrix</a>.
@@ -1906,7 +1899,7 @@ void rotate(SkScalar degrees)
Rotate <a href="#Matrix">Matrix</a> by <a href="#SkCanvas_rotate_degrees">degrees</a>. Positive <a href="#SkCanvas_rotate_degrees">degrees</a> rotates clockwise.
Mathematically, replace <a href="#Matrix">Matrix</a> with a rotation matrix
-pre-multiplied with <a href="#Matrix">Matrix</a>.
+<a href="#Premultiply">Premultiplied</a> with <a href="#Matrix">Matrix</a>.
This has the effect of rotating the drawing by <a href="#SkCanvas_rotate_degrees">degrees</a> before transforming
the result with <a href="#Matrix">Matrix</a>.
@@ -1932,9 +1925,9 @@ void rotate(SkScalar degrees, SkScalar px, SkScalar py)
Rotate <a href="#Matrix">Matrix</a> by <a href="#SkCanvas_rotate_2_degrees">degrees</a> about a point at (<a href="#SkCanvas_rotate_2_px">px</a>, <a href="#SkCanvas_rotate_2_py">py</a>). Positive <a href="#SkCanvas_rotate_2_degrees">degrees</a> rotates
clockwise.
-Mathematically, construct a rotation matrix. Pre-multiply the rotation matrix by
+Mathematically, construct a rotation matrix. <a href="undocumented#Premultiply">Premultiply</a> the rotation matrix by
a translation matrix, then replace <a href="#Matrix">Matrix</a> with the resulting matrix
-pre-multiplied with <a href="#Matrix">Matrix</a>.
+<a href="#Premultiply">Premultiplied</a> with <a href="#Matrix">Matrix</a>.
This has the effect of rotating the drawing about a given point before
transforming the result with <a href="#Matrix">Matrix</a>.
@@ -1967,7 +1960,7 @@ Skew <a href="#Matrix">Matrix</a> by <a href="#SkCanvas_skew_sx">sx</a> on the x
skews the drawing right as y increases; a positive value of <a href="#SkCanvas_skew_sy">sy</a> skews the drawing
down as x increases.
-Mathematically, replace <a href="#Matrix">Matrix</a> with a <a href="#SkCanvas_skew">skew</a> matrix pre-multiplied with <a href="#Matrix">Matrix</a>.
+Mathematically, replace <a href="#Matrix">Matrix</a> with a <a href="#SkCanvas_skew">skew</a> matrix <a href="#Premultiply">Premultiplied</a> with <a href="#Matrix">Matrix</a>.
This has the effect of skewing the drawing by (<a href="#SkCanvas_skew_sx">sx</a>, <a href="#SkCanvas_skew_sy">sy</a>) before transforming
the result with <a href="#Matrix">Matrix</a>.
@@ -1985,9 +1978,9 @@ amount to <a href="#SkCanvas_skew">skew</a> in y</td>
<div><fiddle-embed name="2e2acc21d7774df7e0940a30ad2ca99e"><div>Black text mimics an oblique text style by using a negative <a href="#SkCanvas_skew">skew</a> in x that
shifts the geometry to the right as the y values decrease.
-Red text uses a positive <a href="#SkCanvas_skew">skew</a> in y to shift the geometry down as the x values
+<a href="#Red">Red</a> text uses a positive <a href="#SkCanvas_skew">skew</a> in y to shift the geometry down as the x values
increase.
-Blue text combines x and y <a href="#SkCanvas_skew">skew</a> to <a href="#SkCanvas_rotate">rotate</a> and <a href="#SkCanvas_scale">scale</a>.</div></fiddle-embed></div>
+<a href="#Blue">Blue</a> text combines x and y <a href="#SkCanvas_skew">skew</a> to <a href="#SkCanvas_rotate">rotate</a> and <a href="#SkCanvas_scale">scale</a>.</div></fiddle-embed></div>
---
@@ -1998,7 +1991,7 @@ Blue text combines x and y <a href="#SkCanvas_skew">skew</a> to <a href="#SkCanv
void concat(const SkMatrix& matrix)
</pre>
-Replace <a href="#Matrix">Matrix</a> with <a href="#SkCanvas_concat_matrix">matrix</a> pre-multiplied with existing <a href="#Matrix">Matrix</a>.
+Replace <a href="#Matrix">Matrix</a> with <a href="#SkCanvas_concat_matrix">matrix</a> <a href="#Premultiply">Premultiplied</a> with existing <a href="#Matrix">Matrix</a>.
This has the effect of transforming the drawn geometry by <a href="#SkCanvas_concat_matrix">matrix</a>, before
transforming the result with existing <a href="#Matrix">Matrix</a>.
@@ -2006,7 +1999,7 @@ transforming the result with existing <a href="#Matrix">Matrix</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_concat_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
-<a href="#SkCanvas_concat_matrix">matrix</a> to pre-multiply with existing <a href="#Matrix">Matrix</a></td>
+<a href="#SkCanvas_concat_matrix">matrix</a> to <a href="undocumented#Premultiply">Premultiply</a> with existing <a href="#Matrix">Matrix</a></td>
</tr>
</table>
@@ -2096,14 +2089,14 @@ prior <a href="#Clip">Clip</a> to form the replacement <a href="#Clip">Clip</a>.
to subtract <a href="SkPath_Reference#Path">Path</a> from <a href="#Clip">Clip</a>; use <a href="#SkClipOp_kIntersect">SkClipOp::kIntersect</a> to intersect <a href="SkPath_Reference#Path">Path</a>
with <a href="#Clip">Clip</a>.
-A clipping <a href="SkPath_Reference#Path">Path</a> may be anti-aliased; if <a href="SkPath_Reference#Path">Path</a>, after transformation, is
+A clipping <a href="SkPath_Reference#Path">Path</a> may be <a href="undocumented#Anti_alias">Anti-aliased</a>; if <a href="SkPath_Reference#Path">Path</a>, after transformation, is
composed of horizontal and vertical lines, clearing <a href="SkPaint_Reference#Anti_alias">Anti-alias</a> 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 <a href="#Alias">Aliased</a>,
+rectangular clip.
If clipping <a href="SkPath_Reference#Path">Path</a> has <a href="SkPaint_Reference#Anti_alias">Anti-alias</a> 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 <a href="undocumented#Anti_alias">Anti-aliased</a> clip looks smoother but draws slower.
<a href="#Clip">Clip</a> can combine with <a href="undocumented#Rect">Rect</a> and <a href="undocumented#Round_Rect">Round Rect</a> primitives; like
<a href="SkPath_Reference#Path">Path</a>, these are transformed by <a href="#Matrix">Matrix</a> before they are combined with <a href="#Clip">Clip</a>.
@@ -2113,10 +2106,10 @@ and is unaffected by <a href="#Matrix">Matrix</a>.
### Example
-<div><fiddle-embed name="d2e60e5171f26ff9ddefae48387f889b"><div>Draw a red circle with an aliased clip and an anti-aliased clip.
+<div><fiddle-embed name="d2e60e5171f26ff9ddefae48387f889b"><div>Draw a red circle with an <a href="#Alias">Aliased</a> clip and an <a href="undocumented#Anti_alias">Anti-aliased</a> 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.</div></fiddle-embed></div>
+The edge of the <a href="#Alias">Aliased</a> clip fully draws pixels in the red circle.
+The edge of the <a href="undocumented#Anti_alias">Anti-aliased</a> clip partially draws pixels in the red circle.</div></fiddle-embed></div>
<a name="SkCanvas_clipRect"></a>
## clipRect
@@ -2126,7 +2119,7 @@ void clipRect(const SkRect& rect, SkClipOp op, bool doAntiAlias)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRect_rect">rect</a>,
-with an aliased or anti-aliased clip edge. <a href="#SkCanvas_clipRect_rect">rect</a> is transformed by <a href="#Matrix">Matrix</a>
+with an <a href="#Alias">Aliased</a> or <a href="undocumented#Anti_alias">Anti-aliased</a> clip edge. <a href="#SkCanvas_clipRect_rect">rect</a> is transformed by <a href="#Matrix">Matrix</a>
before it is combined with <a href="#Clip">Clip</a>.
### Parameters
@@ -2136,7 +2129,7 @@ before it is combined with <a href="#Clip">Clip</a>.
</tr> <tr> <td><a name="SkCanvas_clipRect_op"> <code><strong>op </strong></code> </a></td> <td>
<a href="#Op">Clip Op</a> to apply to <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be anti-aliased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
@@ -2151,7 +2144,7 @@ void clipRect(const SkRect& rect, SkClipOp op)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRect_2_rect">rect</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#SkCanvas_clipRect_2_rect">rect</a> is transformed by <a href="#Matrix">Matrix</a> before it is combined with <a href="#Clip">Clip</a>.
### Parameters
@@ -2174,7 +2167,7 @@ void clipRect(const SkRect& rect, bool doAntiAlias = false)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRect_3_rect">rect</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#SkCanvas_clipRect_3_rect">rect</a> is transformed by <a href="#Matrix">Matrix</a>
before it is combined with <a href="#Clip">Clip</a>.
@@ -2183,14 +2176,14 @@ before it is combined with <a href="#Clip">Clip</a>.
<table> <tr> <td><a name="SkCanvas_clipRect_3_rect"> <code><strong>rect </strong></code> </a></td> <td>
<a href="undocumented#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_3_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be anti-aliased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
### Example
-<div><fiddle-embed name="1d4e0632c97e42692775d834fe10aa99"><div>A circle drawn in pieces looks uniform when drawn aliased.
-The same circle pieces blend with pixels more than once when anti-aliased,
+<div><fiddle-embed name="1d4e0632c97e42692775d834fe10aa99"><div>A circle drawn in pieces looks uniform when drawn <a href="#Alias">Aliased</a>.
+The same circle pieces blend with pixels more than once when <a href="undocumented#Anti_alias">Anti-aliased</a>,
visible as a thin pair of lines through the right circle.</div></fiddle-embed></div>
---
@@ -2202,12 +2195,12 @@ visible as a thin pair of lines through the right circle.</div></fiddle-embed></
void androidFramework_setDeviceClipRestriction(const SkIRect& rect)
</pre>
-Sets the max clip rectangle, which can be set by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a> and
+Sets the maximum clip rectangle, which can be set by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a> and
<a href="#SkCanvas_clipPath">clipPath</a> and intersect the current clip with the specified <a href="#SkCanvas_androidFramework_setDeviceClipRestriction_rect">rect</a>.
-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 <a href="#SkCanvas_androidFramework_setDeviceClipRestriction_rect">rect</a> to disable max clip.
+Pass an empty <a href="#SkCanvas_androidFramework_setDeviceClipRestriction_rect">rect</a> to disable maximum clip.
### Parameters
@@ -2228,7 +2221,7 @@ void clipRRect(const SkRRect& rrect, SkClipOp op, bool doAntiAlias)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRRect_rrect">rrect</a>,
-with an aliased or anti-aliased clip edge.
+with an <a href="#Alias">Aliased</a> or <a href="undocumented#Anti_alias">Anti-aliased</a> clip edge.
<a href="#SkCanvas_clipRRect_rrect">rrect</a> is transformed by <a href="#Matrix">Matrix</a>
before it is combined with <a href="#Clip">Clip</a>.
@@ -2239,7 +2232,7 @@ before it is combined with <a href="#Clip">Clip</a>.
</tr> <tr> <td><a name="SkCanvas_clipRRect_op"> <code><strong>op </strong></code> </a></td> <td>
<a href="#Op">Clip Op</a> to apply to <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRRect_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be antialiased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
@@ -2254,7 +2247,7 @@ void clipRRect(const SkRRect& rrect, SkClipOp op)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRRect_2_rrect">rrect</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#SkCanvas_clipRRect_2_rrect">rrect</a> is transformed by <a href="#Matrix">Matrix</a> before it is combined with <a href="#Clip">Clip</a>.
### Parameters
@@ -2277,7 +2270,7 @@ void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipRRect_3_rrect">rrect</a>,
-with an aliased or anti-aliased clip edge.
+with an <a href="#Alias">Aliased</a> or <a href="undocumented#Anti_alias">Anti-aliased</a> clip edge.
<a href="#SkCanvas_clipRRect_3_rrect">rrect</a> is transformed by <a href="#Matrix">Matrix</a> before it is combined with <a href="#Clip">Clip</a>.
### Parameters
@@ -2285,7 +2278,7 @@ with an aliased or anti-aliased clip edge.
<table> <tr> <td><a name="SkCanvas_clipRRect_3_rrect"> <code><strong>rrect </strong></code> </a></td> <td>
<a href="undocumented#Round_Rect">Round Rect</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRRect_3_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be antialiased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
@@ -2303,7 +2296,7 @@ void clipPath(const SkPath& path, SkClipOp op, bool doAntiAlias)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipPath_path">path</a>,
-with an aliased or anti-aliased clip edge. <a href="#Fill_Type">Path Fill Type</a> determines if <a href="#SkCanvas_clipPath_path">path</a>
+with an <a href="#Alias">Aliased</a> or <a href="undocumented#Anti_alias">Anti-aliased</a> clip edge. <a href="#Fill_Type">Path Fill Type</a> determines if <a href="#SkCanvas_clipPath_path">path</a>
describes the area inside or outside its contours; and if <a href="#Contour">Path Contour</a> overlaps
itself or another <a href="#Contour">Path Contour</a>, whether the overlaps form part of the area.
<a href="#SkCanvas_clipPath_path">path</a> is transformed by <a href="#Matrix">Matrix</a> before it is combined with <a href="#Clip">Clip</a>.
@@ -2315,7 +2308,7 @@ itself or another <a href="#Contour">Path Contour</a>, whether the overlaps form
</tr> <tr> <td><a name="SkCanvas_clipPath_op"> <code><strong>op </strong></code> </a></td> <td>
<a href="#Op">Clip Op</a> to apply to <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipPath_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be antialiased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
@@ -2334,7 +2327,7 @@ void clipPath(const SkPath& path, SkClipOp op)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipPath_2_path">path</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#Fill_Type">Path Fill Type</a> determines if <a href="#SkCanvas_clipPath_2_path">path</a>
describes the area inside or outside its contours; and if <a href="#Contour">Path Contour</a> overlaps
itself or another <a href="#Contour">Path Contour</a>, whether the overlaps form part of the area.
@@ -2363,7 +2356,7 @@ void clipPath(const SkPath& path, bool doAntiAlias = false)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection of <a href="#Clip">Clip</a> and <a href="#SkCanvas_clipPath_3_path">path</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#Fill_Type">Path Fill Type</a> determines if <a href="#SkCanvas_clipPath_3_path">path</a>
describes the area inside or outside its contours; and if <a href="#Contour">Path Contour</a> overlaps
itself or another <a href="#Contour">Path Contour</a>, whether the overlaps form part of the area.
@@ -2374,7 +2367,7 @@ itself or another <a href="#Contour">Path Contour</a>, whether the overlaps form
<table> <tr> <td><a name="SkCanvas_clipPath_3_path"> <code><strong>path </strong></code> </a></td> <td>
<a href="SkPath_Reference#Path">Path</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipPath_3_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
-true if <a href="#Clip">Clip</a> is to be antialiased</td>
+true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
</table>
@@ -2393,7 +2386,7 @@ is set to <a href="#SkPath_kWinding_FillType">SkPath::kWinding FillType</a>, the
void setAllowSimplifyClip(bool allow)
</pre>
-Only used for testing.Set to simplify clip stack using path ops.
+Only used for testing.Set to simplify clip stack using <a href="undocumented#PathOps">PathOps</a>.
---
@@ -2405,7 +2398,7 @@ void clipRegion(const SkRegion& deviceRgn, SkClipOp op = SkClipOp::kIntersect)
</pre>
Replace <a href="#Clip">Clip</a> with the intersection or difference of <a href="#Clip">Clip</a> and <a href="undocumented#Region">Region</a> <a href="#SkCanvas_clipRegion_deviceRgn">deviceRgn</a>.
-Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the clip.
+Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are fully contained by the clip.
<a href="#SkCanvas_clipRegion_deviceRgn">deviceRgn</a> is unaffected by <a href="#Matrix">Matrix</a>.
### Parameters
@@ -2419,8 +2412,8 @@ Resulting <a href="#Clip">Clip</a> is aliased; pixels are fully contained by the
### Example
-<div><fiddle-embed name="7bb57c0e456c5fda2c2cca4abb68b19e"><div>region is unaffected by canvas rotation; rect is affected by canvas rotation.
-Both clips are aliased; this is unnoticable on <a href="undocumented#Region">Region</a> clip because it
+<div><fiddle-embed name="7bb57c0e456c5fda2c2cca4abb68b19e"><div>region is unaffected by canvas rotation; iRect is affected by canvas rotation.
+Both clips are <a href="#Alias">Aliased</a>; this is not noticeable on <a href="undocumented#Region">Region</a> clip because it
aligns to pixel boundaries.</div></fiddle-embed></div>
---
@@ -2509,7 +2502,7 @@ Return bounds of <a href="#Clip">Clip</a>, transformed by inverse of <a href="#M
return <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
<a href="undocumented#Rect">Rect</a> returned is outset by one to account for partial pixel coverage if <a href="#Clip">Clip</a>
-is anti-aliased.
+is <a href="undocumented#Anti_alias">Anti-aliased</a>.
### Return Value
@@ -2541,7 +2534,7 @@ Return <a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> of <a href="#C
return false, and set <a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> to <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
<a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> is outset by one to account for partial pixel coverage if <a href="#Clip">Clip</a>
-is anti-aliased.
+is <a href="undocumented#Anti_alias">Anti-aliased</a>.
### Parameters
@@ -2651,7 +2644,7 @@ Fill <a href="#Clip">Clip</a> with <a href="undocumented#Color">Color</a> <a hre
### Parameters
<table> <tr> <td><a name="SkCanvas_drawColor_color"> <code><strong>color </strong></code> </a></td> <td>
-<a href="undocumented#Unpremultiplied">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
</tr> <tr> <td><a name="SkCanvas_drawColor_mode"> <code><strong>mode </strong></code> </a></td> <td>
<a href="undocumented#SkBlendMode">SkBlendMode</a> used to combine source <a href="#SkCanvas_drawColor_color">color</a> and destination</td>
</tr>
@@ -2676,7 +2669,7 @@ This has the effect of replacing all pixels contained by <a href="#Clip">Clip</a
### Parameters
<table> <tr> <td><a name="SkCanvas_clear_color"> <code><strong>color </strong></code> </a></td> <td>
-<a href="undocumented#Unpremultiplied">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
</tr>
</table>
@@ -3099,7 +3092,7 @@ void drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint
Draw <a href="undocumented#Round_Rect">Round Rect</a> <a href="#SkCanvas_drawDRRect_outer">outer</a> and <a href="#SkCanvas_drawDRRect_inner">inner</a>
using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawDRRect_paint">paint</a>.
<a href="#SkCanvas_drawDRRect_outer">outer</a> must contain <a href="#SkCanvas_drawDRRect_inner">inner</a> or the drawing is undefined.
-In <a href="#SkCanvas_drawDRRect_paint">paint</a>: <a href="#Style">Paint Style</a> determines if rrect is stroked or filled;
+In <a href="#SkCanvas_drawDRRect_paint">paint</a>: <a href="#Style">Paint Style</a> determines if <a href="undocumented#Round_Rect">Round Rect</a> is stroked or filled;
if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line thickness.
If stroked and <a href="undocumented#Round_Rect">Round Rect</a> corner has zero length radii, <a href="#Stroke_Join">Paint Stroke Join</a> can
draw corners rounded or square.
@@ -3166,7 +3159,7 @@ half the diameter of <a href="undocumented#Circle">Circle</a></td>
void drawCircle(SkPoint center, SkScalar radius, const SkPaint& paint)
</pre>
-Draw <a href="undocumented#Circle">Circle</a> at (cx, cy) with <a href="#SkCanvas_drawCircle_2_radius">radius</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawCircle_2_paint">paint</a>.
+Draw <a href="undocumented#Circle">Circle</a> at <a href="#SkCanvas_drawCircle_2_center">center</a> with <a href="#SkCanvas_drawCircle_2_radius">radius</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawCircle_2_paint">paint</a>.
If <a href="#SkCanvas_drawCircle_2_radius">radius</a> is zero or less, nothing is drawn.
In <a href="#SkCanvas_drawCircle_2_paint">paint</a>: <a href="#Style">Paint Style</a> determines if <a href="undocumented#Circle">Circle</a> is stroked or filled;
if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line thickness.
@@ -3258,9 +3251,9 @@ If <a href="#SkCanvas_drawRoundRect_rx">rx</a> and <a href="#SkCanvas_drawRoundR
<table> <tr> <td><a name="SkCanvas_drawRoundRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
<a href="undocumented#Rect">Rect</a> bounds of <a href="undocumented#Round_Rect">Round Rect</a> to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawRoundRect_rx"> <code><strong>rx </strong></code> </a></td> <td>
-semiaxis length in x of oval describing rounded corners</td>
+axis length in x of oval describing rounded corners</td>
</tr> <tr> <td><a name="SkCanvas_drawRoundRect_ry"> <code><strong>ry </strong></code> </a></td> <td>
-semiaxis length in y of oval describing rounded corners</td>
+axis length in y of oval describing rounded corners</td>
</tr> <tr> <td><a name="SkCanvas_drawRoundRect_paint"> <code><strong>paint </strong></code> </a></td> <td>
stroke, blend, color, and so on, used to draw</td>
</tr>
@@ -3396,23 +3389,23 @@ enum <a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> {
<a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a>,
};</pre>
-<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of the <a href="undocumented#Rect">Rect</a> src, provided to
-<a href="#SkCanvas_drawImageRect">drawImageRect</a>, trading off speed for precision.
+<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of source <a href="undocumented#Rect">Rect</a>,
+provided to <a href="#SkCanvas_drawImageRect">drawImageRect</a>, trading off speed for precision.
-<a href="undocumented#Image_Filter">Image Filter</a> in <a href="SkPaint_Reference#Paint">Paint</a> may sample multiple pixels in the image. <a href="undocumented#Rect">Rect</a> src
+<a href="undocumented#Image_Filter">Image Filter</a> in <a href="SkPaint_Reference#Paint">Paint</a> may sample multiple pixels in the image. Source <a href="undocumented#Rect">Rect</a>
restricts the bounds of pixels that may be read. <a href="undocumented#Image_Filter">Image Filter</a> may slow down if
-it cannot read outside the bounds, when sampling near the edge of <a href="undocumented#Rect">Rect</a> src.
+it cannot read outside the bounds, when sampling near the edge of source <a href="undocumented#Rect">Rect</a>.
<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> specifies whether an <a href="undocumented#Image_Filter">Image Filter</a> is allowed to read pixels
-outside <a href="undocumented#Rect">Rect</a> src.
+outside source <a href="undocumented#Rect">Rect</a>.
### Constants
<table>
<tr>
- <td><a name="SkCanvas_kStrict_SrcRectConstraint"> <code><strong>SkCanvas::kStrict_SrcRectConstraint </strong></code> </a></td><td>Requires Image_Filter to respect Rect src,</td><td>sampling only inside of its bounds, possibly with a performance penalty.</td>
+ <td><a name="SkCanvas_kStrict_SrcRectConstraint"> <code><strong>SkCanvas::kStrict_SrcRectConstraint </strong></code> </a></td><td>Requires Image_Filter to respect source Rect,</td><td>sampling only inside of its bounds, possibly with a performance penalty.</td>
</tr>
<tr>
- <td><a name="SkCanvas_kFast_SrcRectConstraint"> <code><strong>SkCanvas::kFast_SrcRectConstraint </strong></code> </a></td><td>Permits Image_Filter to sample outside of Rect src</td><td>by half the width of <a href="undocumented#Image_Filter">Image Filter</a>, permitting it to run faster but with
+ <td><a name="SkCanvas_kFast_SrcRectConstraint"> <code><strong>SkCanvas::kFast_SrcRectConstraint </strong></code> </a></td><td>Permits Image_Filter to sample outside of source Rect</td><td>by half the width of <a href="undocumented#Image_Filter">Image Filter</a>, permitting it to run faster but with
error at the image edges.</td>
</tr>
</table>
@@ -3421,7 +3414,7 @@ error at the image edges.</td>
<div><fiddle-embed name="5df49d1f4da37275a1f10ef7f1a749f0"><div>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 <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> shows only a blur of black and white.
Drawing the checkerboard with <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows red to bleed in the corners.</div></fiddle-embed></div>
@@ -3497,7 +3490,7 @@ as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShad
replicates the <a href="#SkCanvas_drawImageRect_2_image">image</a>'s edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_2_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3512,7 +3505,7 @@ destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImage
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_2_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-filter strictly within src or draw faster</td>
+filter strictly within <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a> or draw faster</td>
</tr>
</table>
@@ -3539,7 +3532,7 @@ as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShad
replicates the <a href="#SkCanvas_drawImageRect_3_image">image</a>'s edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_3_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawImageRect_3_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3552,7 +3545,7 @@ destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImage
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_3_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-filter strictly within src or draw faster</td>
+filter strictly within <a href="#SkCanvas_drawImageRect_3_image">image</a> or draw faster</td>
</tr>
</table>
@@ -3625,7 +3618,7 @@ as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShad
replicates the <a href="#SkCanvas_drawImageRect_5_image">image</a>'s edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_5_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawImageRect_5_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3640,7 +3633,7 @@ destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImage
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_5_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-filter strictly within src or draw faster</td>
+filter strictly within <a href="#SkCanvas_drawImageRect_5_image">image</a> or draw faster</td>
</tr>
</table>
@@ -3668,7 +3661,7 @@ as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShad
replicates the <a href="#SkCanvas_drawImageRect_6_image">image</a>'s edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_6_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawImageRect_6_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3681,7 +3674,7 @@ destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImage
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_6_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-filter strictly within src or draw faster</td>
+filter strictly within <a href="#SkCanvas_drawImageRect_6_image">image</a> or draw faster</td>
</tr>
</table>
@@ -3701,7 +3694,7 @@ void drawImageNine(const SkImage* image, const SkIRect& center,
Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_image">image</a> stretched differentially to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_dst">dst</a>.
<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_center">center</a> divides the <a href="#SkCanvas_drawImageNine_image">image</a> into nine sections: four sides, four corners, and
-the <a href="#SkCanvas_drawImageNine_center">center</a>. Corners are unscaled or scaled down proportionately if their sides
+the <a href="#SkCanvas_drawImageNine_center">center</a>. Corners are unmodified or scaled down proportionately if their sides
are larger than <a href="#SkCanvas_drawImageNine_dst">dst</a>; <a href="#SkCanvas_drawImageNine_center">center</a> and four sides are scaled to fit remaining space, if any.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageNine_paint">paint</a>.
@@ -3731,9 +3724,9 @@ and so on; or nullptr</td>
### Example
<div><fiddle-embed name="47f78f3f70ccd9e6c40ee3203a5c71dd"><div>The leftmost <a href="#SkCanvas_drawImageNine_image">image</a> is smaller than <a href="#SkCanvas_drawImageNine_center">center</a>; only corners are drawn, all scaled to fit.
-The second <a href="#SkCanvas_drawImageNine_image">image</a> equals the size of <a href="#SkCanvas_drawImageNine_center">center</a>; only corners are drawn, unscaled.
-The remaining images are larger than <a href="#SkCanvas_drawImageNine_center">center</a>. All corners draw unscaled. The sides
-and <a href="#SkCanvas_drawImageNine_center">center</a> are scaled if needed to take up the remaining space.</div></fiddle-embed></div>
+The second <a href="#SkCanvas_drawImageNine_image">image</a> equals the size of <a href="#SkCanvas_drawImageNine_center">center</a>; only corners are drawn without scaling.
+The remaining images are larger than <a href="#SkCanvas_drawImageNine_center">center</a>. All corners draw without scaling.
+The sides and <a href="#SkCanvas_drawImageNine_center">center</a> are scaled if needed to take up the remaining space.</div></fiddle-embed></div>
---
@@ -3744,7 +3737,7 @@ void drawImageNine(const sk_sp<SkImage>& image, const SkIRect& center,
Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_2_image">image</a> stretched differentially to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_2_dst">dst</a>.
<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_2_center">center</a> divides the <a href="#SkCanvas_drawImageNine_2_image">image</a> into nine sections: four sides, four corners, and
-the <a href="#SkCanvas_drawImageNine_2_center">center</a>. Corners are unscaled or scaled down proportionately if their sides
+the <a href="#SkCanvas_drawImageNine_2_center">center</a>. Corners are not scaled, or scaled down proportionately if their sides
are larger than <a href="#SkCanvas_drawImageNine_2_dst">dst</a>; <a href="#SkCanvas_drawImageNine_2_center">center</a> and four sides are scaled to fit remaining space, if any.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageNine_2_paint">paint</a>.
@@ -3775,7 +3768,7 @@ and so on; or nullptr</td>
<div><fiddle-embed name="e941e553970569d1ffb03a42f7fcd6d9"><div>The two leftmost images has four corners and sides to the left and right of <a href="#SkCanvas_drawImageNine_2_center">center</a>.
The leftmost <a href="#SkCanvas_drawImageNine_2_image">image</a> scales the width of corners proportionately to fit.
-The third and fourth <a href="#SkCanvas_drawImageNine_2_image">image</a> corners are unscaled; the sides and <a href="#SkCanvas_drawImageNine_2_center">center</a> are scaled to
+The third and fourth <a href="#SkCanvas_drawImageNine_2_image">image</a> corners are not scaled; the sides and <a href="#SkCanvas_drawImageNine_2_center">center</a> are scaled to
fill the remaining space.
The rightmost <a href="#SkCanvas_drawImageNine_2_image">image</a> has four corners scaled vertically to fit, and uses sides above
and below <a href="#SkCanvas_drawImageNine_2_center">center</a> to fill the remaining space.</div></fiddle-embed></div>
@@ -3889,7 +3882,7 @@ just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_Ma
outside of its bounds.
<a href="#SkCanvas_drawBitmapRect_2_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawBitmapRect_2_isrc">isrc</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3904,7 +3897,7 @@ destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_2_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-sample strictly within src, or draw faster</td>
+sample strictly within <a href="#SkCanvas_drawBitmapRect_2_isrc">isrc</a>, or draw faster</td>
</tr>
</table>
@@ -3921,7 +3914,7 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst,
</pre>
Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a>.
-isrc is on integer pixel boundaries; <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a> may include fractional boundaries.
+<a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> bounds is on integer pixel boundaries; <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a> may include fractional boundaries.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_3_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_3_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3934,7 +3927,7 @@ just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_Ma
outside of its bounds.
<a href="#SkCanvas_drawBitmapRect_3_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
-sample within src; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
+sample within <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
improve performance.
### Parameters
@@ -3947,7 +3940,7 @@ destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_3_constraint"> <code><strong>constraint </strong></code> </a></td> <td>
-filter strictly within src or draw faster</td>
+filter strictly within <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> or draw faster</td>
</tr>
</table>
@@ -3967,7 +3960,7 @@ void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> stretched differentially to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapNine_dst">dst</a>.
<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawBitmapNine_center">center</a> divides the <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> into nine sections: four sides, four corners,
-and the <a href="#SkCanvas_drawBitmapNine_center">center</a>. Corners are unscaled or scaled down proportionately if their
+and the <a href="#SkCanvas_drawBitmapNine_center">center</a>. Corners are not scaled, or scaled down proportionately if their
sides are larger than <a href="#SkCanvas_drawBitmapNine_dst">dst</a>; <a href="#SkCanvas_drawBitmapNine_center">center</a> and four sides are scaled to fit remaining
space, if any.
@@ -4000,7 +3993,7 @@ and so on; or nullptr</td>
<div><fiddle-embed name="a4a30aa10e566a85fe6f6cad2ff9935b"><div>The two leftmost <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> draws has four corners and sides to the left and right of <a href="#SkCanvas_drawBitmapNine_center">center</a>.
The leftmost <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> draw scales the width of corners proportionately to fit.
-The third and fourth draw corners are unscaled; the sides and <a href="#SkCanvas_drawBitmapNine_center">center</a> are scaled to
+The third and fourth draw corners are not scaled; the sides and <a href="#SkCanvas_drawBitmapNine_center">center</a> are scaled to
fill the remaining space.
The rightmost <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> draw has four corners scaled vertically to fit, and uses sides above
and below <a href="#SkCanvas_drawBitmapNine_center">center</a> to fill the remaining space.</div></fiddle-embed></div>
@@ -4129,7 +4122,7 @@ and so on; or nullptr</td>
<div><fiddle-embed name="773134f4fe127f9c9caa110c24c988dc"><div>The two leftmost <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> draws has four corners and sides to the left and right of center.
The leftmost <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> 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 <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> draw has four corners scaled vertically to fit, and uses sides above
and below center to fill the remaining space.</div></fiddle-embed></div>
@@ -4180,8 +4173,8 @@ and so on; or nullptr</td>
### Example
<div><fiddle-embed name="c52ee1d4c69363c6b109539c1da3ce83"><div>The leftmost <a href="#SkCanvas_drawImageLattice_image">image</a> is smaller than center; only corners are drawn, all scaled to fit.
-The second <a href="#SkCanvas_drawImageLattice_image">image</a> 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 <a href="#SkCanvas_drawImageLattice_image">image</a> 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.</div></fiddle-embed></div>
---
@@ -4205,12 +4198,12 @@ and its baseline at <a href="#SkCanvas_drawText_y">y</a>. <a href="undocumented#
All elements of <a href="#SkCanvas_drawText_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawText_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawText_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawText_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawText_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawText_x"> <code><strong>x </strong></code> </a></td> <td>
@@ -4249,12 +4242,12 @@ and its baseline at <a href="#SkCanvas_drawString_y">y</a>. <a href="undocumente
All elements of <a href="#SkCanvas_drawString_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to text. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawString_string"> <code><strong>string </strong></code> </a></td> <td>
-character code points or glyphs drawn,
+character code points or <a href="#Glyph">Glyphs</a> drawn,
ending with a char value of zero</td>
</tr> <tr> <td><a name="SkCanvas_drawString_x"> <code><strong>x </strong></code> </a></td> <td>
start of <a href="#SkCanvas_drawString_string">string</a> on x-axis</td>
@@ -4293,12 +4286,12 @@ and its baseline at <a href="#SkCanvas_drawString_2_y">y</a>. <a href="undocumen
All elements of <a href="#SkCanvas_drawString_2_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to text. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawString_2_string"> <code><strong>string </strong></code> </a></td> <td>
-character code points or glyphs drawn,
+character code points or <a href="#Glyph">Glyphs</a> drawn,
ending with a char value of zero</td>
</tr> <tr> <td><a name="SkCanvas_drawString_2_x"> <code><strong>x </strong></code> </a></td> <td>
start of <a href="#SkCanvas_drawString_2_string">string</a> on x-axis</td>
@@ -4328,7 +4321,7 @@ void drawPosText(const void* text, size_t byteLength, const SkPoint pos[],
</pre>
Draw each glyph in <a href="#SkCanvas_drawPosText_text">text</a> with the origin in <a href="#SkCanvas_drawPosText_pos">pos</a> array, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and
-<a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPosText_paint">paint</a>. The number of entries in <a href="#SkCanvas_drawPosText_pos">pos</a> array must match the number of glyphs
+<a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPosText_paint">paint</a>. The number of entries in <a href="#SkCanvas_drawPosText_pos">pos</a> array must match the number of <a href="#Glyph">Glyphs</a>
described by <a href="#SkCanvas_drawPosText_byteLength">byteLength</a> of <a href="#SkCanvas_drawPosText_text">text</a>.
<a href="#SkCanvas_drawPosText_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosText_text">text</a> encoding is
@@ -4339,7 +4332,7 @@ baseline is positioned at y. <a href="undocumented#Text">Text</a> size is affect
All elements of <a href="#SkCanvas_drawPosText_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawPosText_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
Layout engines such as <a href="undocumented#Harfbuzz">Harfbuzz</a> typically position each glyph
rather than using the font's advance widths.
@@ -4347,7 +4340,7 @@ rather than using the font's advance widths.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawPosText_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawPosText_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawPosText_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawPosText_pos"> <code><strong>pos </strong></code> </a></td> <td>
@@ -4373,26 +4366,26 @@ void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[],
Draw each glyph in <a href="#SkCanvas_drawPosTextH_text">text</a> with its (x, y) origin composed from <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> array and
<a href="#SkCanvas_drawPosTextH_constY">constY</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPosTextH_paint">paint</a>. The number of entries in <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> array
-must match the number of glyphs described by <a href="#SkCanvas_drawPosTextH_byteLength">byteLength</a> of <a href="#SkCanvas_drawPosTextH_text">text</a>.
+must match the number of <a href="#Glyph">Glyphs</a> described by <a href="#SkCanvas_drawPosTextH_byteLength">byteLength</a> of <a href="#SkCanvas_drawPosTextH_text">text</a>.
<a href="#SkCanvas_drawPosTextH_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosTextH_text">text</a> encoding is
-<a href="undocumented#UTF_8">UTF-8</a>. pos elements' meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>;
+<a href="undocumented#UTF_8">UTF-8</a>. <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> elements' meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>;
by default each glyph's left side bearing is positioned at an <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> element and
its baseline is positioned at <a href="#SkCanvas_drawPosTextH_constY">constY</a>. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and
<a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawPosTextH_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawPosTextH_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
Layout engines such as <a href="undocumented#Harfbuzz">Harfbuzz</a> 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 <a href="#Glyph">Glyphs</a> share the same
baseline.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawPosTextH_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawPosTextH_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawPosTextH_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawPosTextH_xpos"> <code><strong>xpos </strong></code> </a></td> <td>
@@ -4433,12 +4426,12 @@ baseline at origin y. <a href="undocumented#Text">Text</a> size is affected by <
All elements of <a href="#SkCanvas_drawTextOnPathHV_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawTextOnPathHV_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawTextOnPathHV_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPathHV_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawTextOnPathHV_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPathHV_path"> <code><strong>path </strong></code> </a></td> <td>
@@ -4481,18 +4474,18 @@ baseline at origin y. <a href="undocumented#Text">Text</a> size is affected by <
All elements of <a href="#SkCanvas_drawTextOnPath_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawTextOnPath_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawTextOnPath_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPath_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawTextOnPath_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPath_path"> <code><strong>path </strong></code> </a></td> <td>
<a href="SkPath_Reference#Path">Path</a> providing <a href="#SkCanvas_drawTextOnPath_text">text</a> baseline</td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPath_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
-transform of glyphs before mapping to <a href="#SkCanvas_drawTextOnPath_path">path</a>; may be nullptr
+transform of <a href="#Glyph">Glyphs</a> before mapping to <a href="#SkCanvas_drawTextOnPath_path">path</a>; may be nullptr
to use identity <a href="#Matrix">Matrix</a></td>
</tr> <tr> <td><a name="SkCanvas_drawTextOnPath_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="#SkCanvas_drawTextOnPath_text">text</a> size, blend, color, and so on, used to draw</td>
@@ -4521,16 +4514,16 @@ using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPai
each glyph.
Optional <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawTextRSXform_cullRect">cullRect</a> is a conservative bounds of <a href="#SkCanvas_drawTextRSXform_text">text</a>, taking into account
-<a href="undocumented#RSXform">RSXform</a> and <a href="#SkCanvas_drawTextRSXform_paint">paint</a>. If cullrect is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
+<a href="undocumented#RSXform">RSXform</a> and <a href="#SkCanvas_drawTextRSXform_paint">paint</a>. If <a href="#SkCanvas_drawTextRSXform_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
All elements of <a href="#SkCanvas_drawTextRSXform_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
<a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Draw_Looper">Draw Looper</a>; apply to <a href="#SkCanvas_drawTextRSXform_text">text</a>. By default, draws
-filled 12 point black glyphs.
+filled 12 point black <a href="#Glyph">Glyphs</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawTextRSXform_text"> <code><strong>text </strong></code> </a></td> <td>
-character code points or glyphs drawn</td>
+character code points or <a href="#Glyph">Glyphs</a> drawn</td>
</tr> <tr> <td><a name="SkCanvas_drawTextRSXform_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
byte length of <a href="#SkCanvas_drawTextRSXform_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawTextRSXform_xform"> <code><strong>xform </strong></code> </a></td> <td>
@@ -4558,7 +4551,7 @@ void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
Draw <a href="undocumented#Text_Blob">Text Blob</a> <a href="#SkCanvas_drawTextBlob_blob">blob</a> at (<a href="#SkCanvas_drawTextBlob_x">x</a>, <a href="#SkCanvas_drawTextBlob_y">y</a>), using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawTextBlob_paint">paint</a>.
-<a href="#SkCanvas_drawTextBlob_blob">blob</a> contains glyphs, their positions, and <a href="#SkCanvas_drawTextBlob_paint">paint</a> attributes specific to text:
+<a href="#SkCanvas_drawTextBlob_blob">blob</a> contains <a href="#Glyph">Glyphs</a>, their positions, and <a href="#SkCanvas_drawTextBlob_paint">paint</a> attributes specific to text:
<a href="undocumented#Typeface">Typeface</a>, <a href="#Text_Size">Paint Text Size</a>, <a href="#Text_Scale_X">Paint Text Scale X</a>, <a href="#Text_Skew_X">Paint Text Skew X</a>,
<a href="#Text_Align">Paint Text Align</a>, <a href="#Hinting">Paint Hinting</a>, <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Fake_Bold">Paint Fake Bold</a>,
<a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a>, <a href="SkPaint_Reference#LCD_Text">LCD Text</a>, <a href="SkPaint_Reference#Linear_Text">Linear Text</a>,
@@ -4570,7 +4563,7 @@ Elements of <a href="#SkCanvas_drawTextBlob_paint">paint</a>: <a href="undocumen
### Parameters
<table> <tr> <td><a name="SkCanvas_drawTextBlob_blob"> <code><strong>blob </strong></code> </a></td> <td>
-glyphs, positions, and their paints' text size, typeface, and so on</td>
+<a href="#Glyph">Glyphs</a>, positions, and their paints' text size, typeface, and so on</td>
</tr> <tr> <td><a name="SkCanvas_drawTextBlob_x"> <code><strong>x </strong></code> </a></td> <td>
horizontal offset applied to <a href="#SkCanvas_drawTextBlob_blob">blob</a></td>
</tr> <tr> <td><a name="SkCanvas_drawTextBlob_y"> <code><strong>y </strong></code> </a></td> <td>
@@ -4593,7 +4586,7 @@ void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y,
Draw <a href="undocumented#Text_Blob">Text Blob</a> <a href="#SkCanvas_drawTextBlob_2_blob">blob</a> at (<a href="#SkCanvas_drawTextBlob_2_x">x</a>, <a href="#SkCanvas_drawTextBlob_2_y">y</a>), using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawTextBlob_2_paint">paint</a>.
-<a href="#SkCanvas_drawTextBlob_2_blob">blob</a> contains glyphs, their positions, and <a href="#SkCanvas_drawTextBlob_2_paint">paint</a> attributes specific to text:
+<a href="#SkCanvas_drawTextBlob_2_blob">blob</a> contains <a href="#Glyph">Glyphs</a>, their positions, and <a href="#SkCanvas_drawTextBlob_2_paint">paint</a> attributes specific to text:
<a href="undocumented#Typeface">Typeface</a>, <a href="#Text_Size">Paint Text Size</a>, <a href="#Text_Scale_X">Paint Text Scale X</a>, <a href="#Text_Skew_X">Paint Text Skew X</a>,
<a href="#Text_Align">Paint Text Align</a>, <a href="#Hinting">Paint Hinting</a>, <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Fake_Bold">Paint Fake Bold</a>,
<a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a>, <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a>, <a href="SkPaint_Reference#LCD_Text">LCD Text</a>, <a href="SkPaint_Reference#Linear_Text">Linear Text</a>,
@@ -4605,7 +4598,7 @@ Elements of <a href="#SkCanvas_drawTextBlob_2_paint">paint</a>: <a href="undocum
### Parameters
<table> <tr> <td><a name="SkCanvas_drawTextBlob_2_blob"> <code><strong>blob </strong></code> </a></td> <td>
-glyphs, positions, and their paints' text size, typeface, and so on</td>
+<a href="#Glyph">Glyphs</a>, positions, and their paints' text size, typeface, and so on</td>
</tr> <tr> <td><a name="SkCanvas_drawTextBlob_2_x"> <code><strong>x </strong></code> </a></td> <td>
horizontal offset applied to <a href="#SkCanvas_drawTextBlob_2_blob">blob</a></td>
</tr> <tr> <td><a name="SkCanvas_drawTextBlob_2_y"> <code><strong>y </strong></code> </a></td> <td>
@@ -4793,7 +4786,7 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPaint& paint)
</pre>
-Draw a cubic <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_cubics">cubics</a> with shared corners,
+Draws a <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_cubics">cubics</a> with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPatch_paint">paint</a>'s <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
@@ -4801,8 +4794,8 @@ The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> a
as the <a href="undocumented#Coons">Coons</a> patch texture; <a href="undocumented#Blend_Mode">Blend Mode</a> <a href="#SkCanvas_drawPatch_mode">mode</a> combines <a href="undocumented#Color">Color</a> <a href="#SkCanvas_drawPatch_colors">colors</a> and <a href="undocumented#Shader">Shader</a> if
both are provided.
-<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_cubics">cubics</a> specifies four <a href="#SkCanvas_drawPatch_cubics">cubics</a> starting at the top left corner,
-in clockwise order, sharing every fourth point. The last cubic ends at the
+<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top left corner,
+in clockwise order, sharing every fourth point. The last <a href="#Cubic">Cubic</a> ends at the
first point.
<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_colors">colors</a> with corners in top left, top right,
@@ -4818,7 +4811,7 @@ corners in top left, top right, bottom right, bottom left order.
</tr> <tr> <td><a name="SkCanvas_drawPatch_colors"> <code><strong>colors </strong></code> </a></td> <td>
<a href="undocumented#Color">Color</a> array, one for each corner</td>
</tr> <tr> <td><a name="SkCanvas_drawPatch_texCoords"> <code><strong>texCoords </strong></code> </a></td> <td>
-<a href="undocumented#Point">Point</a> array of texure coordinates, mapping <a href="undocumented#Shader">Shader</a> to corners;
+<a href="undocumented#Point">Point</a> array of texture coordinates, mapping <a href="undocumented#Shader">Shader</a> to corners;
may be nullptr</td>
</tr>
# <tr> <td><a name="SkCanvas_drawPatch_mode"> <code><strong>mode </strong></code> </a></td> <td>
@@ -4839,7 +4832,7 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], const SkPaint& paint)
</pre>
-Draw a cubic <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> with shared corners,
+Draws <a href="#Cubic">Cubic</a> <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPatch_2_paint">paint</a>'s <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
@@ -4847,8 +4840,8 @@ The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> a
as the <a href="undocumented#Coons">Coons</a> patch texture; <a href="undocumented#Blend_Mode">Blend Mode</a> mode combines <a href="undocumented#Color">Color</a> <a href="#SkCanvas_drawPatch_2_colors">colors</a> and <a href="undocumented#Shader">Shader</a> if
both are provided.
-<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> specifies four <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> starting at the top left corner,
-in clockwise order, sharing every fourth point. The last cubic ends at the
+<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top left corner,
+in clockwise order, sharing every fourth point. The last <a href="#Cubic">Cubic</a> ends at the
first point.
<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_2_colors">colors</a> with corners in top left, top right,
@@ -4864,7 +4857,7 @@ corners in top left, top right, bottom right, bottom left order.
</tr> <tr> <td><a name="SkCanvas_drawPatch_2_colors"> <code><strong>colors </strong></code> </a></td> <td>
<a href="undocumented#Color">Color</a> array, one for each corner</td>
</tr> <tr> <td><a name="SkCanvas_drawPatch_2_texCoords"> <code><strong>texCoords </strong></code> </a></td> <td>
-<a href="undocumented#Point">Point</a> array of texure coordinates, mapping <a href="undocumented#Shader">Shader</a> to corners;
+<a href="undocumented#Point">Point</a> array of texture coordinates, mapping <a href="undocumented#Shader">Shader</a> to corners;
may be nullptr</td>
</tr>
# <tr> <td><a name="SkCanvas_drawPatch_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
@@ -4899,7 +4892,7 @@ to draw, if present. For each entry in the array, <a href="undocumented#Rect">Re
<a href="#SkCanvas_drawAtlas_xform">xform</a>, text, and <a href="#SkCanvas_drawAtlas_colors">colors</a> if present, must contain <a href="#SkCanvas_drawAtlas_count">count</a> entries.
Optional <a href="#SkCanvas_drawAtlas_colors">colors</a> are applied for each sprite using <a href="undocumented#Blend_Mode">Blend Mode</a>.
Optional <a href="#SkCanvas_drawAtlas_cullRect">cullRect</a> is a conservative bounds of all transformed sprites.
-If cullrect is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
+If <a href="#SkCanvas_drawAtlas_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
### Parameters
@@ -4942,7 +4935,7 @@ to draw, if present. For each entry in the array, <a href="undocumented#Rect">Re
<a href="#SkCanvas_drawAtlas_2_xform">xform</a>, text, and <a href="#SkCanvas_drawAtlas_2_colors">colors</a> if present, must contain <a href="#SkCanvas_drawAtlas_2_count">count</a> entries.
Optional <a href="#SkCanvas_drawAtlas_2_colors">colors</a> is applied for each sprite using <a href="undocumented#Blend_Mode">Blend Mode</a>.
Optional <a href="#SkCanvas_drawAtlas_2_cullRect">cullRect</a> is a conservative bounds of all transformed sprites.
-If cullrect is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
+If <a href="#SkCanvas_drawAtlas_2_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
### Parameters
@@ -4983,7 +4976,7 @@ to draw, if present. For each entry in the array, <a href="undocumented#Rect">Re
<a href="#SkCanvas_drawAtlas_3_xform">xform</a> and text must contain <a href="#SkCanvas_drawAtlas_3_count">count</a> entries.
Optional <a href="#SkCanvas_drawAtlas_3_cullRect">cullRect</a> is a conservative bounds of all transformed sprites.
-If cullrect is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
+If <a href="#SkCanvas_drawAtlas_3_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
### Parameters
@@ -5021,7 +5014,7 @@ to draw, if present. For each entry in the array, <a href="undocumented#Rect">Re
<a href="#SkCanvas_drawAtlas_4_xform">xform</a> and text must contain <a href="#SkCanvas_drawAtlas_4_count">count</a> entries.
Optional <a href="#SkCanvas_drawAtlas_4_cullRect">cullRect</a> is a conservative bounds of all transformed sprites.
-If cullrect is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
+If <a href="#SkCanvas_drawAtlas_4_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
### Parameters
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 94168b052e..cbb77e720d 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -21,7 +21,7 @@ algorithms that alter the drawing geometry, color, and transparency. For instanc
The objects contained by <a href="#Paint">Paint</a> are opaque, and cannot be edited outside of the <a href="#Paint">Paint</a>
to affect it. The implementation is free to defer computations associated with the
<a href="#Paint">Paint</a>, or ignore them altogether. For instance, some <a href="undocumented#GPU">GPU</a> implementations draw all
-<a href="SkPath_Reference#Path">Path</a> geometries with anti-aliasing, regardless of how <a href="#SkPaint_kAntiAlias_Flag">SkPaint::kAntiAlias Flag</a>
+<a href="SkPath_Reference#Path">Path</a> geometries with <a href="undocumented#Anti_alias">Anti-aliasing</a>, regardless of how <a href="#SkPaint_kAntiAlias_Flag">SkPaint::kAntiAlias Flag</a>
is set in <a href="#Paint">Paint</a>.
<a href="#Paint">Paint</a> describes a single color, a single font, a single image quality, and so on.
@@ -37,14 +37,14 @@ Multiple colors are drawn either by using multiple paints or with objects like
| topics | description |
| --- | --- |
| <a href="#Initializers">Initializers</a> | Constructors and initialization. |
-| <a href="#Destructor">Destructor</a> | <a href="#Paint">Paint</a> termination. |
+| <a href="undocumented#Destructor">Destructor</a> | <a href="#Paint">Paint</a> termination. |
| <a href="#Management">Management</a> | <a href="#Paint">Paint</a> copying, moving, comparing. |
| <a href="#SkPaint_Hinting">Hinting</a> | <a href="undocumented#Glyph">Glyph</a> outline adjustment. |
| <a href="#SkPaint_Flags">Flags</a> | Attributes represented by single bits. |
| <a href="SkPaint_Reference#Anti_alias">Anti-alias</a> | Approximating coverage with transparency. |
| <a href="#Dither">Dither</a> | Distributing color error. |
| <a href="#Device_Text">Device Text</a> | Increase precision of glyph position. |
-| <a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> | Custom-sized bitmap glyphs. |
+| <a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> | Custom sized bitmap <a href="#Glyph">Glyphs</a>. |
| <a href="#Automatic_Hinting">Automatic Hinting</a> | Always adjust glyph paths. |
| <a href="#Vertical_Text">Vertical Text</a> | Orient text from top to bottom. |
| <a href="#Fake_Bold">Fake Bold</a> | Approximate font styles. |
@@ -70,12 +70,12 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#Text_Size">Text Size</a> | Overall height in points. |
| <a href="#Text_Scale_X">Text Scale X</a> | <a href="undocumented#Text">Text</a> horizontal scale. |
| <a href="#Text_Skew_X">Text Skew X</a> | <a href="undocumented#Text">Text</a> horizontal slant. |
-| <a href="#Text_Encoding">Text Encoding</a> | <a href="undocumented#Text">Text</a> encoded as characters or glyphs. |
+| <a href="#Text_Encoding">Text Encoding</a> | <a href="undocumented#Text">Text</a> encoded as characters or <a href="#Glyph">Glyphs</a>. |
| <a href="#Font_Metrics">Font Metrics</a> | Common glyph dimensions. |
| <a href="#Measure_Text">Measure Text</a> | Width, height, bounds of text. |
-| <a href="#Text_Path">Text Path</a> | Geometry of glyphs. |
+| <a href="#Text_Path">Text Path</a> | Geometry of <a href="#Glyph">Glyphs</a>. |
| <a href="#Text_Intercepts">Text Intercepts</a> | Advanced underline, strike through. |
-| <a href="#Fast_Bounds">Fast Bounds</a> | Appproxiate area required by <a href="#Paint">Paint</a>. |
+| <a href="#Fast_Bounds">Fast Bounds</a> | Approximate area required by <a href="#Paint">Paint</a>. |
## <a name="Constants"></a> Constants
@@ -122,12 +122,12 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_canComputeFastBounds">canComputeFastBounds</a> | Returns true if settings allow for fast bounds computation. |
| <a href="#SkPaint_computeFastBounds">computeFastBounds</a> | Returns fill bounds for quick reject tests. |
| <a href="#SkPaint_computeFastStrokeBounds">computeFastStrokeBounds</a> | Returns stroke bounds for quick reject tests. |
-| <a href="#SkPaint_containsText">containsText</a> | Returns if all text corresponds to glyphs. |
-| <a href="#SkPaint_countText">countText</a> | Returns number of glyphs in text. |
+| <a href="#SkPaint_containsText">containsText</a> | Returns if all text corresponds to <a href="#Glyph">Glyphs</a>. |
+| <a href="#SkPaint_countText">countText</a> | Returns number of <a href="#Glyph">Glyphs</a> in text. |
| <a href="#SkPaint_doComputeFastBounds">doComputeFastBounds</a> | Returns bounds for quick reject tests. |
| <a href="#SkPaint_flatten">flatten</a> | Serializes into a buffer. |
| <a href="#SkPaint_getAlpha">getAlpha</a> | Returns <a href="#Alpha">Color Alpha</a>, color opacity. |
-| <a href="#SkPaint_getBlendMode">getBlendMode</a> | Returns <a href="undocumented#Blend_Mode">Blend Mode</a>, how colors combine with dest. |
+| <a href="#SkPaint_getBlendMode">getBlendMode</a> | Returns <a href="undocumented#Blend_Mode">Blend Mode</a>, how colors combine with <a href="undocumented#Device">Device</a>. |
| <a href="#SkPaint_getColor">getColor</a> | Returns <a href="#Alpha">Color Alpha</a> and <a href="#RGB">Color RGB</a>, one drawing color. |
| <a href="#SkPaint_getColorFilter">getColorFilter</a> | Returns <a href="undocumented#Color_Filter">Color Filter</a>, how colors are altered. |
| <a href="#SkPaint_getDrawLooper">getDrawLooper</a> | Returns <a href="undocumented#Draw_Looper">Draw Looper</a>, multiple layers. |
@@ -162,9 +162,9 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_getTextSize">getTextSize</a> | Returns text size in points. |
| <a href="#SkPaint_getTextWidths">getTextWidths</a> | Returns advance and bounds for each glyph in text. |
| <a href="#SkPaint_getTypeface">getTypeface</a> | Returns <a href="undocumented#Typeface">Typeface</a>, font description. |
-| <a href="#SkPaint_glyphsToUnichars">glyphsToUnichars</a> | Converts glyphs into text. |
+| <a href="#SkPaint_glyphsToUnichars">glyphsToUnichars</a> | Converts <a href="#Glyph">Glyphs</a> into text. |
| <a href="#SkPaint_isAntiAlias">isAntiAlias</a> | Returns true if <a href="SkPaint_Reference#Anti_alias">Anti-alias</a> is set. |
-| <a href="#SkPaint_isAutohinted">isAutohinted</a> | Returns true if glyphs are always hinted. |
+| <a href="#SkPaint_isAutohinted">isAutohinted</a> | Returns true if <a href="#Glyph">Glyphs</a> are always hinted. |
| <a href="#SkPaint_isDevKernText">isDevKernText</a> | Returns true if <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> is set. |
| <a href="#SkPaint_isDither">isDither</a> | Returns true if <a href="#Dither">Dither</a> is set. |
| <a href="#SkPaint_isEmbeddedBitmapText">isEmbeddedBitmapText</a> | Returns true if <a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> is set. |
@@ -187,7 +187,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_setAlpha">setAlpha</a> | Sets <a href="#Alpha">Color Alpha</a>, color opacity. |
| <a href="#SkPaint_setAntiAlias">setAntiAlias</a> | Sets or clears <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>. |
| <a href="#SkPaint_setARGB">setARGB</a> | Sets color by component. |
-| <a href="#SkPaint_setAutohinted">setAutohinted</a> | Sets glyphs to always be hinted. |
+| <a href="#SkPaint_setAutohinted">setAutohinted</a> | Sets <a href="#Glyph">Glyphs</a> to always be hinted. |
| <a href="#SkPaint_setBlendMode">setBlendMode</a> | Sets <a href="undocumented#Blend_Mode">Blend Mode</a>, how colors combine with destination. |
| <a href="#SkPaint_setColor">setColor</a> | Sets <a href="#Alpha">Color Alpha</a> and <a href="#RGB">Color RGB</a>, one drawing color. |
| <a href="#SkPaint_setColorFilter">setColorFilter</a> | Sets <a href="undocumented#Color_Filter">Color Filter</a>, alters color. |
@@ -219,7 +219,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_setTypeface">setTypeface</a> | Sets <a href="undocumented#Typeface">Typeface</a>, font description. |
| <a href="#SkPaint_setVerticalText">setVerticalText</a> | Sets or clears <a href="#Vertical_Text">Vertical Text</a>. |
| <a href="#SkPaint_textToGlyphs">textToGlyphs</a> | Converts text into glyph indices. |
-| <a href="#SkPaint_toString">toString</a> | Converts <a href="#Paint">Paint</a> to machine parsable form (<a href="undocumented#Developer_Mode">Developer Mode</a>) |
+| <a href="#SkPaint_toString">toString</a> | Converts <a href="#Paint">Paint</a> to machine readable form. |
| <a href="#SkPaint_unflatten">unflatten</a> | Populates from a serialized stream. |
# <a name="Initializers"></a> Initializers
@@ -270,7 +270,7 @@ Constructs <a href="#Paint">Paint</a> with default values.
| <a href="#Vertical_Text">Vertical Text</a> | false |
The flags, text size, hinting, and miter limit may be overridden at compile time by defining
-paint default values. The overrides may be included in <a href="undocumented#SkUserConfig.h">SkUserConfig.h</a> or predefined by the
+paint default values. The overrides may be included in "<a href="undocumented#SkUserConfig">SkUserConfig</a>.h" or predefined by the
build system.
### Return Value
@@ -643,7 +643,7 @@ by the client.
### Parameters
<table> <tr> <td><a name="SkPaint_unflatten_buffer"> <code><strong>buffer </strong></code> </a></td> <td>
-serialized data to <a href="#SkPaint_unflatten">unflatten</a></td>
+serialized data describing <a href="#Paint">Paint</a> content</td>
</tr>
</table>
@@ -683,7 +683,7 @@ to 26.6 fractional pixels.</td>
With <a href="undocumented#FreeType">FreeType</a>, this is equivalent in spirit to the
<a href="undocumented#FT_LOAD_TARGET_LIGHT">FT LOAD TARGET LIGHT</a> value supplied to <a href="undocumented#FT_Load_Glyph">FT Load Glyph</a>. It chooses a
lighter hinting algorithm for non-monochrome modes.
-Generated glyphs may be fuzzy but better resemble their original shape.</td>
+Generated <a href="#Glyph">Glyphs</a> may be fuzzy but better resemble their original shape.</td>
</tr>
<tr>
<td><a name="SkPaint_kNormal_Hinting"> <code><strong>SkPaint::kNormal_Hinting </strong></code> </a></td><td>2</td><td>Modifies glyph outlines to improve constrast. This is the default.
@@ -747,9 +747,9 @@ Does not check for valid values of <a href="#SkPaint_setHinting_hintingLevel">hi
| <a href="#Hinting">Hinting</a> | value | effect on generated glyph outlines |
| --- | --- | --- |
| <a href="#SkPaint_kNo_Hinting">kNo Hinting</a> | 0 | leaves glyph outlines unchanged from their native representation |
-| <a href="#SkPaint_kSlight_Hinting">kSlight Hinting</a> | 1 | modifies glyph outlines minimally to improve constrast |
-| <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> | 2 | modifies glyph outlines to improve constrast |
-| <a href="#SkPaint_kFull_Hinting">kFull Hinting</a> | 3 | modifies glyph outlines for maxiumum constrast |
+| <a href="#SkPaint_kSlight_Hinting">kSlight Hinting</a> | 1 | modifies glyph outlines minimally to improve contrast |
+| <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> | 2 | modifies glyph outlines to improve contrast |
+| <a href="#SkPaint_kFull_Hinting">kFull Hinting</a> | 3 | modifies glyph outlines for maximum contrast |
### Parameters
@@ -929,17 +929,17 @@ paint.isDither()
If <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a> is clear, pixel centers contained by the shape edge are drawn opaque.
If <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a> is set, pixels are drawn with <a href="#Alpha">Color Alpha</a> equal to their coverage.
-The rule for aliased pixels is inconsistent across platforms. A shape edge
+The rule for <a href="#Alias">Aliased</a> pixels is inconsistent across platforms. A shape edge
passing through the pixel center may, but is not required to, draw the pixel.
-<a href="undocumented#Raster_Engine">Raster Engine</a> draws aliased pixels whose centers are on or to the right of the start of an
+<a href="undocumented#Raster_Engine">Raster Engine</a> draws <a href="#Alias">Aliased</a> pixels whose centers are on or to the right of the start of an
active <a href="SkPath_Reference#Path">Path</a> edge, and whose center is to the left of the end of the active <a href="SkPath_Reference#Path">Path</a> edge.
-A platform may only support anti-aliased drawing. Some <a href="undocumented#GPU_backed">GPU-backed</a> platforms use
-supersampling to anti-alias all drawing, and have no mechanism to selectively
-alias.
+A platform may only support <a href="undocumented#Anti_alias">Anti-aliased</a> drawing. Some <a href="undocumented#GPU_backed">GPU-backed</a> platforms use
+<a href="undocumented#Supersampling">Supersampling</a> to <a href="SkPaint_Reference#Anti_alias">Anti-alias</a> all drawing, and have no mechanism to selectively
+<a href="undocumented#Alias">Alias</a>.
-The amount of coverage computed for anti-aliased pixels also varies across platforms.
+The amount of coverage computed for <a href="undocumented#Anti_alias">Anti-aliased</a> pixels also varies across platforms.
<a href="SkPaint_Reference#Anti_alias">Anti-alias</a> is disabled by default.
<a href="SkPaint_Reference#Anti_alias">Anti-alias</a> can be enabled by default by setting <a href="undocumented#SkPaintDefaults_Flags">SkPaintDefaults Flags</a> to <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a>
@@ -949,8 +949,8 @@ at compile time.
<div><fiddle-embed name="a6575a49467ce8d28bb01cc7638fa04d"><div>A red line is drawn with transparency on the edges to make it look smoother.
A blue line draws only where the pixel centers are contained.
-The lines are drawn into an offscreen bitmap, then drawn magified to make the
-aliasing easier to see.</div></fiddle-embed></div>
+The lines are drawn into <a href="undocumented#Bitmap">Bitmap</a>, then drawn magnified to make the
+<a href="#Alias">Aliasing</a> easier to see.</div></fiddle-embed></div>
<a name="SkPaint_isAntiAlias"></a>
## isAntiAlias
@@ -1017,7 +1017,7 @@ paint1 == paint2
---
# <a name="Dither"></a> Dither
-<a href="#Dither">Dither</a> increases fidelity by adjusting the color of adjcent pixels.
+<a href="#Dither">Dither</a> increases fidelity by adjusting the color of adjacent pixels.
This can help to smooth color transitions and reducing banding in gradients.
Dithering lessens visible banding from <a href="undocumented#SkColorType">kRGB 565 SkColorType</a>
and <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a> gradients,
@@ -1120,7 +1120,7 @@ Gradient <a href="undocumented#RGB_565">Color RGB-565</a>
When set, <a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> takes advantage of the organization of <a href="#RGB">Color RGB</a> stripes that
create a color, and relies
-on the small size of the stripe and visual perception to make the color fringing inperceptible.
+on the small size of the stripe and visual perception to make the color fringing imperceptible.
<a href="SkPaint_Reference#LCD_Text">LCD Text</a> can be enabled on devices that orient stripes horizontally or vertically, and that order
the color components as <a href="#RGB">Color RGB</a> or <a href="#RBG">Color RBG</a>.
@@ -1136,8 +1136,8 @@ Either or both techniques can be enabled.
### Example
<div><fiddle-embed name="4606ae1be792d6bc46d496432f050ee9"><div>Four commas are drawn normally and with combinations of <a href="SkPaint_Reference#LCD_Text">LCD Text</a> and <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a>.
-When <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> is disabled, the comma glyphs are indentical, but not evenly spaced.
-When <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> is enabled, the comma glyphs are unique, but appear evenly spaced.</div></fiddle-embed></div>
+When <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> is disabled, the comma <a href="#Glyph">Glyphs</a> are identical, but not evenly spaced.
+When <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> is enabled, the comma <a href="#Glyph">Glyphs</a> are unique, but appear evenly spaced.</div></fiddle-embed></div>
## <a name="Linear_Text"></a> Linear Text
@@ -1213,7 +1213,7 @@ of the color increases, the edge of the glyph appears to move towards the outsid
bool isSubpixelText() const
</pre>
-If true, glyphs at different sub-pixel positions may differ on pixel edge coverage.
+If true, <a href="#Glyph">Glyphs</a> at different sub-pixel positions may differ on pixel edge coverage.
Equivalent to <a href="#SkPaint_getFlags">getFlags</a> masked with <a href="#SkPaint_kSubpixelText_Flag">kSubpixelText Flag</a>.
@@ -1243,7 +1243,7 @@ paint.isSubpixelText() == !!(paint.getFlags() & SkPaint::kSubpixelText_Flag)
void setSubpixelText(bool subpixelText)
</pre>
-Requests, but does not require, that glyphs respect sub-pixel positioning.
+Requests, but does not require, that <a href="#Glyph">Glyphs</a> respect sub-pixel positioning.
Sets <a href="#SkPaint_kSubpixelText_Flag">kSubpixelText Flag</a> if <a href="#SkPaint_setSubpixelText_subpixelText">subpixelText</a> is true.
Clears <a href="#SkPaint_kSubpixelText_Flag">kSubpixelText Flag</a> if <a href="#SkPaint_setSubpixelText_subpixelText">subpixelText</a> is false.
@@ -1273,7 +1273,7 @@ paint1 == paint2
When set, <a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> takes advantage of the organization of <a href="#RGB">Color RGB</a> stripes that
create a color, and relies
-on the small size of the stripe and visual perception to make the color fringing inperceptible.
+on the small size of the stripe and visual perception to make the color fringing imperceptible.
<a href="SkPaint_Reference#LCD_Text">LCD Text</a> can be enabled on devices that orient stripes horizontally or vertically, and that order
the color components as <a href="#RGB">Color RGB</a> or <a href="#RBG">Color RBG</a>.
@@ -1284,7 +1284,7 @@ the color components as <a href="#RGB">Color RGB</a> or <a href="#RBG">Color RBG
bool isLCDRenderText() const
</pre>
-If true, glyphs may use <a href="undocumented#LCD">LCD</a> striping to improve glyph edges.
+If true, <a href="#Glyph">Glyphs</a> may use <a href="undocumented#LCD">LCD</a> striping to improve glyph edges.
Returns true if <a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> is set.
@@ -1314,7 +1314,7 @@ paint.isLCDRenderText() == !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag)
void setLCDRenderText(bool lcdText)
</pre>
-Requests, but does not require, that glyphs use <a href="undocumented#LCD">LCD</a> striping for glyph edges.
+Requests, but does not require, that <a href="#Glyph">Glyphs</a> use <a href="undocumented#LCD">LCD</a> striping for glyph edges.
Sets <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> if <a href="#SkPaint_setLCDRenderText_lcdText">lcdText</a> is true.
Clears <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> if <a href="#SkPaint_setLCDRenderText_lcdText">lcdText</a> is false.
@@ -1341,7 +1341,7 @@ paint1 == paint2
---
# <a name="Font_Embedded_Bitmaps"></a> Font Embedded Bitmaps
-<a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> allows selecting custom-sized bitmap glyphs.
+<a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> allows selecting custom sized bitmap <a href="#Glyph">Glyphs</a>.
<a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> when set chooses an embedded bitmap glyph over an outline contained
in a font if the platform supports this option.
@@ -1357,10 +1357,11 @@ the outline glyph if <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmap
### Example
<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
-!fiddle<div>The hintgasp <a href="undocumented#TrueType">TrueType</a> font in the <a href="undocumented#Skia">Skia</a> resources/fonts directory includes an embedded
-bitmap glyph at odd font sizes. This example works on platforms that use <a href="undocumented#FreeType">FreeType</a>
-as their <a href="#Engine">Font Engine</a>.
-<a href="undocumented#Windows">Windows</a> may, but is not required to, return a bitmap glyph if <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> is set.</div><a href="undocumented#SkBitmap">SkBitmap</a> bitmap;
+<div>The "" <a href="undocumented#TrueType">TrueType</a> font in the <a href="undocumented#Skia">Skia</a> resources/fonts directory
+includes an embedded bitmap <a href="undocumented#Glyph">Glyph</a> at odd font sizes. This example works
+on platforms that use <a href="undocumented#FreeType">FreeType</a> as their <a href="#Engine">Font Engine</a>.
+<a href="undocumented#Windows">Windows</a> may, but is not required to, return a bitmap glyph if
+<a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> is set.</div><a href="undocumented#SkBitmap">SkBitmap</a> bitmap;
bitmap.allocN32Pixels(30, 15);
bitmap.eraseColor(0);
<a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> offscreen(bitmap);
@@ -1374,7 +1375,7 @@ paint.</pre>
bool isEmbeddedBitmapText() const
</pre>
-If true, <a href="#Engine">Font Engine</a> may return glyphs from font bitmaps instead of from outlines.
+If true, <a href="#Engine">Font Engine</a> may return <a href="#Glyph">Glyphs</a> from font bitmaps instead of from outlines.
Equivalent to <a href="#SkPaint_getFlags">getFlags</a> masked with <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a>.
@@ -1432,7 +1433,7 @@ paint1 == paint2
# <a name="Automatic_Hinting"></a> Automatic Hinting
If <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> or <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>, <a href="#Automatic_Hinting">Automatic Hinting</a>
-instructs the <a href="undocumented#Font_Manager">Font Manager</a> to always hint glyphs.
+instructs the <a href="undocumented#Font_Manager">Font Manager</a> to always hint <a href="#Glyph">Glyphs</a>.
<a href="#Automatic_Hinting">Automatic Hinting</a> has no effect if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNo_Hinting">kNo Hinting</a> or
<a href="#SkPaint_kSlight_Hinting">kSlight Hinting</a>.
@@ -1447,7 +1448,7 @@ bool isAutohinted() const
If true, and if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> or <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>, and if
platform uses <a href="undocumented#FreeType">FreeType</a> as the <a href="undocumented#Font_Manager">Font Manager</a>, instruct the <a href="undocumented#Font_Manager">Font Manager</a> to always hint
-glyphs.
+<a href="#Glyph">Glyphs</a>.
Equivalent to <a href="#SkPaint_getFlags">getFlags</a> masked with <a href="#SkPaint_kAutoHinting_Flag">kAutoHinting Flag</a>.
@@ -1482,7 +1483,7 @@ void setAutohinted(bool useAutohinter)
</pre>
If <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> or <a href="#SkPaint_kFull_Hinting">kFull Hinting</a> and <a href="#SkPaint_setAutohinted_useAutohinter">useAutohinter</a> is set,
-instruct the <a href="undocumented#Font_Manager">Font Manager</a> to always hint glyphs.
+instruct the <a href="undocumented#Font_Manager">Font Manager</a> to always hint <a href="#Glyph">Glyphs</a>.
<a href="#Automatic_Hinting">Automatic Hinting</a> has no effect if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNo_Hinting">kNo Hinting</a> or
<a href="#SkPaint_kSlight_Hinting">kSlight Hinting</a>.
@@ -1510,14 +1511,14 @@ setting for <a href="#SkPaint_kAutoHinting_Flag">kAutoHinting Flag</a></td>
# <a name="Vertical_Text"></a> Vertical Text
<a href="undocumented#Text">Text</a> may be drawn by positioning each glyph, or by positioning the first glyph and
-using <a href="#Advance">Font Advance</a> to position subsequent glyphs. By default, each successive glyph
-is positioned to the right of the preceeding glyph. <a href="#Vertical_Text">Vertical Text</a> sets successive
-glyphs to position below the preceeding glyph.
+using <a href="#Advance">Font Advance</a> to position subsequent <a href="#Glyph">Glyphs</a>. By default, each successive glyph
+is positioned to the right of the preceding glyph. <a href="#Vertical_Text">Vertical Text</a> sets successive
+<a href="#Glyph">Glyphs</a> to position below the preceding glyph.
-<a href="undocumented#Skia">Skia</a> can translate text character codes as a series of glyphs, but does not implement
+<a href="undocumented#Skia">Skia</a> can translate text character codes as a series of <a href="#Glyph">Glyphs</a>, but does not implement
font substitution,
-textual substitution, line layout, or contextual spacing like kerning pairs. Use
-a text shaping engine likeHarfBuzzhttp://harfbuzz.org/to translate text runs
+textual substitution, line layout, or contextual spacing like <a href="undocumented#Kerning">Kerning</a> pairs. Use
+a text shaping engine likeHarfBuzzto translate text runs
into glyph series.
<a href="#Vertical_Text">Vertical Text</a> is clear if text is drawn left to right or set if drawn from top to bottom.
@@ -1540,7 +1541,7 @@ into glyph series.
bool isVerticalText() const
</pre>
-If true, glyphs are drawn top to bottom instead of left to right.
+If true, <a href="#Glyph">Glyphs</a> are drawn top to bottom instead of left to right.
Equivalent to <a href="#SkPaint_getFlags">getFlags</a> masked with <a href="#SkPaint_kVerticalText_Flag">kVerticalText Flag</a>.
@@ -1605,8 +1606,8 @@ bold font face using the platform's <a href="undocumented#Font_Manager">Font Man
Use <a href="#Text_Skew_X">Text Skew X</a> to approximate an italic font style when the italic font face
is not available.
-A <a href="undocumented#FreeType_based">FreeType-based</a> port may define <a href="undocumented#SK_USE_FREETYPE_EMBOLDEN">SK USE FREETYPE EMBOLDEN</a> at compile time to direct
-the font engine to create the bold glyphs. Otherwise, the extra bold is computed
+A <a href="undocumented#FreeType">FreeType</a> based port may define <a href="undocumented#SK_USE_FREETYPE_EMBOLDEN">SK USE FREETYPE EMBOLDEN</a> at compile time to direct
+the font engine to create the bold <a href="#Glyph">Glyphs</a>. Otherwise, the extra bold is computed
by increasing the stroke width and setting the <a href="#SkPaint_Style">Style</a> to <a href="#SkPaint_kStrokeAndFill_Style">kStrokeAndFill Style</a> as needed.
<a href="#Fake_Bold">Fake Bold</a> is disabled by default.
@@ -1653,7 +1654,7 @@ paint.isFakeBoldText() == !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag)
void setFakeBoldText(bool fakeBoldText)
</pre>
-Use increased stroke width when creating glyph bitmaps to approximate bolding.
+Use increased stroke width when creating glyph bitmaps to approximate a bold typeface.
Sets <a href="#SkPaint_kFakeBoldText_Flag">kFakeBoldText Flag</a> if <a href="#SkPaint_setFakeBoldText_fakeBoldText">fakeBoldText</a> is true.
Clears <a href="#SkPaint_kFakeBoldText_Flag">kFakeBoldText Flag</a> if <a href="#SkPaint_setFakeBoldText_fakeBoldText">fakeBoldText</a> is false.
@@ -1680,13 +1681,13 @@ paint1 == paint2
---
# <a name="Full_Hinting_Spacing"></a> Full Hinting Spacing
-<a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> adjusts the character spacing by the difference of the
-hinted and unhinted left and right side bearings,
-if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>. <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> only
-applies to platforms that use <a href="undocumented#FreeType">FreeType</a> as their <a href="#Engine">Font Engine</a>.
+if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>, <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> adjusts the character
+spacing by the difference of the hinted and <a href="undocumented#Unhinted">Unhinted</a> <a href="undocumented#Left_Side_Bearing">Left Side Bearing</a> and
+<a href="undocumented#Right_Side_Bearing">Right Side Bearing</a>. <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> only applies to platforms that use
+<a href="undocumented#FreeType">FreeType</a> as their <a href="#Engine">Font Engine</a>.
-<a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> is not related to text kerning, where the space between
-a specific pair of characters is adjusted using data in the font's kerning tables.
+<a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> is not related to text <a href="undocumented#Kerning">Kerning</a>, where the space between
+a specific pair of characters is adjusted using data in the font's <a href="undocumented#Kerning">Kerning</a> tables.
<a name="SkPaint_isDevKernText"></a>
## isDevKernText
@@ -1746,8 +1747,8 @@ paint1 == paint2
<a href="undocumented#Filter_Quality">Filter Quality</a> trades speed for image filtering when the image is scaled.
A lower <a href="undocumented#Filter_Quality">Filter Quality</a> draws faster, but has less fidelity.
A higher <a href="undocumented#Filter_Quality">Filter Quality</a> draws slower, but looks better.
-If the image is unscaled, the <a href="undocumented#Filter_Quality">Filter Quality</a> choice will not result in a noticable
-difference.
+If the image is drawn without scaling, the <a href="undocumented#Filter_Quality">Filter Quality</a> choice will not result
+in a noticeable difference.
<a href="undocumented#Filter_Quality">Filter Quality</a> is used in <a href="#Paint">Paint</a> passed as a parameter to
@@ -1838,7 +1839,7 @@ or stroked shape in a
32-bit value. Each component occupies 8-bits, ranging from zero: no contribution;
to 255: full intensity. All values in any combination are valid.
-<a href="undocumented#Color">Color</a> is not premultiplied;
+<a href="undocumented#Color">Color</a> is not <a href="#Premultiply">Premultiplied</a>;
<a href="#Alpha">Color Alpha</a> sets the transparency independent of <a href="#RGB">Color RGB</a>: <a href="#RGB_Red">Color RGB Red</a>, <a href="#RGB_Blue">Color RGB Blue</a>, and <a href="#RGB_Green">Color RGB Green</a>.
The bit positions of <a href="#Alpha">Color Alpha</a> and <a href="#RGB">Color RGB</a> are independent of the bit positions
@@ -1859,13 +1860,13 @@ on the output device, which may have more or fewer bits, and may have a differen
SkColor getColor() const
</pre>
-Retrieves <a href="#Alpha">Color Alpha</a> and <a href="#RGB">Color RGB</a>, unpremultiplied, packed into 32 bits.
+Retrieves <a href="#Alpha">Alpha</a> and <a href="#RGB">Color RGB</a>, <a href="#Unpremultiply">Unpremultiplied</a>, packed into 32 bits.
Use helpers <a href="undocumented#SkColorGetA">SkColorGetA</a>, <a href="undocumented#SkColorGetR">SkColorGetR</a>, <a href="undocumented#SkColorGetG">SkColorGetG</a>, and <a href="undocumented#SkColorGetB">SkColorGetB</a> to extract
a color component.
### Return Value
-<a href="undocumented#Unpremultiplied">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a>
### Example
@@ -1892,13 +1893,13 @@ Yellow is 100% red, 100% green, and 0% blue.
void setColor(SkColor color)
</pre>
-Sets <a href="#Alpha">Color Alpha</a> and <a href="#RGB">Color RGB</a> used when stroking and filling. The <a href="#SkPaint_setColor_color">color</a> is a 32-bit value,
-unpremutiplied, packing 8-bit components for <a href="#Alpha">Color Alpha</a>, <a href="#RGB_Red">Color RGB Red</a>, <a href="#RGB_Blue">Color RGB Blue</a>, and <a href="#RGB_Green">Color RGB Green</a>.
+Sets <a href="#Alpha">Alpha</a> and <a href="#RGB">Color RGB</a> used when stroking and filling. The <a href="#SkPaint_setColor_color">color</a> is a 32-bit value,
+<a href="#Unpremultiply">Unpremultiplied</a>, packing 8-bit components for <a href="#Alpha">Alpha</a>, <a href="#Red">Red</a>, <a href="#Blue">Blue</a>, and <a href="#Green">Green</a>.
### Parameters
<table> <tr> <td><a name="SkPaint_setColor_color"> <code><strong>color </strong></code> </a></td> <td>
-<a href="undocumented#Unpremultiplied">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="#ARGB">Color ARGB</a></td>
</tr>
</table>
@@ -1931,11 +1932,11 @@ green1 == green2
uint8_t getAlpha() const
</pre>
-Retrieves <a href="#Alpha">Color Alpha</a> from the <a href="undocumented#Color">Color</a> used when stroking and filling.
+Retrieves <a href="#Alpha">Alpha</a> from the <a href="undocumented#Color">Color</a> used when stroking and filling.
### Return Value
-<a href="#Alpha">Color Alpha</a> ranging from zero, fully transparent, to 255, fully opaque
+<a href="#Alpha">Alpha</a> ranging from zero, fully transparent, to 255, fully opaque
### Example
@@ -1958,7 +1959,7 @@ Retrieves <a href="#Alpha">Color Alpha</a> from the <a href="undocumented#Color"
void setAlpha(U8CPU a)
</pre>
-Replaces <a href="#Alpha">Color Alpha</a>, leaving <a href="#RGB">Color RGB</a>
+Replaces <a href="#Alpha">Alpha</a>, leaving <a href="#RGB">Color RGB</a>
unchanged. An out of range value triggers an assert in the debug
build. <a href="#SkPaint_setAlpha_a">a</a> is <a href="#SkPaint_setAlpha_a">a</a> value from zero to 255.
<a href="#SkPaint_setAlpha_a">a</a> set to zero makes <a href="undocumented#Color">Color</a> fully transparent; <a href="#SkPaint_setAlpha_a">a</a> set to 255 makes <a href="undocumented#Color">Color</a>
@@ -1967,7 +1968,7 @@ fully opaque.
### Parameters
<table> <tr> <td><a name="SkPaint_setAlpha_a"> <code><strong>a </strong></code> </a></td> <td>
-<a href="#Alpha">Color Alpha</a> component of <a href="undocumented#Color">Color</a></td>
+<a href="#Alpha">Alpha</a> component of <a href="undocumented#Color">Color</a></td>
</tr>
</table>
@@ -1993,8 +1994,7 @@ void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
</pre>
Sets <a href="undocumented#Color">Color</a> used when drawing solid fills. The color components range from 0 to 255.
-The color is unpremultiplied;
-<a href="#Alpha">Color Alpha</a> sets the transparency independent of <a href="#RGB">Color RGB</a>.
+The color is <a href="#Unpremultiply">Unpremultiplied</a>; <a href="#Alpha">Alpha</a> sets the transparency independent of <a href="#RGB">Color RGB</a>.
### Parameters
@@ -2085,8 +2085,8 @@ a fill draw.
<table>
<tr>
<td><a name="SkPaint_kFill_Style"> <code><strong>SkPaint::kFill_Style </strong></code> </a></td><td>0</td><td>Set to fill geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, <a href="undocumented#Oval">Oval</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
-<a href="undocumented#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a>, <a href="undocumented#Patch">Patch</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Sprite">Sprite</a>, and <a href="undocumented#Vertices">Vertices</a> are painted as if
+Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
+<a href="undocumented#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a>, <a href="#Patch">Patches</a>, <a href="undocumented#Region">Region</a>, <a href="#Sprite">Sprites</a>, and <a href="undocumented#Vertices">Vertices</a> are painted as if
<a href="#SkPaint_kFill_Style">kFill Style</a> is set, and ignore the set <a href="#SkPaint_Style">Style</a>.
The <a href="#Fill_Type">Path Fill Type</a> specifies additional rules to fill the area outside the path edge,
and to create an unfilled hole inside the shape.
@@ -2094,15 +2094,14 @@ and to create an unfilled hole inside the shape.
</tr>
<tr>
<td><a name="SkPaint_kStroke_Style"> <code><strong>SkPaint::kStroke_Style </strong></code> </a></td><td>1</td><td>Set to stroke geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Arc">Arc</a>, <a href="undocumented#Circle">Circle</a>, <a href="undocumented#Oval">Oval</a>,
-<a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
-<a href="undocumented#Arc">Arc</a>, <a href="undocumented#Line">Line</a>, <a href="undocumented#Point">Point</a>, and <a href="#Array">Point Array</a> are always drawn as if <a href="#SkPaint_kStroke_Style">kStroke Style</a> is set,
+Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
+<a href="#Arc">Arcs</a>, <a href="#Line">Lines</a>, and <a href="#Point">Points</a>, are always drawn as if <a href="#SkPaint_kStroke_Style">kStroke Style</a> is set,
and ignore the set <a href="#SkPaint_Style">Style</a>.
The stroke construction is unaffected by the <a href="#Fill_Type">Path Fill Type</a>.</td>
</tr>
<tr>
<td><a name="SkPaint_kStrokeAndFill_Style"> <code><strong>SkPaint::kStrokeAndFill_Style </strong></code> </a></td><td>2</td><td>Set to stroke and fill geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, <a href="undocumented#Oval">Oval</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
+Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
<a href="SkPath_Reference#Path">Path</a> is treated as if it is set to <a href="#SkPath_kWinding_FillType">SkPath::kWinding FillType</a>,
and the set <a href="#Fill_Type">Path Fill Type</a> is ignored.</td>
</tr>
@@ -2204,7 +2203,7 @@ The default width for the paint is zero.
### Example
-<div><fiddle-embed name="01e3e08a3022a351628ff54e84887756">raster gpu<div>The pixels hit to represent thin lines vary with the angle of the
+<div><fiddle-embed name="01e3e08a3022a351628ff54e84887756"><div>The pixels hit to represent thin lines vary with the angle of the
line and the platform's implementation.</div></fiddle-embed></div>
<a name="SkPaint_getStrokeWidth"></a>
@@ -2282,7 +2281,7 @@ is replaced with <a href="#SkPaint_kBevel_Join">kBevel Join</a>.
miter limit = 1 / sin ( angle / 2 )<a href="#Miter_Limit">Miter Limit</a> default value is 4.
The default may be changed at compile time by setting <a href="undocumented#SkPaintDefaults_MiterLimit">SkPaintDefaults MiterLimit</a>
-in <a href="undocumented#SkUserConfig.h">SkUserConfig.h</a> or as a define supplied by the build environment.
+in "<a href="undocumented#SkUserConfig">SkUserConfig</a>.h" or as a define supplied by the build environment.
Here are some miter limits and the angles that triggers them.
@@ -2698,8 +2697,8 @@ true if the path represents <a href="#Style_Fill">Style Fill</a>, or false if it
### Example
-<div><fiddle-embed name="cedd6233848198e1fca4d1e14816baaf"><div>A very small quad stroke is turned into a filled path with increasing levels of precision.
-At the lowest precision, the quad stroke is approximated by a rectangle.
+<div><fiddle-embed name="cedd6233848198e1fca4d1e14816baaf"><div>A very small <a href="#Quad">Quad</a> stroke is turned into a filled path with increasing levels of precision.
+At the lowest precision, the <a href="#Quad">Quad</a> stroke is approximated by a rectangle.
At the highest precision, the filled path has high fidelity compared to the original stroke.</div></fiddle-embed></div>
---
@@ -3134,7 +3133,7 @@ replace <a href="SkPath_Reference#Path">Path</a> with a modification when drawn<
---
# <a name="Mask_Filter_Methods"></a> Mask Filter Methods
-<a href="undocumented#Mask_Filter">Mask Filter</a> uses <a href="#Alpha">Color Alpha</a> of the shape drawn to create <a href="undocumented#Mask_Alpha">Mask Alpha</a>.
+<a href="undocumented#Mask_Filter">Mask Filter</a> uses coverage of the shape drawn to create <a href="undocumented#Mask_Alpha">Mask Alpha</a>.
<a href="undocumented#Mask_Filter">Mask Filter</a> operates at a lower level than <a href="undocumented#Rasterizer">Rasterizer</a>; <a href="undocumented#Mask_Filter">Mask Filter</a> takes a <a href="undocumented#Mask">Mask</a>,
and returns a <a href="undocumented#Mask">Mask</a>.
<a href="undocumented#Mask_Filter">Mask Filter</a> may change the geometry and transparency of the shape, such as creating a blur effect.
@@ -3327,7 +3326,7 @@ and returns a <a href="undocumented#Mask">Mask</a>.
<a href="undocumented#Rasterizer">Rasterizer</a> may change the geometry and transparency of the shape, such as
creating a shadow effect. <a href="undocumented#Rasterizer">Rasterizer</a> forms the base of <a href="#Layer">Rasterizer Layer</a>, which
creates effects like embossing and outlining.
-<a href="undocumented#Rasterizer">Rasterizer</a> applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Arc">Arc</a>, <a href="undocumented#Circle">Circle</a>, <a href="undocumented#Oval">Oval</a>,
+<a href="undocumented#Rasterizer">Rasterizer</a> applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>,
<a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
### Example
@@ -3423,7 +3422,7 @@ how geometry is converted to <a href="undocumented#Mask_Alpha">Mask Alpha</a></t
with <a href="undocumented#Blend_Mode">Blend Mode</a> set to <a href="#SkBlendMode_kSrcOver">SkBlendMode::kSrcOver</a>. <a href="undocumented#Image_Filter">Image Filter</a> creates a new bitmap,
which is drawn to the device using the set <a href="undocumented#Blend_Mode">Blend Mode</a>.
<a href="undocumented#Image_Filter">Image Filter</a> is higher level than <a href="undocumented#Mask_Filter">Mask Filter</a>; for instance, an <a href="undocumented#Image_Filter">Image Filter</a>
-can operate on all channels of <a href="undocumented#Color">Color</a>, while <a href="undocumented#Mask_Filter">Mask Filter</a> generates <a href="#Alpha">Color Alpha</a> only.
+can operate on all channels of <a href="undocumented#Color">Color</a>, while <a href="undocumented#Mask_Filter">Mask Filter</a> generates <a href="#Alpha">Alpha</a> only.
<a href="undocumented#Image_Filter">Image Filter</a> operates independently of and can be used in combination with
<a href="undocumented#Mask_Filter">Mask Filter</a> and <a href="undocumented#Rasterizer">Rasterizer</a>.
@@ -3660,11 +3659,11 @@ enum <a href="#SkPaint_Align">Align</a> {
};</pre>
<a href="#SkPaint_Align">Align</a> adjusts the text relative to the text position.
-<a href="#SkPaint_Align">Align</a> affects glyphs drawn with: <a href="#SkCanvas_drawText">SkCanvas::drawText</a>, <a href="#SkCanvas_drawPosText">SkCanvas::drawPosText</a>,
+<a href="#SkPaint_Align">Align</a> affects <a href="#Glyph">Glyphs</a> drawn with: <a href="#SkCanvas_drawText">SkCanvas::drawText</a>, <a href="#SkCanvas_drawPosText">SkCanvas::drawPosText</a>,
<a href="#SkCanvas_drawPosTextH">SkCanvas::drawPosTextH</a>, <a href="#SkCanvas_drawTextOnPath">SkCanvas::drawTextOnPath</a>,
<a href="#SkCanvas_drawTextOnPathHV">SkCanvas::drawTextOnPathHV</a>, <a href="#SkCanvas_drawTextRSXform">SkCanvas::drawTextRSXform</a>, <a href="#SkCanvas_drawTextBlob">SkCanvas::drawTextBlob</a>,
and <a href="#SkCanvas_drawString">SkCanvas::drawString</a>;
-as well as calls that place text glyphs like <a href="#SkPaint_getTextWidths">getTextWidths</a> and <a href="#SkPaint_getTextPath">getTextPath</a>.
+as well as calls that place text <a href="#Glyph">Glyphs</a> like <a href="#SkPaint_getTextWidths">getTextWidths</a> and <a href="#SkPaint_getTextPath">getTextPath</a>.
The text position is set by the font for both horizontal and vertical text.
Typically, for horizontal text, the position is to the left side of the glyph on the
@@ -3942,16 +3941,16 @@ enum <a href="#SkPaint_TextEncoding">TextEncoding</a> {
};</pre>
<a href="#SkPaint_TextEncoding">TextEncoding</a> determines whether text specifies character codes and their encoded size,
-or glyph indices. Character codes use the encoding specified by the<a href="undocumented#Unicode">Unicode</a> standardhttp://unicode.org/standard/standard.html.
+or glyph indices. Character codes use the encoding specified by the<a href="undocumented#Unicode">Unicode</a> standard.
Character codes encoded size are specified by <a href="undocumented#UTF_8">UTF-8</a>, <a href="undocumented#UTF_16">UTF-16</a>, or <a href="undocumented#UTF_32">UTF-32</a>.
All character encoding are able to represent all of <a href="undocumented#Unicode">Unicode</a>, differing only
in the total storage required.
-<a href="undocumented#UTF_8">UTF-8</a> (<a href="undocumented#RFC">RFC</a> 3629)https://tools.ietf.org/html/rfc3629is made up of 8-bit bytes,
+<a href="undocumented#UTF_8">UTF-8</a> (<a href="undocumented#RFC">RFC</a> 3629)is made up of 8-bit bytes,
and is a superset of <a href="undocumented#ASCII">ASCII</a>.
-<a href="undocumented#UTF_16">UTF-16</a> (<a href="undocumented#RFC">RFC</a> 2781)https://tools.ietf.org/html/rfc2781is made up of 16-bit words,
+<a href="undocumented#UTF_16">UTF-16</a> (<a href="undocumented#RFC">RFC</a> 2781)is made up of 16-bit words,
and is a superset of <a href="undocumented#Unicode">Unicode</a> ranges 0x0000 to 0xD7FF and 0xE000 to 0xFFFF.
-<a href="undocumented#UTF_32">UTF-32</a>http://www.unicode.org/versions/<a href="undocumented#Unicode5">Unicode5</a>.0.0/ch03.pdfis
+<a href="undocumented#UTF_32">UTF-32</a>is
made up of 32-bit words, and is a superset of <a href="undocumented#Unicode">Unicode</a>.
<a href="undocumented#Font_Manager">Font Manager</a> uses font data to convert character code points into glyph indices.
@@ -4050,7 +4049,7 @@ one of: <a href="#SkPaint_kUTF8_TextEncoding">kUTF8 TextEncoding</a>, <a href="#
---
# <a name="Font_Metrics"></a> Font Metrics
-<a href="#Font_Metrics">Font Metrics</a> describe dimensions common to the glyphs in <a href="undocumented#Typeface">Typeface</a>.
+<a href="#Font_Metrics">Font Metrics</a> describe dimensions common to the <a href="#Glyph">Glyphs</a> in <a href="undocumented#Typeface">Typeface</a>.
The dimensions are computed by <a href="undocumented#Font_Manager">Font Manager</a> from font data and do not take
<a href="#Paint">Paint</a> settings other than <a href="#Text_Size">Text Size</a> into account.
@@ -4099,7 +4098,7 @@ bool <a href="#SkPaint_FontMetrics_hasStrikeoutPosition">hasStrikeoutPosition(Sk
<a href="#SkPaint_FontMetrics">FontMetrics</a> is filled out by <a href="#SkPaint_getFontMetrics">getFontMetrics</a>. <a href="#SkPaint_FontMetrics">FontMetrics</a> contents reflect the values
computed by <a href="undocumented#Font_Manager">Font Manager</a> using <a href="undocumented#Typeface">Typeface</a>. Values are set to zero if they are
-not availble.
+not available.
<a href="#SkPaint_FontMetrics_fUnderlineThickness">fUnderlineThickness</a> and <a href="#SkPaint_FontMetrics_fUnderlinePosition">fUnderlinePosition</a> have a bit set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> if their values
are valid, since their value may be zero.
@@ -4178,12 +4177,12 @@ Maximum character width.
<a name="SkPaint_FontMetrics_fXMin"> <code><strong>SkScalar fXMin</strong></code> </a>
-Minimum bounding box x value for all glyphs.
+Minimum bounding box x value for all <a href="#Glyph">Glyphs</a>.
Typically less than zero.
<a name="SkPaint_FontMetrics_fXMax"> <code><strong>SkScalar fXMax</strong></code> </a>
-Maximum bounding box x value for all glyphs.
+Maximum bounding box x value for all <a href="#Glyph">Glyphs</a>.
Typically greater than zero.
<a name="SkPaint_FontMetrics_fXHeight"> <code><strong>SkScalar fXHeight</strong></code> </a>
@@ -4236,8 +4235,8 @@ bool hasUnderlineThickness(SkScalar* thickness) const
</pre>
If <a href="#Font_Metrics">Font Metrics</a> has a valid underline <a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a>, return true, and set
-<a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a> to that value. If it doesn't, return false, and ignore
-<a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a>.
+<a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a> to that value. If the underline <a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a> is not valid,
+return false, and ignore <a href="#SkPaint_FontMetrics_hasUnderlineThickness_thickness">thickness</a>.
### Parameters
@@ -4260,8 +4259,8 @@ bool hasUnderlinePosition(SkScalar* position) const
</pre>
If <a href="#Font_Metrics">Font Metrics</a> has a valid underline <a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a>, return true, and set
-<a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a> to that value. If it doesn't, return false, and ignore
-<a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a>.
+<a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a> to that value. If the underline <a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a> is not valid,
+return false, and ignore <a href="#SkPaint_FontMetrics_hasUnderlinePosition_position">position</a>.
### Parameters
@@ -4284,8 +4283,8 @@ bool hasStrikeoutThickness(SkScalar* thickness) const
</pre>
If <a href="#Font_Metrics">Font Metrics</a> has a valid strikeout <a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a>, return true, and set
-<a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a> to that value. If it doesn't, return false, and ignore
-<a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a>.
+<a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a> to that value. If the underline <a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a> is not valid,
+return false, and ignore <a href="#SkPaint_FontMetrics_hasStrikeoutThickness_thickness">thickness</a>.
### Parameters
@@ -4308,8 +4307,8 @@ bool hasStrikeoutPosition(SkScalar* position) const
</pre>
If <a href="#Font_Metrics">Font Metrics</a> has a valid strikeout <a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a>, return true, and set
-<a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a> to that value. If it doesn't, return false, and ignore
-<a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a>.
+<a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a> to that value. If the underline <a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a> is not valid,
+return false, and ignore <a href="#SkPaint_FontMetrics_hasStrikeoutPosition_position">position</a>.
### Parameters
@@ -4405,7 +4404,7 @@ textSize: 32 fontSpacing: 37.25
SkRect getFontBounds() const
</pre>
-Returns the union of bounds of all glyphs.
+Returns the union of bounds of all <a href="#Glyph">Glyphs</a>.
Returned dimensions are computed by <a href="undocumented#Font_Manager">Font Manager</a> from font data,
ignoring <a href="#SkPaint_Hinting">Hinting</a>. Includes <a href="#Text_Size">Text Size</a>, <a href="#Text_Scale_X">Text Scale X</a>,
and <a href="#Text_Skew_X">Text Skew X</a>, but not <a href="#Fake_Bold">Fake Bold</a> or <a href="undocumented#Path_Effect">Path Effect</a>.
@@ -4416,7 +4415,7 @@ returns the same bounds as <a href="#Font_Metrics">Font Metrics</a> { <a href="#
### Return Value
-union of bounds of all glyphs
+union of bounds of all <a href="#Glyph">Glyphs</a>
### Example
@@ -4457,7 +4456,7 @@ If <a href="#Text_Encoding">Text Encoding</a> is <a href="#SkPaint_kUTF8_TextEnc
### Parameters
<table> <tr> <td><a name="SkPaint_textToGlyphs_text"> <code><strong>text </strong></code> </a></td> <td>
-character stroage encoded with <a href="#Text_Encoding">Text Encoding</a></td>
+character storage encoded with <a href="#Text_Encoding">Text Encoding</a></td>
</tr> <tr> <td><a name="SkPaint_textToGlyphs_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
length of character storage in bytes</td>
</tr> <tr> <td><a name="SkPaint_textToGlyphs_glyphs"> <code><strong>glyphs </strong></code> </a></td> <td>
@@ -4482,14 +4481,14 @@ number of <a href="#SkPaint_textToGlyphs_glyphs">glyphs</a> represented by <a hr
int countText(const void* text, size_t byteLength) const
</pre>
-Returns the number of glyphs in <a href="#SkPaint_countText_text">text</a>.
-Uses <a href="#Text_Encoding">Text Encoding</a> to count the glyphs.
+Returns the number of <a href="#Glyph">Glyphs</a> in <a href="#SkPaint_countText_text">text</a>.
+Uses <a href="#Text_Encoding">Text Encoding</a> to count the <a href="#Glyph">Glyphs</a>.
Returns the same result as <a href="#SkPaint_textToGlyphs">textToGlyphs</a>.
### Parameters
<table> <tr> <td><a name="SkPaint_countText_text"> <code><strong>text </strong></code> </a></td> <td>
-character stroage encoded with <a href="#Text_Encoding">Text Encoding</a></td>
+character storage encoded with <a href="#Text_Encoding">Text Encoding</a></td>
</tr> <tr> <td><a name="SkPaint_countText_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
length of character storage in bytes</td>
</tr>
@@ -4497,7 +4496,7 @@ length of character storage in bytes</td>
### Return Value
-number of glyphs represented by <a href="#SkPaint_countText_text">text</a> of length <a href="#SkPaint_countText_byteLength">byteLength</a>
+number of <a href="#Glyph">Glyphs</a> represented by <a href="#SkPaint_countText_text">text</a> of length <a href="#SkPaint_countText_byteLength">byteLength</a>
### Example
@@ -4528,12 +4527,12 @@ If <a href="#Text_Encoding">Text Encoding</a> is <a href="#SkPaint_kGlyphID_Text
returns true if all glyph indices in <a href="#SkPaint_containsText_text">text</a> are non-zero;
does not check to see if <a href="#SkPaint_containsText_text">text</a> contains valid glyph indices for <a href="undocumented#Typeface">Typeface</a>.
-Returns true if bytelength is zero.
+Returns true if <a href="#SkPaint_containsText_byteLength">byteLength</a> is zero.
### Parameters
<table> <tr> <td><a name="SkPaint_containsText_text"> <code><strong>text </strong></code> </a></td> <td>
-array of characters or glyphs</td>
+array of characters or <a href="#Glyph">Glyphs</a></td>
</tr> <tr> <td><a name="SkPaint_containsText_byteLength"> <code><strong>byteLength </strong></code> </a></td> <td>
number of bytes in <a href="#SkPaint_containsText_text">text</a> array</td>
</tr>
@@ -4769,13 +4768,13 @@ glyph count in <a href="#SkPaint_getTextWidths_text">text</a>
### Example
-<div><fiddle-embed name="6b9e101f49e9c2c28755c5bdcef64dfb"><div>Bounds of glyphs increase for stroked <a href="#SkPaint_getTextWidths_text">text</a>, but <a href="#SkPaint_getTextWidths_text">text</a> advance remains the same.
+<div><fiddle-embed name="6b9e101f49e9c2c28755c5bdcef64dfb"><div>Bounds of <a href="#Glyph">Glyphs</a> increase for stroked <a href="#SkPaint_getTextWidths_text">text</a>, but <a href="#SkPaint_getTextWidths_text">text</a> advance remains the same.
The underlines show the <a href="#SkPaint_getTextWidths_text">text</a> advance, spaced to keep them distinct.</div></fiddle-embed></div>
---
# <a name="Text_Path"></a> Text Path
-<a href="#Text_Path">Text Path</a> describes the geometry of glyphs used to draw text.
+<a href="#Text_Path">Text Path</a> describes the geometry of <a href="#Glyph">Glyphs</a> used to draw text.
<a name="SkPaint_getTextPath"></a>
## getTextPath
@@ -4802,7 +4801,7 @@ x-coordinate of the origin of the <a href="#SkPaint_getTextPath_text">text</a></
</tr> <tr> <td><a name="SkPaint_getTextPath_y"> <code><strong>y </strong></code> </a></td> <td>
y-coordinate of the origin of the <a href="#SkPaint_getTextPath_text">text</a></td>
</tr> <tr> <td><a name="SkPaint_getTextPath_path"> <code><strong>path </strong></code> </a></td> <td>
-geometry of the glyphs</td>
+geometry of the <a href="#Glyph">Glyphs</a></td>
</tr>
</table>
@@ -4837,20 +4836,20 @@ number of bytes of <a href="#SkPaint_getPosTextPath_text">text</a></td>
</tr> <tr> <td><a name="SkPaint_getPosTextPath_pos"> <code><strong>pos </strong></code> </a></td> <td>
positions of each glyph</td>
</tr> <tr> <td><a name="SkPaint_getPosTextPath_path"> <code><strong>path </strong></code> </a></td> <td>
-geometry of the glyphs</td>
+geometry of the <a href="#Glyph">Glyphs</a></td>
</tr>
</table>
### Example
-<div><fiddle-embed name="7f27c93472aa99a7542fb3493076f072"><div>Simplifies three glyphs to eliminate overlaps, and strokes the result.</div></fiddle-embed></div>
+<div><fiddle-embed name="7f27c93472aa99a7542fb3493076f072"><div>Simplifies three <a href="#Glyph">Glyphs</a> to eliminate overlaps, and strokes the result.</div></fiddle-embed></div>
---
# <a name="Text_Intercepts"></a> Text Intercepts
-<a href="#Text_Intercepts">Text Intercepts</a> describe the intersection of drawn text glyphs with a pair
+<a href="#Text_Intercepts">Text Intercepts</a> describe the intersection of drawn text <a href="#Glyph">Glyphs</a> with a pair
of lines parallel to the text advance. <a href="#Text_Intercepts">Text Intercepts</a> permits creating a
-underline that skips descenders.
+underline that skips <a href="undocumented#Descenders">Descenders</a>.
<a name="SkPaint_getTextIntercepts"></a>
## getTextIntercepts
@@ -4862,7 +4861,7 @@ int getTextIntercepts(const void* text, size_t length, SkScalar x, SkScalar y,
Returns the number of <a href="#SkPaint_getTextIntercepts_intervals">intervals</a> that intersect <a href="#SkPaint_getTextIntercepts_bounds">bounds</a>.
<a href="#SkPaint_getTextIntercepts_bounds">bounds</a> describes a pair of lines parallel to the <a href="#SkPaint_getTextIntercepts_text">text</a> advance.
-The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+The return count is zero or a multiple of two, and is at most twice the number of <a href="#Glyph">Glyphs</a> in
the string.
Uses <a href="#Text_Encoding">Text Encoding</a> to decode <a href="#SkPaint_getTextIntercepts_text">text</a>, <a href="undocumented#Typeface">Typeface</a> to get the glyph paths,
and <a href="#Text_Size">Text Size</a>, <a href="#Fake_Bold">Fake Bold</a>, and <a href="undocumented#Path_Effect">Path Effect</a> to scale and modify the glyph paths.
@@ -4893,7 +4892,7 @@ number of intersections; may be zero
### Example
-<div><fiddle-embed name="2a0b80ed20d193c688085b79deb5bdc9"><div>Underline uses intercepts to draw on either side of the glyph descender.</div></fiddle-embed></div>
+<div><fiddle-embed name="2a0b80ed20d193c688085b79deb5bdc9"><div>Underline uses intercepts to draw on either side of the glyph Descender.</div></fiddle-embed></div>
---
@@ -4907,7 +4906,7 @@ int getPosTextIntercepts(const void* text, size_t length, const SkPoint pos[],
Returns the number of <a href="#SkPaint_getPosTextIntercepts_intervals">intervals</a> that intersect <a href="#SkPaint_getPosTextIntercepts_bounds">bounds</a>.
<a href="#SkPaint_getPosTextIntercepts_bounds">bounds</a> describes a pair of lines parallel to the <a href="#SkPaint_getPosTextIntercepts_text">text</a> advance.
-The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+The return count is zero or a multiple of two, and is at most twice the number of <a href="#Glyph">Glyphs</a> in
the string.
Uses <a href="#Text_Encoding">Text Encoding</a> to decode <a href="#SkPaint_getPosTextIntercepts_text">text</a>, <a href="undocumented#Typeface">Typeface</a> to get the glyph paths,
and <a href="#Text_Size">Text Size</a>, <a href="#Fake_Bold">Fake Bold</a>, and <a href="undocumented#Path_Effect">Path Effect</a> to scale and modify the glyph paths.
@@ -4936,7 +4935,7 @@ number of intersections; may be zero
### Example
-<div><fiddle-embed name="98b2dfc552d0540a7c041fe7a2839bd7"><div><a href="undocumented#Text">Text</a> intercepts draw on either side of, but not inside, glyphs in a run.</div></fiddle-embed></div>
+<div><fiddle-embed name="98b2dfc552d0540a7c041fe7a2839bd7"><div><a href="undocumented#Text">Text</a> intercepts draw on either side of, but not inside, <a href="#Glyph">Glyphs</a> in a run.</div></fiddle-embed></div>
---
@@ -4951,7 +4950,7 @@ int getPosTextHIntercepts(const void* text, size_t length, const SkScalar xpos[]
Returns the number of <a href="#SkPaint_getPosTextHIntercepts_intervals">intervals</a> that intersect <a href="#SkPaint_getPosTextHIntercepts_bounds">bounds</a>.
<a href="#SkPaint_getPosTextHIntercepts_bounds">bounds</a> describes a pair of lines parallel to the <a href="#SkPaint_getPosTextHIntercepts_text">text</a> advance.
-The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+The return count is zero or a multiple of two, and is at most twice the number of <a href="#Glyph">Glyphs</a> in
the string.
Uses <a href="#Text_Encoding">Text Encoding</a> to decode <a href="#SkPaint_getPosTextHIntercepts_text">text</a>, <a href="undocumented#Typeface">Typeface</a> to get the glyph paths,
and <a href="#Text_Size">Text Size</a>, <a href="#Fake_Bold">Fake Bold</a>, and <a href="undocumented#Path_Effect">Path Effect</a> to scale and modify the glyph paths.
@@ -4996,18 +4995,18 @@ int getTextBlobIntercepts(const SkTextBlob* blob, const SkScalar bounds[2],
Returns the number of <a href="#SkPaint_getTextBlobIntercepts_intervals">intervals</a> that intersect <a href="#SkPaint_getTextBlobIntercepts_bounds">bounds</a>.
<a href="#SkPaint_getTextBlobIntercepts_bounds">bounds</a> describes a pair of lines parallel to the text advance.
-The return count is zero or a multiple of two, and is at most twice the number of glyphs in
+The return count is zero or a multiple of two, and is at most twice the number of <a href="#Glyph">Glyphs</a> in
the string.
Uses <a href="#Text_Encoding">Text Encoding</a> to decode text, <a href="undocumented#Typeface">Typeface</a> to get the glyph paths,
and <a href="#Text_Size">Text Size</a>, <a href="#Fake_Bold">Fake Bold</a>, and <a href="undocumented#Path_Effect">Path Effect</a> to scale and modify the glyph paths.
-Uses pos array and <a href="#Text_Align">Text Align</a> to position <a href="#SkPaint_getTextBlobIntercepts_intervals">intervals</a>.
+Uses run array and <a href="#Text_Align">Text Align</a> to position <a href="#SkPaint_getTextBlobIntercepts_intervals">intervals</a>.
Pass nullptr for <a href="#SkPaint_getTextBlobIntercepts_intervals">intervals</a> to determine the size of the interval array.
<a href="#SkPaint_getTextBlobIntercepts_intervals">intervals</a> are cached to improve performance for multiple calls.
### Parameters
<table> <tr> <td><a name="SkPaint_getTextBlobIntercepts_blob"> <code><strong>blob </strong></code> </a></td> <td>
-glyphs, positions, and text paint attributes</td>
+<a href="#Glyph">Glyphs</a>, positions, and text paint attributes</td>
</tr> <tr> <td><a name="SkPaint_getTextBlobIntercepts_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
lower and upper line parallel to the advance</td>
</tr> <tr> <td><a name="SkPaint_getTextBlobIntercepts_intervals"> <code><strong>intervals </strong></code> </a></td> <td>
@@ -5035,8 +5034,8 @@ bool nothingToDraw() const
Returns true if <a href="#Paint">Paint</a> prevents all drawing;
otherwise, the <a href="#Paint">Paint</a> may or may not allow drawing.
-Returns true if <a href="undocumented#Blend_Mode">Blend Mode</a> and <a href="#Alpha">Color Alpha</a> are enabled,
-and computed <a href="#Alpha">Color Alpha</a> is zero.
+Returns true if, for example, <a href="undocumented#Blend_Mode">Blend Mode</a> combined with <a href="#Alpha">Color Alpha</a> computes a
+new <a href="#Alpha">Alpha</a> of zero.
### Return Value
@@ -5090,13 +5089,13 @@ const SkRect& computeFastBounds(const SkRect& orig, SkRect* storage) const
Only call this if <a href="#SkPaint_canComputeFastBounds">canComputeFastBounds</a> returned true. This takes a
raw rectangle (the raw bounds of a shape), and adjusts it for stylistic
effects in the paint (e.g. stroking). If needed, it uses the <a href="#SkPaint_computeFastBounds_storage">storage</a>
-rect parameter. It returns the adjusted bounds that can then be used
+parameter. It returns the adjusted bounds that can then be used
for <a href="#SkCanvas_quickReject">SkCanvas::quickReject</a> tests.
-The returned rect will either be <a href="#SkPaint_computeFastBounds_orig">orig</a> or <a href="#SkPaint_computeFastBounds_storage">storage</a>, thus the caller
+The returned <a href="undocumented#Rect">Rect</a> will either be <a href="#SkPaint_computeFastBounds_orig">orig</a> or <a href="#SkPaint_computeFastBounds_storage">storage</a>, thus the caller
should not rely on <a href="#SkPaint_computeFastBounds_storage">storage</a> being set to the result, but should always
-use the retured value. It is legal for <a href="#SkPaint_computeFastBounds_orig">orig</a> and <a href="#SkPaint_computeFastBounds_storage">storage</a> to be the same
-rect.
+use the returned value. It is legal for <a href="#SkPaint_computeFastBounds_orig">orig</a> and <a href="#SkPaint_computeFastBounds_storage">storage</a> to be the same
+<a href="undocumented#Rect">Rect</a>.
### Parameters
@@ -5143,8 +5142,9 @@ const SkRect& doComputeFastBounds(const SkRect& orig, SkRect* storage,
Style style) const
</pre>
-Take the <a href="#SkPaint_doComputeFastBounds_style">style</a> explicitly, so the caller can force us to be stroked
-without having to make a copy of the paint just to change that field.
+Computes the bounds, overriding the <a href="#Paint">Paint</a> <a href="#SkPaint_Style">Style</a>. This can be used to
+account for additional width required by stroking <a href="#SkPaint_doComputeFastBounds_orig">orig</a>, without
+altering <a href="#SkPaint_Style">Style</a> set to fill.
### Parameters
@@ -5170,12 +5170,14 @@ fast computed bounds
void toString(SkString* str) const;
</pre>
-Converts <a href="#Paint">Paint</a> to machine parsable form in developer mode.
+Creates string representation of <a href="#Paint">Paint</a>. The representation is read by
+internal debugging tools. The interface and implementation may be
+suppressed by defining <a href="undocumented#SK_IGNORE_TO_STRING">SK IGNORE TO STRING</a>.
### Parameters
<table> <tr> <td><a name="SkPaint_toString_str"> <code><strong>str </strong></code> </a></td> <td>
-storage for string containing parsable <a href="#Paint">Paint</a></td>
+storage for string representation of <a href="#Paint">Paint</a></td>
</tr>
</table>
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index abd5e67644..9de8b30713 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -16,7 +16,7 @@ the middle entry as the end of the first <a href="undocumented#Line">Line</a> an
<a href="#Path">Path</a> components <a href="#Arc">Arc</a>, <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, and <a href="undocumented#Oval">Oval</a> are composed of
<a href="#Line">Lines</a> and <a href="#Curve">Curves</a> with as many <a href="#Verb">Verbs</a> and <a href="#Point">Points</a> required
for an exact description. Once added to <a href="#Path">Path</a>, these components may lose their
-identity; although <a href="#Path">Path</a> can be inspected to determine if it decribes a single
+identity; although <a href="#Path">Path</a> can be inspected to determine if it describes a single
<a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, <a href="undocumented#Round_Rect">Round Rect</a>, and so on.
### Example
@@ -51,7 +51,7 @@ are required to satisfy <a href="#Verb_Array">Verb Array</a>. First <a href="#Ve
### Example
<div><fiddle-embed name="0374f2dcd7effeb1dd435205a6c2de6f"><div>Each <a href="#SkPath_moveTo">SkPath::moveTo</a> starts a new <a href="#Contour">Contour</a>, and content after <a href="#SkPath_close">SkPath::close()</a>
-also starts a new <a href="#Contour">Contour</a>. Since <a href="#SkPath_conicTo">SkPath::conicTo</a> wasn't preceded by
+also starts a new <a href="#Contour">Contour</a>. Since <a href="#SkPath_conicTo">SkPath::conicTo</a> is not preceded by
<a href="#SkPath_moveTo">SkPath::moveTo</a>, the first <a href="undocumented#Point">Point</a> of the third <a href="#Contour">Contour</a> starts at the last <a href="undocumented#Point">Point</a>
of the second <a href="#Contour">Contour</a>.</div></fiddle-embed></div>
@@ -82,10 +82,10 @@ makes them visible.
outline a figure. <a href="#Path">Path</a> always starts with a move verb to a <a href="undocumented#Cartesian">Cartesian</a>
coordinate, and may be followed by additional verbs that add lines or curves.
Adding a <a href="#SkPath_close">close</a> verb makes the geometry into a continuous loop, a closed contour.
-<a href="#Path">Paths</a> may contain any number of contours, each beginnning with a move verb.
+<a href="#Path">Paths</a> may contain any number of contours, each beginning with a move verb.
<a href="#Path">Path</a> contours may contain only a move verb, or may also contain lines,
-quadratic Beziers, conics, and cubic Beziers. <a href="#Path">Path</a> contours may be open or
+<a href="#Quad">Quadratic Beziers</a>, <a href="#Conic">Conics</a>, and <a href="#Cubic">Cubic Beziers</a>. <a href="#Path">Path</a> contours may be open or
closed.
When used to draw a filled area, <a href="#Path">Path</a> describes whether the fill is inside or
@@ -102,12 +102,11 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| constants | description |
| --- | --- |
| <a href="#SkPath_AddPathMode">AddPathMode</a> | Sets <a href="#SkPath_addPath">addPath</a> options. |
-| <a href="#SkPath_ArcSize">ArcSize</a> | Sets <a href="#SkPath_arcTo_4">arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep, SkScalar x, SkScalar y)</a> options. |
+| <a href="#SkPath_ArcSize">ArcSize</a> | Used by <a href="#SkPath_arcTo_4">arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep, SkScalar x, SkScalar y)</a>. |
| <a href="#SkPath_Convexity">Convexity</a> | Returns if <a href="#Path">Path</a> is convex or concave. |
| <a href="#SkPath_Direction">Direction</a> | Sets <a href="#Contour">Contour</a> clockwise or counterclockwise. |
| <a href="#SkPath_FillType">FillType</a> | Sets winding rule and inverse fill. |
-| <a href="#SkPath_SegmentMask">SegmentMask</a> |
-<a href="#SkPath_Verb">Verb</a>| Controls how <a href="#Path">Path</a> <a href="#Point">Points</a> are interpreted. |
+| <a href="#SkPath_SegmentMask">SegmentMask</a> | <a href="#SkPath_Verb">Verb</a> | Controls how <a href="#Path">Path</a> <a href="#Point">Points</a> are interpreted. |
## <a name="Classes_and_Structs"></a> Classes and Structs
@@ -159,8 +158,8 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_countPoints">countPoints</a> | Returns <a href="#Point_Array">Point Array</a> length. |
| <a href="#SkPath_countVerbs">countVerbs</a> | Returns <a href="#Verb_Array">Verb Array</a> length. |
| <a href="#SkPath_cubicTo">cubicTo</a> | Appends <a href="#Cubic">Cubic</a>. |
-| <a href="#SkPath_dump_2">dump</a> | Sends text representation using floats to stdout. |
-| <a href="#SkPath_dumpHex">dumpHex</a> | Sends text representation using hexadecimal to stdout. |
+| <a href="#SkPath_dump_2">dump</a> | Sends text representation using floats to standard output. |
+| <a href="#SkPath_dumpHex">dumpHex</a> | Sends text representation using hexadecimal to standard output. |
| <a href="#SkPath_getBounds">getBounds</a> | Returns maximum and minimum of <a href="#Point_Array">Point Array</a>. |
| <a href="#SkPath_getConvexity">getConvexity</a> | Returns geometry convexity, computing if necessary. |
| <a href="#SkPath_getConvexityOrUnknown">getConvexityOrUnknown</a> | Returns geometry convexity if known. |
@@ -430,7 +429,7 @@ Releases ownership of any shared data and deletes data if <a href="#Path">Path</
### Example
-<div><fiddle-embed name="01ad6be9b7d15a2217daea273eb3d466"><div>delete calls <a href="#Path">Path</a> destructor, but copy of original in path2 is unaffected.</div></fiddle-embed></div>
+<div><fiddle-embed name="01ad6be9b7d15a2217daea273eb3d466"><div>delete calls <a href="#Path">Path</a> <a href="undocumented#Destructor">Destructor</a>, but copy of original in path2 is unaffected.</div></fiddle-embed></div>
### See Also
@@ -456,7 +455,7 @@ pointers are not exposed.
### Parameters
<table> <tr> <td><a name="SkPath_copy_assignment_operator_path"> <code><strong>path </strong></code> </a></td> <td>
-<a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, <a href="#Weight">Weights</a>, amd <a href="#Fill_Type">Fill Type</a> to copy</td>
+<a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, <a href="#Weight">Weights</a>, and <a href="#Fill_Type">Fill Type</a> to copy</td>
</tr>
</table>
@@ -575,7 +574,7 @@ Return true if <a href="#Path">Paths</a> contain equal <a href="#Verb">Verbs</a>
If <a href="#Path">Paths</a> contain one or more <a href="#Conic">Conics</a>, the <a href="#Weight">Weights</a> must match.
<a href="#SkPath_conicTo">conicTo</a> may add different <a href="#Verb">Verbs</a> depending on <a href="#Conic_Weight">Conic Weight</a>, so it is not
-trival to <a href="#SkPath_interpolate">interpolate</a> a pair of <a href="#Path">Paths</a> containing <a href="#Conic">Conics</a> with different
+trivial to <a href="#SkPath_interpolate">interpolate</a> a pair of <a href="#Path">Paths</a> containing <a href="#Conic">Conics</a> with different
<a href="#Conic_Weight">Conic Weight</a> values.
### Parameters
@@ -1064,7 +1063,7 @@ bool isRRect(SkRRect* rrect, Direction* dir = nullptr, unsigned* start = nullptr
</pre>
Returns true if constructed by <a href="#SkPath_addRoundRect">addRoundRect</a>, <a href="#SkPath_addRRect">addRRect</a>; and if construction
-is not empty, not <a href="undocumented#Rect">Rect</a>, and not <a href="undocumented#Oval">Oval</a>. <a href="#Path">Path</a> constructed with other other calls
+is not empty, not <a href="undocumented#Rect">Rect</a>, and not <a href="undocumented#Oval">Oval</a>. <a href="#Path">Path</a> constructed with other calls
will not return true though <a href="#Path">Path</a> draws <a href="undocumented#Round_Rect">Round Rect</a>.
<a href="#SkPath_isRRect_rrect">rrect</a> receives bounds of <a href="undocumented#Round_Rect">Round Rect</a>.
@@ -1089,11 +1088,12 @@ storage for <a href="#SkPath_isRRect_start">start</a> of <a href="undocumented#R
### Return Value
-true for <a href="undocumented#Round_Rect">Round Rect</a> <a href="#Path">Path</a> constructed by <a href="#SkPath_addRoundRect">addRoundRect</a> or <a href="#SkPath_addRRect">addRRect</a>
+true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> only <a href="undocumented#Round_Rect">Round Rect</a>
### Example
-<div><fiddle-embed name="f2b7e57a385e6604475c99ec8daa2697"></fiddle-embed></div>
+<div><fiddle-embed name="f2b7e57a385e6604475c99ec8daa2697"><div>Draw rounded rectangle and its bounds. Draw an arc indicating where the rounded
+rectangle starts and its direction.</div></fiddle-embed></div>
### See Also
@@ -1108,7 +1108,7 @@ true for <a href="undocumented#Round_Rect">Round Rect</a> <a href="#Path">Path</
void reset()
</pre>
-Sets <a href="#Path">Path</a> to its intial state.
+Sets <a href="#Path">Path</a> to its initial state.
Removes <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Weight">Weights</a>, and sets <a href="#SkPath_FillType">FillType</a> to <a href="#SkPath_kWinding_FillType">kWinding FillType</a>.
Internal storage associated with <a href="#Path">Path</a> is released.
@@ -1129,7 +1129,7 @@ Internal storage associated with <a href="#Path">Path</a> is released.
void rewind()
</pre>
-Sets <a href="#Path">Path</a> to its intial state, preserving internal storage.
+Sets <a href="#Path">Path</a> to its initial state, preserving internal storage.
Removes <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Weight">Weights</a>, and sets <a href="#SkPath_FillType">FillType</a> to <a href="#SkPath_kWinding_FillType">kWinding FillType</a>.
Internal storage associated with <a href="#Path">Path</a> is retained.
@@ -1303,7 +1303,7 @@ Mark temporary paths, discarded or modified after use, as volatile
to inform <a href="undocumented#Device">Device</a> that the path need not be cached.
Mark animating <a href="#Path">Path</a> volatile to improve performance.
-Mark unchanging <a href="#Path">Path</a> non-volative to improve repeated rendering.
+Mark unchanging <a href="#Path">Path</a> non-volatile to improve repeated rendering.
<a href="undocumented#Raster_Surface">Raster Surface</a> <a href="#Path">Path</a> draws are affected by volatile for some shadows.
<a href="undocumented#GPU_Surface">GPU Surface</a> <a href="#Path">Path</a> draws are affected by volatile for some shadows and concave geometries.
@@ -1356,8 +1356,8 @@ true if <a href="undocumented#Line">Line</a> is degenerate; its length is effect
### Example
-<div><fiddle-embed name="97a031f9186ade586928563840ce9116"><div>As single precision floats, 100 and 100.000001f have the same bit representation,
-and are exactly equal. 100 and 100.0001f have different bit representations, and
+<div><fiddle-embed name="97a031f9186ade586928563840ce9116"><div>As single precision floats, 100 and 100.000001 have the same bit representation,
+and are exactly equal. 100 and 100.0001 have different bit representations, and
are not exactly equal, but are nearly equal.</div>
#### Example Output
@@ -1392,11 +1392,11 @@ treated as a point.
### Parameters
<table> <tr> <td><a name="SkPath_IsQuadDegenerate_p1"> <code><strong>p1 </strong></code> </a></td> <td>
-quad start point</td>
+<a href="#Quad">Quad</a> start point</td>
</tr> <tr> <td><a name="SkPath_IsQuadDegenerate_p2"> <code><strong>p2 </strong></code> </a></td> <td>
-quad control point</td>
+<a href="#Quad">Quad</a> control point</td>
</tr> <tr> <td><a name="SkPath_IsQuadDegenerate_p3"> <code><strong>p3 </strong></code> </a></td> <td>
-quad end point</td>
+<a href="#Quad">Quad</a> end point</td>
</tr> <tr> <td><a name="SkPath_IsQuadDegenerate_exact"> <code><strong>exact </strong></code> </a></td> <td>
if true, returns true only if <a href="#SkPath_IsQuadDegenerate_p1">p1</a>, <a href="#SkPath_IsQuadDegenerate_p2">p2</a>, and <a href="#SkPath_IsQuadDegenerate_p3">p3</a> are equal;
if false, returns true if <a href="#SkPath_IsQuadDegenerate_p1">p1</a>, <a href="#SkPath_IsQuadDegenerate_p2">p2</a>, and <a href="#SkPath_IsQuadDegenerate_p3">p3</a> are equal or nearly equal</td>
@@ -1409,9 +1409,9 @@ true if <a href="#Quad">Quad</a> is degenerate; its length is effectively zero
### Example
-<div><fiddle-embed name="1d50896c528cd4581966646b7d96acff"><div>As single precision floats: 100, 100.00001f, and 100.00002f have different bit representations
+<div><fiddle-embed name="1d50896c528cd4581966646b7d96acff"><div>As single precision floats: 100, 100.00001, and 100.00002 have different bit representations
but nearly the same value. Translating all three by 1000 gives them the same bit representation;
-the fractional portion of the number can't be represented by the float and is lost.</div>
+the fractional portion of the number can not be represented by the float and is lost.</div>
#### Example Output
@@ -1445,13 +1445,13 @@ treated as a point.
### Parameters
<table> <tr> <td><a name="SkPath_IsCubicDegenerate_p1"> <code><strong>p1 </strong></code> </a></td> <td>
-cubic start point</td>
+<a href="#Cubic">Cubic</a> start point</td>
</tr> <tr> <td><a name="SkPath_IsCubicDegenerate_p2"> <code><strong>p2 </strong></code> </a></td> <td>
-cubic control point 1</td>
+<a href="#Cubic">Cubic</a> control point 1</td>
</tr> <tr> <td><a name="SkPath_IsCubicDegenerate_p3"> <code><strong>p3 </strong></code> </a></td> <td>
-cubic control point 2</td>
+<a href="#Cubic">Cubic</a> control point 2</td>
</tr> <tr> <td><a name="SkPath_IsCubicDegenerate_p4"> <code><strong>p4 </strong></code> </a></td> <td>
-cubic end point</td>
+<a href="#Cubic">Cubic</a> end point</td>
</tr> <tr> <td><a name="SkPath_IsCubicDegenerate_exact"> <code><strong>exact </strong></code> </a></td> <td>
if true, returns true only if <a href="#SkPath_IsCubicDegenerate_p1">p1</a>, <a href="#SkPath_IsCubicDegenerate_p2">p2</a>, <a href="#SkPath_IsCubicDegenerate_p3">p3</a>, and <a href="#SkPath_IsCubicDegenerate_p4">p4</a> are equal;
if false, returns true if <a href="#SkPath_IsCubicDegenerate_p1">p1</a>, <a href="#SkPath_IsCubicDegenerate_p2">p2</a>, <a href="#SkPath_IsCubicDegenerate_p3">p3</a>, and <a href="#SkPath_IsCubicDegenerate_p4">p4</a> are equal or nearly equal</td>
@@ -1522,7 +1522,7 @@ second move is not line
<a href="#Point_Array">Point Array</a> <a href="#SkPath_contains">contains</a> <a href="#Point">Points</a> satisfying the allocated <a href="#Point">Points</a> for
each <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>. For instance, <a href="#Path">Path</a> containing one <a href="#Contour">Contour</a> with <a href="undocumented#Line">Line</a>
-and <a href="#Quad">Quad</a> is described by <a href="#Verb_Array">Verb Array</a>: move to, line to, quad to; and
+and <a href="#Quad">Quad</a> is described by <a href="#Verb_Array">Verb Array</a>: Verb::kMoveTo, Verb::kLineTo, Verb::kQuadTo; and
one <a href="undocumented#Point">Point</a> for move, one <a href="undocumented#Point">Point</a> for <a href="undocumented#Line">Line</a>, two <a href="#Point">Points</a> for <a href="#Quad">Quad</a>; totaling four <a href="#Point">Points</a>.
<a href="#Point_Array">Point Array</a> may be read directly from <a href="#Path">Path</a> with <a href="#SkPath_getPoints">getPoints</a>, or inspected with
@@ -1749,7 +1749,7 @@ Cached state is also exchanged. <a href="#SkPath_swap">swap</a> internally excha
it is lightweight and does not allocate memory.
<a href="#SkPath_swap">swap</a> usage has largely been replaced by <a href="#SkPath_copy_assignment_operator">operator=(const SkPath& path)</a>.
-<a href="#Path">Paths</a> do not copy their content on assignment util they are written to,
+<a href="#Path">Paths</a> do not copy their content on assignment until they are written to,
making assignment as efficient as <a href="#SkPath_swap">swap</a>.
### Parameters
@@ -1946,7 +1946,7 @@ reducing the number and size of allocations when creating <a href="#Path">Path</
### Parameters
<table> <tr> <td><a name="SkPath_incReserve_extraPtCount"> <code><strong>extraPtCount </strong></code> </a></td> <td>
-number of additional <a href="#Point">Points</a> to preallocate</td>
+number of additional <a href="#Point">Points</a> to allocate</td>
</tr>
</table>
@@ -2021,7 +2021,7 @@ void rMoveTo(SkScalar dx, SkScalar dy)
Adds beginning of <a href="#Contour">Contour</a> relative to <a href="#Last_Point">Last Point</a>.
If <a href="#Path">Path</a> is empty, starts <a href="#Contour">Contour</a> at (<a href="#SkPath_rMoveTo_dx">dx</a>, <a href="#SkPath_rMoveTo_dy">dy</a>).
Otherwise, start <a href="#Contour">Contour</a> at <a href="#Last_Point">Last Point</a> <a href="#SkPath_offset">offset</a> by (<a href="#SkPath_rMoveTo_dx">dx</a>, <a href="#SkPath_rMoveTo_dy">dy</a>).
-Function name stands for relative move to.
+Function name stands for "relative move to".
### Parameters
@@ -2114,7 +2114,7 @@ Adds <a href="undocumented#Line">Line</a> from <a href="#Last_Point">Last Point<
Appends <a href="#SkPath_kMove_Verb">kMove Verb</a> to <a href="#Verb_Array">Verb Array</a> and (0, 0) to <a href="#Point_Array">Point Array</a>, if needed;
then appends <a href="#SkPath_kLine_Verb">kLine Verb</a> to <a href="#Verb_Array">Verb Array</a> and <a href="undocumented#Line">Line</a> end to <a href="#Point_Array">Point Array</a>.
<a href="undocumented#Line">Line</a> end is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (<a href="#SkPath_rLineTo_dx">dx</a>, <a href="#SkPath_rLineTo_dy">dy</a>).
-Function name stands for relative line to.
+Function name stands for "relative line to".
### Parameters
@@ -2239,7 +2239,7 @@ if needed; then appends <a href="#SkPath_kQuad_Verb">kQuad Verb</a> to <a href="
control and <a href="#Quad">Quad</a> end to <a href="#Point_Array">Point Array</a>.
<a href="#Quad">Quad</a> control is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (<a href="#SkPath_rQuadTo_dx1">dx1</a>, <a href="#SkPath_rQuadTo_dy1">dy1</a>).
<a href="#Quad">Quad</a> end is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (<a href="#SkPath_rQuadTo_dx2">dx2</a>, <a href="#SkPath_rQuadTo_dy2">dy2</a>).
-Function name stands for relative quad to.
+Function name stands for "relative quad to".
### Parameters
@@ -2309,7 +2309,7 @@ done
</fiddle-embed></div>
-If weight is greater than one, <a href="#Conic">Conic</a> is a hyperbolic segment. As w gets large,
+If weight is greater than one, <a href="#Conic">Conic</a> is a hyperbolic segment. As weight gets large,
a hyperbolic segment can be approximated by straight lines connecting the
control <a href="undocumented#Point">Point</a> with the end <a href="#Point">Points</a>.
@@ -2410,7 +2410,7 @@ weight of added <a href="#Conic">Conic</a></td>
### Example
<div><fiddle-embed name="22d25e03b19d5bae92118877e462361b"><div><a href="#Conic">Conics</a> and arcs use identical representations. As the arc sweep increases
-the conic weight also increases, but remains smaller than one.</div></fiddle-embed></div>
+the <a href="#Conic_Weight">Conic Weight</a> also increases, but remains smaller than one.</div></fiddle-embed></div>
### See Also
@@ -2440,7 +2440,7 @@ In all cases appends <a href="#Point">Points</a> control and end to <a href="#Po
control is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (<a href="#SkPath_rConicTo_dx1">dx1</a>, <a href="#SkPath_rConicTo_dy1">dy1</a>).
end is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (<a href="#SkPath_rConicTo_dx2">dx2</a>, <a href="#SkPath_rConicTo_dy2">dy2</a>).
-Function name stands for relative conic to.
+Function name stands for "relative conic to".
### Parameters
@@ -2468,7 +2468,7 @@ weight of added <a href="#Conic">Conic</a></td>
---
# <a name="Cubic"></a> Cubic
-<a href="#Cubic">Cubic</a> describes a cubic <a href="undocumented#Bezier">Bezier</a>, a third-order curve.
+<a href="#Cubic">Cubic</a> describes a <a href="undocumented#Bezier">Bezier</a> curve segment described by a third-order polynomial.
<a href="#Cubic">Cubic</a> begins at a start <a href="undocumented#Point">Point</a>, curving towards the first control <a href="undocumented#Point">Point</a>;
and curves from the end <a href="undocumented#Point">Point</a> towards the second control <a href="undocumented#Point">Point</a>.
@@ -2570,7 +2570,7 @@ if needed; then appends <a href="#SkPath_kCubic_Verb">kCubic Verb</a> to <a href
control and <a href="#Cubic">Cubic</a> end to <a href="#Point_Array">Point Array</a>.
<a href="#Cubic">Cubic</a> control is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (dx1, dy1).
<a href="#Cubic">Cubic</a> end is <a href="#Last_Point">Last Point</a> plus <a href="undocumented#Vector">Vector</a> (dx2, dy2).
-Function name stands for relative cubic to.
+Function name stands for "relative cubic to".
### Parameters
@@ -2717,7 +2717,7 @@ The length of <a href="undocumented#Vector">Vector</a> from (<a href="#SkPath_ar
tangents are nearly parallel, <a href="#SkPath_arcTo">arcTo</a> appends <a href="undocumented#Line">Line</a> from last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> to (<a href="#SkPath_arcTo_2_x1">x1</a>, <a href="#SkPath_arcTo_2_y1">y1</a>).
<a href="#SkPath_arcTo">arcTo</a> appends at most one <a href="undocumented#Line">Line</a> and one <a href="#Conic">Conic</a>.
-<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="undocumented#PostScript_arct">PostScript arct</a> and <a href="undocumented#HTML_Canvas_arcTo">HTML Canvas arcTo</a>.
+<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="#Arct">PostScript Arct</a> and <a href="undocumented#HTML_Canvas_ArcTo">HTML Canvas ArcTo</a>.
### Parameters
@@ -2770,7 +2770,7 @@ The length of <a href="undocumented#Vector">Vector</a> from <a href="#SkPath_arc
tangents are nearly parallel, <a href="#SkPath_arcTo">arcTo</a> appends <a href="undocumented#Line">Line</a> from last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> to <a href="#SkPath_arcTo_3_p1">p1</a>.
<a href="#SkPath_arcTo">arcTo</a> appends at most one <a href="undocumented#Line">Line</a> and one <a href="#Conic">Conic</a>.
-<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="undocumented#PostScript_arct">PostScript arct</a> and <a href="undocumented#HTML_Canvas_arcTo">HTML Canvas arcTo</a>.
+<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="#Arct">PostScript Arct</a> and <a href="undocumented#HTML_Canvas_ArcTo">HTML Canvas ArcTo</a>.
### Parameters
@@ -2840,7 +2840,7 @@ void arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
Direction sweep, SkScalar x, SkScalar y)
</pre>
-Append <a href="#Arc">Arc</a> to <a href="#Path">Path</a>. <a href="#Arc">Arc</a> is implemented by one or more <a href="#Conic">Conic</a> weighted to describe part of <a href="undocumented#Oval">Oval</a>
+Append <a href="#Arc">Arc</a> to <a href="#Path">Path</a>. <a href="#Arc">Arc</a> is implemented by one or more <a href="#Conic">Conics</a> weighted to describe part of <a href="undocumented#Oval">Oval</a>
with radii (<a href="#SkPath_arcTo_4_rx">rx</a>, <a href="#SkPath_arcTo_4_ry">ry</a>) rotated by <a href="#SkPath_arcTo_4_xAxisRotate">xAxisRotate</a> degrees. <a href="#Arc">Arc</a> curves from last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> to (<a href="#SkPath_arcTo_4_x">x</a>, <a href="#SkPath_arcTo_4_y">y</a>),
choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.
@@ -2849,8 +2849,8 @@ or if last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> equal
(<a href="#SkPath_arcTo_4_x">x</a>, <a href="#SkPath_arcTo_4_y">y</a>) if both are greater than zero but too small.
<a href="#SkPath_arcTo">arcTo</a> appends up to four <a href="#Conic">Conic</a> curves.
-<a href="#SkPath_arcTo">arcTo</a> implements the functionatlity of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> sweep-flag value is
-opposite the integer value of <a href="#SkPath_arcTo_4_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> sweep-flag uses 1 for clockwise, while <a href="#SkPath_kCW_Direction">kCW Direction</a>
+<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> "" value is
+opposite the integer value of <a href="#SkPath_arcTo_4_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> "" uses 1 for clockwise, while <a href="#SkPath_kCW_Direction">kCW Direction</a>
cast to int is zero.
### Parameters
@@ -2860,7 +2860,7 @@ radius in <a href="#SkPath_arcTo_4_x">x</a> before x-axis rotation</td>
</tr> <tr> <td><a name="SkPath_arcTo_4_ry"> <code><strong>ry </strong></code> </a></td> <td>
radius in <a href="#SkPath_arcTo_4_y">y</a> before x-axis rotation</td>
</tr> <tr> <td><a name="SkPath_arcTo_4_xAxisRotate"> <code><strong>xAxisRotate </strong></code> </a></td> <td>
-x-axis rotation in degrees; positve values are clockwise</td>
+x-axis rotation in degrees; positive values are clockwise</td>
</tr> <tr> <td><a name="SkPath_arcTo_4_largeArc"> <code><strong>largeArc </strong></code> </a></td> <td>
chooses smaller or larger <a href="#Arc">Arc</a></td>
</tr> <tr> <td><a name="SkPath_arcTo_4_sweep"> <code><strong>sweep </strong></code> </a></td> <td>
@@ -2894,19 +2894,19 @@ and smaller or larger.
<a href="#Arc">Arc</a> <a href="#SkPath_arcTo_5_sweep">sweep</a> is always less than 360 degrees. <a href="#SkPath_arcTo">arcTo</a> appends <a href="undocumented#Line">Line</a> to <a href="#SkPath_arcTo_5_xy">xy</a> if either radii are zero,
or if last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> equals (x, y). <a href="#SkPath_arcTo">arcTo</a> scales radii <a href="#SkPath_arcTo_5_r">r</a> to fit last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> and
-<a href="#SkPath_arcTo_5_xy">xy</a> if both are greater than zero but too small.
+<a href="#SkPath_arcTo_5_xy">xy</a> if both are greater than zero but too small to describe an arc.
<a href="#SkPath_arcTo">arcTo</a> appends up to four <a href="#Conic">Conic</a> curves.
-<a href="#SkPath_arcTo">arcTo</a> implements the functionatlity of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> sweep-flag value is
-opposite the integer value of <a href="#SkPath_arcTo_5_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> sweep-flag uses 1 for clockwise, while <a href="#SkPath_kCW_Direction">kCW Direction</a>
-cast to int is zero.
+<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> "" value is
+opposite the integer value of <a href="#SkPath_arcTo_5_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> "" uses 1 for clockwise, while
+<a href="#SkPath_kCW_Direction">kCW Direction</a> cast to int is zero.
### Parameters
<table> <tr> <td><a name="SkPath_arcTo_5_r"> <code><strong>r </strong></code> </a></td> <td>
radii in x and y before x-axis rotation</td>
</tr> <tr> <td><a name="SkPath_arcTo_5_xAxisRotate"> <code><strong>xAxisRotate </strong></code> </a></td> <td>
-x-axis rotation in degrees; positve values are clockwise</td>
+x-axis rotation in degrees; positive values are clockwise</td>
</tr> <tr> <td><a name="SkPath_arcTo_5_largeArc"> <code><strong>largeArc </strong></code> </a></td> <td>
chooses smaller or larger <a href="#Arc">Arc</a></td>
</tr> <tr> <td><a name="SkPath_arcTo_5_sweep"> <code><strong>sweep </strong></code> </a></td> <td>
@@ -2935,19 +2935,20 @@ void rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
</pre>
Append <a href="#Arc">Arc</a> to <a href="#Path">Path</a>, relative to last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a>. <a href="#Arc">Arc</a> is implemented by one or
-more <a href="#Conic">Conic</a>, weighted to describe part of <a href="undocumented#Oval">Oval</a> with radii (r.fX, r.fY) rotated by
-<a href="#SkPath_rArcTo_xAxisRotate">xAxisRotate</a> degrees. <a href="#Arc">Arc</a> curves from last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> (x0, y0) to(x0 + <a href="#SkPath_rArcTo_dx">dx</a>, y0 + <a href="#SkPath_rArcTo_dy">dy</a>),
+more <a href="#Conic">Conic</a>, weighted to describe part of <a href="undocumented#Oval">Oval</a> with radii (<a href="#SkPath_rArcTo_rx">rx</a>, <a href="#SkPath_rArcTo_ry">ry</a>) rotated by
+<a href="#SkPath_rArcTo_xAxisRotate">xAxisRotate</a> degrees. <a href="#Arc">Arc</a> curves from last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> (x0, y0) to end <a href="undocumented#Point">Point</a>(x0 + <a href="#SkPath_rArcTo_dx">dx</a>, y0 + <a href="#SkPath_rArcTo_dy">dy</a>),
choosing one of four possible routes: clockwise or
counterclockwise, and smaller or larger. If <a href="#Path">Path</a> is empty, the start <a href="#Arc">Arc</a> <a href="undocumented#Point">Point</a>
is (0, 0).
-<a href="#Arc">Arc</a> <a href="#SkPath_rArcTo_sweep">sweep</a> is always less than 360 degrees. <a href="#SkPath_arcTo">arcTo</a> appends <a href="undocumented#Line">Line</a> to xy if either
-radii are zero, or if last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> equals (x, y). <a href="#SkPath_arcTo">arcTo</a> scales radii r to fit
-last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> and xy if both are greater than zero but too small.
+<a href="#Arc">Arc</a> <a href="#SkPath_rArcTo_sweep">sweep</a> is always less than 360 degrees. <a href="#SkPath_arcTo">arcTo</a> appends <a href="undocumented#Line">Line</a> to end <a href="undocumented#Point">Point</a>
+if either radii are zero, or if last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> equals end <a href="undocumented#Point">Point</a>.
+<a href="#SkPath_arcTo">arcTo</a> scales radii (<a href="#SkPath_rArcTo_rx">rx</a>, <a href="#SkPath_rArcTo_ry">ry</a>) to fit last <a href="#Path">Path</a> <a href="undocumented#Point">Point</a> and end <a href="undocumented#Point">Point</a> if both are
+greater than zero but too small to describe an arc.
<a href="#SkPath_arcTo">arcTo</a> appends up to four <a href="#Conic">Conic</a> curves.
-<a href="#SkPath_arcTo">arcTo</a> implements the functionatlity of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> sweep-flag value is
-opposite the integer value of <a href="#SkPath_rArcTo_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> sweep-flag uses 1 for clockwise, while
+<a href="#SkPath_arcTo">arcTo</a> implements the functionality of <a href="#Arc">SVG Arc</a>, although <a href="undocumented#SVG">SVG</a> "" value is
+opposite the integer value of <a href="#SkPath_rArcTo_sweep">sweep</a>; <a href="undocumented#SVG">SVG</a> "" uses 1 for clockwise, while
<a href="#SkPath_kCW_Direction">kCW Direction</a> cast to int is zero.
### Parameters
@@ -2957,7 +2958,7 @@ radius in x before x-axis rotation</td>
</tr> <tr> <td><a name="SkPath_rArcTo_ry"> <code><strong>ry </strong></code> </a></td> <td>
radius in y before x-axis rotation</td>
</tr> <tr> <td><a name="SkPath_rArcTo_xAxisRotate"> <code><strong>xAxisRotate </strong></code> </a></td> <td>
-x-axis rotation in degrees; positve values are clockwise</td>
+x-axis rotation in degrees; positive values are clockwise</td>
</tr> <tr> <td><a name="SkPath_rArcTo_largeArc"> <code><strong>largeArc </strong></code> </a></td> <td>
chooses smaller or larger <a href="#Arc">Arc</a></td>
</tr> <tr> <td><a name="SkPath_rArcTo_sweep"> <code><strong>sweep </strong></code> </a></td> <td>
@@ -2987,7 +2988,7 @@ void close()
</pre>
Append <a href="#SkPath_kClose_Verb">kClose Verb</a> to <a href="#Path">Path</a>. A closed <a href="#Contour">Contour</a> connects the first and last <a href="undocumented#Point">Point</a>
-with <a href="undocumented#Line">Line</a>, forming a continous loop. Open and closed <a href="#Contour">Contour</a> draw the same
+with <a href="undocumented#Line">Line</a>, forming a continuous loop. Open and closed <a href="#Contour">Contour</a> draw the same
with <a href="#SkPaint_kFill_Style">SkPaint::kFill Style</a>. With <a href="#SkPaint_kStroke_Style">SkPaint::kStroke Style</a>, open <a href="#Contour">Contour</a> draws
<a href="#Stroke_Cap">Paint Stroke Cap</a> at <a href="#Contour">Contour</a> start and end; closed <a href="#Contour">Contour</a> draws
<a href="#Stroke_Join">Paint Stroke Join</a> at <a href="#Contour">Contour</a> start and end.
@@ -3167,7 +3168,7 @@ bool isRect(SkRect* rect, bool* isClosed = nullptr,
Direction* direction = nullptr) const
</pre>
-Returns true if <a href="#Path">Path</a> is eqivalent to <a href="undocumented#Rect">Rect</a> when filled.
+Returns true if <a href="#Path">Path</a> is equivalent to <a href="undocumented#Rect">Rect</a> when filled.
If false: <a href="#SkPath_isRect_rect">rect</a>, <a href="#SkPath_isRect_isClosed">isClosed</a>, and <a href="#SkPath_isRect_direction">direction</a> are unchanged.
If true: <a href="#SkPath_isRect_rect">rect</a>, <a href="#SkPath_isRect_isClosed">isClosed</a>, and <a href="#SkPath_isRect_direction">direction</a> are written to if not nullptr.
@@ -3692,7 +3693,7 @@ index of initial point of <a href="undocumented#Round_Rect">Round Rect</a></td>
void addPoly(const SkPoint pts[], int count, bool close)
</pre>
-Add <a href="#Contour">Contour</a> created from <a href="undocumented#Line">Line</a> array, adding<a href="#SkPath_addPoly_count">count</a> - 1<a href="undocumented#Line">Line</a> segments. <a href="#Contour">Contour</a> added starts at pt[0], then adds a line
+Add <a href="#Contour">Contour</a> created from <a href="undocumented#Line">Line</a> array, adding<a href="#SkPath_addPoly_count">count</a> - 1<a href="undocumented#Line">Line</a> segments. <a href="#Contour">Contour</a> added starts at <a href="#SkPath_addPoly_pts">pts</a>[0], then adds a line
for every additional <a href="undocumented#Point">Point</a> in <a href="#SkPath_addPoly_pts">pts</a> array. If <a href="#SkPath_close">close</a> is true,
appends <a href="#SkPath_kClose_Verb">kClose Verb</a> to <a href="#Path">Path</a>, connecting <a href="#SkPath_addPoly_pts">pts</a>[<a href="#SkPath_addPoly_count">count</a> - 1] and <a href="#SkPath_addPoly_pts">pts</a>[0].
@@ -4223,7 +4224,7 @@ void dump(SkWStream* stream, bool forceClose, bool dumpAsHex) const
</pre>
Writes text representation of <a href="#Path">Path</a> to <a href="#SkPath_dump_stream">stream</a>. If <a href="#SkPath_dump_stream">stream</a> is nullptr, <a href="#SkPath_dump_2">dump</a> writes to
-stdout. Set <a href="#SkPath_dump_forceClose">forceClose</a> to true to get
+standard output. Set <a href="#SkPath_dump_forceClose">forceClose</a> to true to get
edges used to fill <a href="#Path">Path</a>. Set <a href="#SkPath_dump_dumpAsHex">dumpAsHex</a> true to get exact binary representations
of floating point numbers used in <a href="#Point_Array">Point Array</a> and <a href="#Weight">Conic Weights</a>.
@@ -4234,7 +4235,7 @@ writable <a href="undocumented#Stream">Stream</a> receiving <a href="#Path">Path
</tr> <tr> <td><a name="SkPath_dump_forceClose"> <code><strong>forceClose </strong></code> </a></td> <td>
true if missing <a href="#SkPath_kClose_Verb">kClose Verb</a> is output</td>
</tr> <tr> <td><a name="SkPath_dump_dumpAsHex"> <code><strong>dumpAsHex </strong></code> </a></td> <td>
-true if <a href="undocumented#SkScalar">SkScalar</a> values are written as hexidecimal</td>
+true if <a href="undocumented#SkScalar">SkScalar</a> values are written as hexadecimal</td>
</tr>
</table>
@@ -4275,7 +4276,7 @@ path.close();
void dump() const
</pre>
-Writes text representation of <a href="#Path">Path</a> to stdout. The representation may be
+Writes text representation of <a href="#Path">Path</a> to standard output. The representation may be
directly compiled as <a href="undocumented#C">C</a>++ code. Floating point values are written
with limited precision; it may not be possible to reconstruct original <a href="#Path">Path</a>
from output.
@@ -4308,12 +4309,12 @@ path is not equal to copy
void dumpHex() const
</pre>
-Writes text representation of <a href="#Path">Path</a> to stdout. The representation may be
+Writes text representation of <a href="#Path">Path</a> to standard output. The representation may be
directly compiled as <a href="undocumented#C">C</a>++ code. Floating point values are written
in hexadecimal to preserve their exact bit pattern. The output reconstructs the
original <a href="#Path">Path</a>.
-Use instead of <a href="#SkPath_dump_2">dump</a> when submittingbug reports against <a href="undocumented#Skia">Skia</a>http://bug.skia.org.
+Use instead of <a href="#SkPath_dump_2">dump</a> when submittingbug reports against <a href="undocumented#Skia">Skia</a>.
Slight value changes in <a href="#Point_Array">Point Array</a> may cause the bug to disappear.
### Example
diff --git a/site/user/api/undocumented.md b/site/user/api/undocumented.md
index 83c5b8b617..cc23a48ef0 100644
--- a/site/user/api/undocumented.md
+++ b/site/user/api/undocumented.md
@@ -93,6 +93,10 @@ bool equalsWithinTolerance(const SkPoint& p) const
# <a name="SkDumpCanvas"></a> Class SkDumpCanvas
+# <a name="Alias"></a> Alias
+
+# <a name="Anti-alias"></a> Anti-alias
+
# <a name="BBH_Factory"></a> BBH Factory
# <a name="SkBBHFactory"></a> Class SkBBHFactory
@@ -229,12 +233,18 @@ int SkColorSetARGB(a, r, g, b)
# <a name="Color_Space"></a> Color Space
+# <a name="Core_Graphics"></a> Core Graphics
+
+# <a name="Core_Text"></a> Core Text
+
# <a name="Data"></a> Data
# <a name="Draw_Filter"></a> Draw Filter
# <a name="SkDrawFilter"></a> Class SkDrawFilter
+# <a name="Draw_Layer"></a> Draw Layer
+
# <a name="Draw_Looper"></a> Draw Looper
# <a name="SkDrawLooper"></a> Class SkDrawLooper
@@ -306,6 +316,10 @@ static std::unique_ptr<SkCanvas>
# <a name="GPU_Surface"></a> GPU Surface
+# <a name="HTML_Canvas"></a> HTML Canvas
+
+## <a name="ArcTo"></a> ArcTo
+
# <a name="Image"></a> Image
## <a name="Alpha_Type"></a> Alpha Type
@@ -403,6 +417,8 @@ sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
# <a name="SkIRect"></a> Struct SkIRect
+# <a name="Left_Side_Bearing"></a> Left Side Bearing
+
# <a name="Mask"></a> Mask
# <a name="Mask_Alpha"></a> Mask Alpha
@@ -436,6 +452,8 @@ sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
</tr>
</table>
+# <a name="OS_X"></a> OS X
+
# <a name="Paint_Defaults"></a> Paint Defaults
### Constants
@@ -507,6 +525,14 @@ SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL,
# <a name="SkPixmap"></a> Class SkPixmap
+# <a name="PostScript"></a> PostScript
+
+## <a name="Arct"></a> Arct
+
+# <a name="Premultiply"></a> Premultiply
+
+# <a name="Raster_Engine"></a> Raster Engine
+
# <a name="Raster_Surface"></a> Raster Surface
# <a name="Rasterizer"></a> Rasterizer
@@ -519,6 +545,8 @@ SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL,
# <a name="sk_sp"></a> Class sk_sp
+# <a name="Right_Side_Bearing"></a> Right Side Bearing
+
# <a name="Round_Rect"></a> Round Rect
# <a name="SkRRect"></a> Class SkRRect
@@ -583,6 +611,8 @@ static sk_sp<SkShader> MakeBitmapShader(const SkBitmap& src, TileMode tmx,
# <a name="SkString"></a> Class SkString
+# <a name="Supersampling"></a> Supersampling
+
# <a name="Surface"></a> Surface
# <a name="SkSurface"></a> Class SkSurface
@@ -627,6 +657,8 @@ static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo&, void* pixels,
# <a name="SkTextBlob"></a> Class SkTextBlob
+# <a name="Unpremultiply"></a> Unpremultiply
+
# <a name="Vertices"></a> Vertices
## <a name="Colors"></a> Colors
diff --git a/site/user/api/usingBookmaker.md b/site/user/api/usingBookmaker.md
index f25f2abc94..d29b86fd99 100644
--- a/site/user/api/usingBookmaker.md
+++ b/site/user/api/usingBookmaker.md
@@ -4,7 +4,7 @@ usingBookmaker
# <a name="Bookmaker"></a> Bookmaker
How to use the <a href="#Bookmaker">Bookmaker</a> utility.
-Install<a href="usingBookmaker#Go">Go</a>https://golang.org/doc/installif needed.
+Install<a href="usingBookmaker#Go">Go</a>if needed.
Get the fiddle command line interface tool.
By default this will appear in your home directory.
@@ -94,4 +94,4 @@ $ ./out/dir/bookmaker -p -b docs -i include/core/<a href="usingBookmaker#SkXXX">
## <a name="Bugs"></a> Bugs
-<a href="#Bookmaker">Bookmaker</a> bugs are trackedherebug.skia.org/6898.
+<a href="#Bookmaker">Bookmaker</a> bugs are trackedhere.
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index b3d3190b78..ac8f04da9f 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -7,7 +7,6 @@
#include "bookmaker.h"
-#include "SkCommandLineFlags.h"
#include "SkOSFile.h"
#include "SkOSPath.h"
@@ -790,12 +789,12 @@ bool RootDefinition::dumpUnVisited() {
return allStructElementsFound;
}
-const Definition* RootDefinition::find(const string& ref) const {
+const Definition* RootDefinition::find(const string& ref, AllowParens allowParens) const {
const auto leafIter = fLeaves.find(ref);
if (leafIter != fLeaves.end()) {
return &leafIter->second;
}
- if (string::npos == ref.find("()")) {
+ if (AllowParens::kYes == allowParens && string::npos == ref.find("()")) {
string withParens = ref + "()";
const auto parensIter = fLeaves.find(withParens);
if (parensIter != fLeaves.end()) {
@@ -810,7 +809,7 @@ const Definition* RootDefinition::find(const string& ref) const {
const Definition* result = nullptr;
for (const auto& branch : fBranches) {
const RootDefinition* rootDef = branch.second;
- result = rootDef->find(ref);
+ result = rootDef->find(ref, allowParens);
if (result) {
break;
}
@@ -866,7 +865,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
}
definition = fParent;
} else {
- if (!hasEnd && fRoot->find(name)) {
+ if (!hasEnd && fRoot->find(name, RootDefinition::AllowParens::kNo)) {
return this->reportError<bool>("duplicate symbol");
}
if (MarkType::kStruct == markType || MarkType::kClass == markType) {
@@ -990,7 +989,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
case MarkType::kDefinedBy: {
string prefixed(fRoot->fName);
const char* start = fChar;
- string name(start, this->trimmedBracketEnd(fMC, OneLine::kYes) - start);
+ string name(start, this->trimmedBracketEnd(fMC) - start);
prefixed += "::" + name;
this->skipToEndBracket(fMC);
const auto leafIter = fRoot->fLeaves.find(prefixed);
@@ -1039,7 +1038,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
definition->fName = typeNameBuilder[0];
definition->fFiddle = fParent->fFiddle;
definition->fContentStart = fChar;
- definition->fContentEnd = this->trimmedBracketEnd(fMC, OneLine::kYes);
+ definition->fContentEnd = this->trimmedBracketEnd(fMC);
this->skipToEndBracket(fMC);
SkAssertResult(fMC == this->next());
SkAssertResult(fMC == this->next());
@@ -1079,6 +1078,9 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
fMarkup.emplace_front(markType, defStart, fLineCount, fParent);
definition = &fMarkup.front();
definition->fContentStart = fChar;
+ if (MarkType::kFormula == markType && MarkType::kRow == definition->fParent->fMarkType) {
+ SkDebugf("");
+ }
definition->fName = typeNameBuilder[0];
definition->fFiddle = fParent->fFiddle;
char suffix = '\0';
@@ -1127,7 +1129,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
definition->fName = typeNameBuilder[0];
definition->fFiddle = normalized_name(typeNameBuilder[0]);
definition->fContentStart = fChar;
- definition->fContentEnd = this->trimmedBracketEnd('\n', OneLine::kYes);
+ definition->fContentEnd = this->trimmedBracketEnd('\n');
definition->fTerminator = this->lineEnd() - 1;
fParent->fChildren.push_back(definition);
if (MarkType::kAnchor == markType) {
@@ -1137,7 +1139,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
this->skipWhiteSpace();
Definition* link = &fMarkup.front();
link->fContentStart = fChar;
- link->fContentEnd = this->trimmedBracketEnd(fMC, OneLine::kYes);
+ link->fContentEnd = this->trimmedBracketEnd(fMC);
this->skipToEndBracket(fMC);
SkAssertResult(fMC == this->next());
SkAssertResult(fMC == this->next());
@@ -1393,14 +1395,29 @@ int BmhParser::endHashCount() const {
return count;
}
+bool BmhParser::endTableColumn(const char* end, const char* terminator) {
+ if (!this->popParentStack(fParent)) {
+ return false;
+ }
+ fWorkingColumn->fContentEnd = end;
+ fWorkingColumn->fTerminator = terminator;
+ fColStart = fChar - 1;
+ this->skipSpace();
+ fTableState = TableState::kColumnStart;
+ return true;
+}
+
// FIXME: some examples may produce different output on different platforms
// if the text output can be different, think of how to author that
bool BmhParser::findDefinitions() {
bool lineStart = true;
+ const char* lastChar = nullptr;
+ const char* lastMC = nullptr;
fParent = nullptr;
while (!this->eof()) {
if (this->peek() == fMC) {
+ lastMC = fChar;
this->next();
if (this->peek() == fMC) {
this->next();
@@ -1408,10 +1425,25 @@ bool BmhParser::findDefinitions() {
return this->reportError<bool>("expected definition");
}
if (this->peek() != fMC) {
- vector<string> parentName;
- parentName.push_back(fParent->fName);
- if (!this->addDefinition(fChar - 1, true, fParent->fMarkType, parentName)) {
- return false;
+ if (MarkType::kColumn == fParent->fMarkType) {
+ SkASSERT(TableState::kColumnEnd == fTableState);
+ if (!this->endTableColumn(lastChar, lastMC)) {
+ return false;
+ }
+ SkASSERT(fRow);
+ if (!this->popParentStack(fParent)) {
+ return false;
+ }
+ fRow->fContentEnd = fWorkingColumn->fContentEnd;
+ fWorkingColumn = nullptr;
+ fRow = nullptr;
+ fTableState = TableState::kNone;
+ } else {
+ vector<string> parentName;
+ parentName.push_back(fParent->fName);
+ if (!this->addDefinition(fChar - 1, true, fParent->fMarkType, parentName)) {
+ return false;
+ }
}
} else {
SkAssertResult(this->next() == fMC);
@@ -1462,15 +1494,22 @@ bool BmhParser::findDefinitions() {
&& MarkType::kLegend != fParent->fMarkType
&& MarkType::kList != fParent->fMarkType)) {
int endHashes = this->endHashCount();
- if (endHashes <= 1) { // one line comment
+ if (endHashes <= 1) {
if (fParent) {
- fMarkup.emplace_front(MarkType::kComment, fChar - 1, fLineCount, fParent);
- Definition* comment = &fMarkup.front();
- comment->fContentStart = fChar - 1;
- this->skipToEndBracket('\n');
- comment->fContentEnd = fChar;
- comment->fTerminator = fChar;
- fParent->fChildren.push_back(comment);
+ if (TableState::kColumnEnd == fTableState) {
+ if (!this->endTableColumn(lastChar, lastMC)) {
+ return false;
+ }
+ } else { // one line comment
+ fMarkup.emplace_front(MarkType::kComment, fChar - 1, fLineCount,
+ fParent);
+ Definition* comment = &fMarkup.front();
+ comment->fContentStart = fChar - 1;
+ this->skipToEndBracket('\n');
+ comment->fContentEnd = fChar;
+ comment->fTerminator = fChar;
+ fParent->fChildren.push_back(comment);
+ }
} else {
fChar = fLine + this->lineLength() - 1;
}
@@ -1485,41 +1524,37 @@ bool BmhParser::findDefinitions() {
return this->reportError<bool>("missing table");
}
}
- } else {
+ } else if (TableState::kNone == fTableState) {
bool parentIsList = MarkType::kList == fParent->fMarkType;
+ if (parentIsList && fLineCount > 1230) {
+ SkDebugf("");
+ }
// fixme? no nested tables for now
- const char* colStart = fChar - 1;
- fMarkup.emplace_front(MarkType::kRow, colStart, fLineCount, fParent);
- Definition* row = &fMarkup.front();
+ fColStart = fChar - 1;
+ fMarkup.emplace_front(MarkType::kRow, fColStart, fLineCount, fParent);
+ fRow = &fMarkup.front();
+ fRow->fName = fParent->fName;
this->skipWhiteSpace();
- row->fContentStart = fChar;
- this->setAsParent(row);
- const char* lineEnd = this->lineEnd();
- do {
- fMarkup.emplace_front(MarkType::kColumn, colStart, fLineCount, fParent);
- Definition* column = &fMarkup.front();
- column->fContentStart = fChar;
- column->fContentEnd = this->trimmedBracketEnd(fMC,
- parentIsList ? OneLine::kNo : OneLine::kYes);
- this->skipToEndBracket(fMC);
- colStart = fChar;
- SkAssertResult(fMC == this->next());
- if (fMC == this->peek()) {
- this->next();
- }
- column->fTerminator = fChar;
- fParent->fChildren.push_back(column);
- this->skipSpace();
- } while (fChar < lineEnd && '\n' != this->peek());
- if (!this->popParentStack(fParent)) {
- return false;
- }
- const Definition* lastCol = row->fChildren.back();
- row->fContentEnd = lastCol->fContentEnd;
+ fRow->fContentStart = fChar;
+ this->setAsParent(fRow);
+ fTableState = TableState::kColumnStart;
+ }
+ if (TableState::kColumnStart == fTableState) {
+ fMarkup.emplace_front(MarkType::kColumn, fColStart, fLineCount, fParent);
+ fWorkingColumn = &fMarkup.front();
+ fWorkingColumn->fName = fParent->fName;
+ fWorkingColumn->fContentStart = fChar;
+ this->setAsParent(fWorkingColumn);
+ fTableState = TableState::kColumnEnd;
+ continue;
}
}
}
- lineStart = this->next() == '\n';
+ char nextChar = this->next();
+ lineStart = nextChar == '\n';
+ if (' ' < nextChar) {
+ lastChar = fChar;
+ }
}
if (fParent) {
return this->reportError<bool>("mismatched end");
@@ -2115,7 +2150,7 @@ DEFINE_string2(include, i, "", "A path to a *.h file or a directory.");
DEFINE_bool2(hack, k, false, "Do a find/replace hack to update all *.bmh files. (Requires -b)");
DEFINE_bool2(populate, p, false, "Populate include from bmh. (Requires -b -i)");
DEFINE_string2(ref, r, "", "Resolve refs and write bmh_*.md files to path. (Requires -b)");
-DEFINE_bool2(spellcheck, s, false, "Spell-check. (Requires -b)");
+DEFINE_string2(spellcheck, s, "", "Spell-check [once, all, mispellings]. (Requires -b)");
DEFINE_bool2(tokens, t, false, "Output include tokens. (Requires -i)");
DEFINE_bool2(crosscheck, x, false, "Check bmh against includes. (Requires -b -i)");
@@ -2198,7 +2233,7 @@ int main(int argc, char** const argv) {
SkCommandLineFlags::PrintUsage();
return 1;
}
- if (FLAGS_bmh.isEmpty() && FLAGS_spellcheck) {
+ if (FLAGS_bmh.isEmpty() && !FLAGS_spellcheck.isEmpty()) {
SkDebugf("-s requires -b\n");
SkCommandLineFlags::PrintUsage();
return 1;
@@ -2257,8 +2292,8 @@ int main(int argc, char** const argv) {
MdOut mdOut(bmhParser);
mdOut.buildReferences(FLAGS_bmh[0], FLAGS_ref[0]);
}
- if (!done && FLAGS_spellcheck && FLAGS_examples.isEmpty()) {
- bmhParser.spellCheck(FLAGS_bmh[0]);
+ if (!done && !FLAGS_spellcheck.isEmpty() && FLAGS_examples.isEmpty()) {
+ bmhParser.spellCheck(FLAGS_bmh[0], FLAGS_spellcheck);
done = true;
}
int examples = 0;
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 71ff0d5dd6..503db20f24 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -10,6 +10,7 @@
#define STDOUT_TO_IDE_OUT 0
+#include "SkCommandLineFlags.h"
#include "SkData.h"
#include <algorithm>
@@ -205,11 +206,6 @@ class TextParser : public NonAssignable {
TextParser() {} // only for ParserCommon to call
friend class ParserCommon;
public:
- enum OneLine {
- kNo,
- kYes
- };
-
class Save {
public:
Save(TextParser* parser) {
@@ -435,7 +431,7 @@ public:
void skipToNonAlphaNum() {
while (fChar < fEnd && (isalnum(fChar[0])
|| '_' == fChar[0] || '-' == fChar[0]
- || (':' == fChar[0] && fChar +1 < fEnd && ':' == fChar[1])
+ || (':' == fChar[0] && fChar + 1 < fEnd && ':' == fChar[1])
|| ('.' == fChar[0] && fChar + 1 < fEnd && isalpha(fChar[1])))) {
if (':' == fChar[0] && fChar +1 < fEnd && ':' == fChar[1]) {
fChar++;
@@ -452,7 +448,7 @@ public:
bool skipName(const char* word) {
size_t len = strlen(word);
- if (len < (size_t) (fEnd - fChar) && !strncmp(word, fChar, len)) {
+ if (len <= (size_t) (fEnd - fChar) && !strncmp(word, fChar, len)) {
fChar += len;
}
return this->eof() || ' ' >= fChar[0];
@@ -495,7 +491,7 @@ public:
bool startsWith(const char* str) const {
size_t len = strlen(str);
- ptrdiff_t lineLen = this->lineLength();
+ ptrdiff_t lineLen = fEnd - fChar;
return len <= (size_t) lineLen && 0 == strncmp(str, fChar, len);
}
@@ -556,8 +552,8 @@ public:
return nullptr;
}
- const char* trimmedBracketEnd(const char bracket, OneLine oneLine) const {
- int max = (int) (OneLine::kYes == oneLine ? this->lineLength() : fEnd - fChar);
+ const char* trimmedBracketEnd(const char bracket) const {
+ int max = (int) (this->lineLength());
int index = 0;
while (index < max && bracket != fChar[index]) {
++index;
@@ -899,6 +895,11 @@ public:
class RootDefinition : public Definition {
public:
+ enum class AllowParens {
+ kNo,
+ kYes,
+ };
+
RootDefinition() {
}
@@ -920,7 +921,7 @@ public:
const RootDefinition* asRoot() const override { return this; }
void clearVisited();
bool dumpUnVisited();
- const Definition* find(const string& ref) const;
+ const Definition* find(const string& ref, AllowParens ) const;
bool isRoot() const override { return true; }
RootDefinition* rootParent() override { return fRootParent; }
void setRootParent(RootDefinition* rootParent) { fRootParent = rootParent; }
@@ -1108,6 +1109,9 @@ public:
}
void writeString(const char* str) {
+ if (!strcmp("utf-8", str)) {
+ SkDebugf("");
+ }
SkASSERT(strlen(str) > 0);
SkASSERT(' ' < str[0]);
SkASSERT(' ' < str[strlen(str) - 1]);
@@ -1194,6 +1198,12 @@ public:
kOptional,
};
+ enum class TableState {
+ kNone,
+ kColumnStart,
+ kColumnEnd,
+ };
+
#define M(mt) (1LL << (int) MarkType::k##mt)
#define M_D M(Description)
#define M_CS M(Class) | M(Struct)
@@ -1216,60 +1226,61 @@ public:
, fMaps {
// names without formal definitions (e.g. Column) aren't included
// fill in other names once they're actually used
- { "", nullptr, MarkType::kNone, R_Y, E_N, 0 }
-, { "A", nullptr, MarkType::kAnchor, R_Y, E_N, 0 }
-, { "Alias", nullptr, MarkType::kAlias, R_N, E_N, 0 }
-, { "Bug", nullptr, MarkType::kBug, R_N, E_N, 0 }
-, { "Class", &fClassMap, MarkType::kClass, R_Y, E_O, M_CSST | M(Root) }
-, { "Code", nullptr, MarkType::kCode, R_Y, E_N, M_CSST | M_E }
-, { "", nullptr, MarkType::kColumn, R_Y, E_N, M(Row) }
-, { "", nullptr, MarkType::kComment, R_N, E_N, 0 }
-, { "Const", &fConstMap, MarkType::kConst, R_Y, E_N, M_E | M_ST }
-, { "Define", nullptr, MarkType::kDefine, R_O, E_N, M_ST }
-, { "DefinedBy", nullptr, MarkType::kDefinedBy, R_N, E_N, M(Method) }
-, { "Deprecated", nullptr, MarkType::kDeprecated, R_Y, E_N, 0 }
-, { "Description", nullptr, MarkType::kDescription, R_Y, E_N, M(Example) }
-, { "Doxygen", nullptr, MarkType::kDoxygen, R_Y, E_N, 0 }
-, { "Enum", &fEnumMap, MarkType::kEnum, R_Y, E_O, M_CSST | M(Root) }
-, { "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) }
+ { "", nullptr, MarkType::kNone, R_Y, E_N, 0 }
+, { "A", nullptr, MarkType::kAnchor, R_Y, E_N, 0 }
+, { "Alias", nullptr, MarkType::kAlias, R_N, E_N, 0 }
+, { "Bug", nullptr, MarkType::kBug, R_N, E_N, 0 }
+, { "Class", &fClassMap, MarkType::kClass, R_Y, E_O, M_CSST | M(Root) }
+, { "Code", nullptr, MarkType::kCode, R_Y, E_N, M_CSST | M_E }
+, { "", nullptr, MarkType::kColumn, R_Y, E_N, M(Row) }
+, { "", nullptr, MarkType::kComment, R_N, E_N, 0 }
+, { "Const", &fConstMap, MarkType::kConst, R_Y, E_N, M_E | M_ST }
+, { "Define", nullptr, MarkType::kDefine, R_O, E_N, M_ST }
+, { "DefinedBy", nullptr, MarkType::kDefinedBy, R_N, E_N, M(Method) }
+, { "Deprecated", nullptr, MarkType::kDeprecated, R_Y, E_N, 0 }
+, { "Description", nullptr, MarkType::kDescription, R_Y, E_N, M(Example) }
+, { "Doxygen", nullptr, MarkType::kDoxygen, R_Y, E_N, 0 }
+, { "Enum", &fEnumMap, MarkType::kEnum, R_Y, E_O, M_CSST | M(Root) }
+, { "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 }
-, { "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(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) }
-, { "Legend", nullptr, MarkType::kLegend, R_Y, E_N, M(Table) }
-, { "", nullptr, MarkType::kLink, R_Y, E_N, M(Anchor) }
-, { "List", nullptr, MarkType::kList, R_Y, E_N, M(Method) | M_CSST | M_E | M_D }
-, { "", nullptr, MarkType::kMarkChar, R_N, E_N, 0 }
-, { "Member", nullptr, MarkType::kMember, R_Y, E_N, M(Class) | M(Struct) }
-, { "Method", &fMethodMap, MarkType::kMethod, R_Y, E_Y, M_CSST }
-, { "NoExample", nullptr, MarkType::kNoExample, R_Y, E_N, 0 }
-, { "Param", nullptr, MarkType::kParam, R_Y, E_N, M(Method) }
-, { "Platform", nullptr, MarkType::kPlatform, R_Y, E_N, M(Example) }
-, { "Private", nullptr, MarkType::kPrivate, R_N, E_N, 0 }
-, { "Return", nullptr, MarkType::kReturn, R_Y, E_N, M(Method) }
-, { "", nullptr, MarkType::kRoot, R_Y, E_N, 0 }
-, { "", nullptr, MarkType::kRow, R_Y, E_N, M(Table) | M(List) }
-, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_Y, E_N, M_CSST | M_E | M(Method) }
-, { "StdOut", nullptr, MarkType::kStdOut, R_N, E_N, M(Example) }
-, { "Struct", &fClassMap, MarkType::kStruct, R_Y, E_O, M(Class) | M(Root) | M_ST }
-, { "Substitute", nullptr, MarkType::kSubstitute, R_N, E_N, M_ST }
-, { "Subtopic", nullptr, MarkType::kSubtopic, R_Y, E_Y, M_CSST }
-, { "Table", nullptr, MarkType::kTable, R_Y, E_N, M(Method) | M_CSST | M_E }
-, { "Template", nullptr, MarkType::kTemplate, R_Y, E_N, 0 }
-, { "", nullptr, MarkType::kText, R_Y, E_N, 0 }
-, { "Time", nullptr, MarkType::kTime, R_Y, E_N, M(Track) }
-, { "ToDo", nullptr, MarkType::kToDo, R_N, E_N, 0 }
-, { "Topic", nullptr, MarkType::kTopic, R_Y, E_Y, M_CS | M(Root) | M(Topic) }
-, { "Track", nullptr, MarkType::kTrack, R_Y, E_N, M_E | M_ST }
-, { "Typedef", &fTypedefMap, MarkType::kTypedef, R_Y, E_N, M(Subtopic) | M(Topic) }
-, { "", nullptr, MarkType::kUnion, R_Y, E_N, 0 }
-, { "Volatile", nullptr, MarkType::kVolatile, R_N, E_N, M(StdOut) }
-, { "Width", nullptr, MarkType::kWidth, R_N, E_N, M(Example) } }
+, { "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(Column) | 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) }
+, { "Legend", nullptr, MarkType::kLegend, R_Y, E_N, M(Table) }
+, { "", nullptr, MarkType::kLink, R_N, E_N, M(Anchor) }
+, { "List", nullptr, MarkType::kList, R_Y, E_N, M(Method) | M_CSST | M_E | M_D }
+, { "", nullptr, MarkType::kMarkChar, R_N, E_N, 0 }
+, { "Member", nullptr, MarkType::kMember, R_Y, E_N, M(Class) | M(Struct) }
+, { "Method", &fMethodMap, MarkType::kMethod, R_Y, E_Y, M_CSST }
+, { "NoExample", nullptr, MarkType::kNoExample, R_Y, E_N, 0 }
+, { "Param", nullptr, MarkType::kParam, R_Y, E_N, M(Method) }
+, { "Platform", nullptr, MarkType::kPlatform, R_N, E_N, M(Example) }
+, { "Private", nullptr, MarkType::kPrivate, R_N, E_N, 0 }
+, { "Return", nullptr, MarkType::kReturn, R_Y, E_N, M(Method) }
+, { "", nullptr, MarkType::kRoot, R_Y, E_N, 0 }
+, { "", nullptr, MarkType::kRow, R_Y, E_N, M(Table) | M(List) }
+, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_Y, E_N, M_CSST | M_E | M(Method) }
+, { "StdOut", nullptr, MarkType::kStdOut, R_N, E_N, M(Example) }
+, { "Struct", &fClassMap, MarkType::kStruct, R_Y, E_O, M(Class) | M(Root) | M_ST }
+, { "Substitute", nullptr, MarkType::kSubstitute, R_N, E_N, M_ST }
+, { "Subtopic", nullptr, MarkType::kSubtopic, R_Y, E_Y, M_CSST }
+, { "Table", nullptr, MarkType::kTable, R_Y, E_N, M(Method) | M_CSST | M_E }
+, { "Template", nullptr, MarkType::kTemplate, R_Y, E_N, 0 }
+, { "", nullptr, MarkType::kText, R_Y, E_N, 0 }
+, { "Time", nullptr, MarkType::kTime, R_Y, E_N, M(Track) }
+, { "ToDo", nullptr, MarkType::kToDo, R_N, E_N, 0 }
+, { "Topic", nullptr, MarkType::kTopic, R_Y, E_Y, M_CS | M(Root) | M(Topic) }
+, { "Track", nullptr, MarkType::kTrack, R_Y, E_N, M_E | M_ST }
+, { "Typedef", &fTypedefMap, MarkType::kTypedef, R_Y, E_N, M(Subtopic) | M(Topic) }
+, { "", nullptr, MarkType::kUnion, R_Y, E_N, 0 }
+, { "Volatile", nullptr, MarkType::kVolatile, R_N, E_N, M(StdOut) }
+, { "Width", nullptr, MarkType::kWidth, R_N, E_N, M(Example) } }
{
this->reset();
}
@@ -1296,6 +1307,7 @@ public:
string className(MarkType markType);
bool collectExternals();
int endHashCount() const;
+ bool endTableColumn(const char* end, const char* terminator);
RootDefinition* findBmhObject(MarkType markType, const string& typeName) {
auto map = fMaps[(int) markType].fBmh;
@@ -1326,6 +1338,9 @@ public:
void reset() override {
INHERITED::resetCommon();
fRoot = nullptr;
+ fWorkingColumn = nullptr;
+ fRow = nullptr;
+ fTableState = TableState::kNone;
fMC = '#';
fInChar = false;
fInCharCommentString = false;
@@ -1337,7 +1352,7 @@ public:
bool skipNoName();
bool skipToDefinitionEnd(MarkType markType);
- void spellCheck(const char* match) const;
+ void spellCheck(const char* match, SkCommandLineFlags::StringArray report) const;
vector<string> topicName();
vector<string> typeName(MarkType markType, bool* expectEnd);
string uniqueName(const string& base, MarkType markType);
@@ -1368,6 +1383,10 @@ public:
unordered_map<string, Definition*> fTopicMap;
unordered_map<string, Definition*> fAliasMap;
RootDefinition* fRoot;
+ Definition* fWorkingColumn;
+ Definition* fRow;
+ const char* fColStart;
+ TableState fTableState;
mutable char fMC; // markup character
bool fAnonymous;
bool fCloned;
@@ -1639,6 +1658,12 @@ public:
kSpace,
};
+ enum class RefType {
+ kUndefined,
+ kNormal,
+ kExternal,
+ };
+
enum class Wrote {
kNone,
kLF,
@@ -1699,7 +1724,7 @@ public:
}
string resolveMethod(const char* start, const char* end, bool first);
- string resolveRef(const char* start, const char* end, bool first);
+ string resolveRef(const char* start, const char* end, bool first, RefType* refType);
Wrote rewriteBlock(int size, const char* data);
Definition* structMemberOut(const Definition* memberStart, const Definition& child);
void structOut(const Definition* root, const Definition& child,
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index 21a47d6e8a..cc7627ac7c 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -231,7 +231,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
continue;
}
string fullName = classMapper.first + "::" + token.fName;
- const Definition* def = root->find(fullName);
+ const Definition* def = root->find(fullName, RootDefinition::AllowParens::kYes);
switch (token.fMarkType) {
case MarkType::kMethod: {
if (this->internalName(token)) {
@@ -241,7 +241,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
string paramName = className + "::";
paramName += string(token.fContentStart,
token.fContentEnd - token.fContentStart);
- def = root->find(paramName);
+ def = root->find(paramName, RootDefinition::AllowParens::kYes);
if (!def && 0 == token.fName.find("operator")) {
string operatorName = className + "::";
TextParser oper("", token.fStart, token.fContentEnd, 0);
@@ -258,7 +258,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
}
} while (!oper.eof() && oper.next() && parens > 0);
operatorName += string(start, oper.fChar - start);
- def = root->find(operatorName);
+ def = root->find(operatorName, RootDefinition::AllowParens::kYes);
}
}
if (!def) {
@@ -267,17 +267,18 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
string constructorName = className + "::";
constructorName += string(token.fContentStart + skip,
token.fContentEnd - token.fContentStart - skip);
- def = root->find(constructorName);
+ def = root->find(constructorName, RootDefinition::AllowParens::kYes);
}
if (!def && 0 == token.fName.find("SK_")) {
string incName = token.fName + "()";
string macroName = className + "::" + incName;
- def = root->find(macroName);
+ def = root->find(macroName, RootDefinition::AllowParens::kYes);
if (def) {
if (def->fName == incName) {
def->fVisited = true;
if ("SK_TO_STRING_NONVIRT" == token.fName) {
- def = root->find(className + "::toString");
+ def = root->find(className + "::toString",
+ RootDefinition::AllowParens::kYes);
if (def) {
def->fVisited = true;
} else {
@@ -300,7 +301,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
}
if (allLower) {
string lowerName = className + "::" + token.fName + "()";
- def = root->find(lowerName);
+ def = root->find(lowerName, RootDefinition::AllowParens::kYes);
}
}
if (!def) {
@@ -314,7 +315,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
if (!def) {
// simple method names inside nested classes have a bug and are missing trailing parens
string withParens = fullName + "()"; // FIXME: this shouldn't be necessary
- def = root->find(withParens);
+ def = root->find(withParens, RootDefinition::AllowParens::kNo);
}
if (!def) {
SkDebugf("method missing from bmh: %s\n", fullName.c_str());
@@ -359,7 +360,7 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
++lastUnderscore;
string anonName = className + "::" + string(lastUnderscore,
wordEnd - lastUnderscore) + 's';
- def = root->find(anonName);
+ def = root->find(anonName, RootDefinition::AllowParens::kYes);
}
if (!def) {
SkDebugf("enum missing from bmh: %s\n", fullName.c_str());
@@ -386,10 +387,10 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
string constName = MarkType::kEnumClass == token.fMarkType ?
fullName : className;
constName += "::" + child->fName;
- def = root->find(constName);
+ def = root->find(constName, RootDefinition::AllowParens::kYes);
if (!def) {
string innerName = classMapper.first + "::" + child->fName;
- def = root->find(innerName);
+ def = root->find(innerName, RootDefinition::AllowParens::kYes);
}
if (!def) {
if (string::npos == child->fName.find("Legacy_")) {
@@ -1142,7 +1143,7 @@ bool IncludeParser::parseMember(Definition* child, Definition* markupDef) {
break;
}
const char* start = parser.fChar;
- const char* end = parser.trimmedBracketEnd('\n', OneLine::kYes);
+ const char* end = parser.trimmedBracketEnd('\n');
if (Bracket::kSlashStar == comment->fBracket) {
const char* commentEnd = parser.strnstr("*/", end);
if (commentEnd) {
@@ -1450,6 +1451,7 @@ bool IncludeParser::parseChar() {
return reportError<bool>("malformed closing comment");
}
if (Bracket::kSlashStar == this->topBracket()) {
+ this->next(); // include close in bracket -- FIXME? will this skip stuff?
this->popBracket();
}
break;
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index af2fb89fb8..78b0364b06 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -33,9 +33,9 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
child.fChildren[0]->fName = enumName;
}
fullName = root->fName + "::" + enumName;
- enumDef = root->find(enumName);
+ enumDef = root->find(enumName, RootDefinition::AllowParens::kNo);
if (!enumDef) {
- enumDef = root->find(fullName);
+ enumDef = root->find(fullName, RootDefinition::AllowParens::kNo);
}
SkASSERT(enumDef);
// child[0] should be #Code comment starts at child[0].fTerminator
@@ -48,7 +48,7 @@ void IncludeWriter::enumHeaderOut(const RootDefinition* root,
if (fAnonymousEnumCount > 1) {
enumName += '_' + to_string(fAnonymousEnumCount);
}
- enumDef = root->find(enumName);
+ enumDef = root->find(enumName, RootDefinition::AllowParens::kNo);
SkASSERT(enumDef);
++fAnonymousEnumCount;
}
@@ -794,7 +794,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
}
++alternate;
string alternateMethod = methodName + '_' + to_string(alternate);
- clonedMethod = root->find(alternateMethod);
+ clonedMethod = root->find(alternateMethod, RootDefinition::AllowParens::kNo);
} while (clonedMethod);
if (!clonedMethod) {
return this->reportError<bool>("cloned method not found");
@@ -823,7 +823,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
--continueEnd;
}
methodName += string(fContinuation, continueEnd - fContinuation);
- method = root->find(methodName);
+ method = root->find(methodName, RootDefinition::AllowParens::kNo);
if (!method) {
fLineCount = child.fLineCount;
fclose(fOut); // so we can see what we've written so far
@@ -836,7 +836,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
continue;
}
methodName += "()";
- method = root->find(methodName);
+ method = root->find(methodName, RootDefinition::AllowParens::kNo);
if (method && MarkType::kDefinedBy == method->fMarkType) {
method = method->fParent;
}
@@ -873,7 +873,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
methodName = root->fName + "::" + child.fName;
inConstructor = root->fName == child.fName;
fContinuation = child.fContentEnd;
- method = root->find(methodName);
+ method = root->find(methodName, RootDefinition::AllowParens::kNo);
if (!method) {
continue;
}
@@ -905,9 +905,10 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
}
if (fInStruct) {
fIndent += 4;
- fStructDef = root->find(child.fName);
+ fStructDef = root->find(child.fName, RootDefinition::AllowParens::kNo);
if (nullptr == structDef) {
- fStructDef = root->find(root->fName + "::" + child.fName);
+ fStructDef = root->find(root->fName + "::" + child.fName,
+ RootDefinition::AllowParens::kNo);
}
this->structSizeMembers(child);
fIndent -= 4;
@@ -937,9 +938,10 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
SkASSERT(0); // incomplete
}
} else {
- structDef = root->find(child.fName);
+ structDef = root->find(child.fName, RootDefinition::AllowParens::kNo);
if (nullptr == structDef) {
- structDef = root->find(root->fName + "::" + child.fName);
+ structDef = root->find(root->fName + "::" + child.fName,
+ RootDefinition::AllowParens::kNo);
}
if (!structDef) {
this->lf(2);
@@ -1162,7 +1164,8 @@ string IncludeWriter::resolveMethod(const char* start, const char* end, bool fir
}
}
SkASSERT(parent);
- auto defRef = parent->find(parent->fName + "::" + methodname);
+ auto defRef = parent->find(parent->fName + "::" + methodname,
+ RootDefinition::AllowParens::kNo);
if (defRef && MarkType::kMethod == defRef->fMarkType) {
substitute = methodname + "()";
}
@@ -1175,9 +1178,17 @@ string IncludeWriter::resolveMethod(const char* start, const char* end, bool fir
return substitute;
}
-string IncludeWriter::resolveRef(const char* start, const char* end, bool first) {
+string IncludeWriter::resolveRef(const char* start, const char* end, bool first,
+ RefType* refType) {
// look up Xxx_Xxx
string undername(start, end - start);
+ for (const auto& external : fBmhParser->fExternals) {
+ if (external.fName == undername) {
+ *refType = RefType::kExternal;
+ return external.fName;
+ }
+ }
+ *refType = RefType::kNormal;
SkASSERT(string::npos == undername.find(' '));
const Definition* rootDef = nullptr;
{
@@ -1200,11 +1211,6 @@ string IncludeWriter::resolveRef(const char* start, const char* end, bool first)
if (fBmhParser->fAliasMap.end() != aliasIter) {
rootDef = aliasIter->second->fParent;
} else if (!first) {
- for (const auto& external : fBmhParser->fExternals) {
- if (external.fName == undername) {
- return external.fName;
- }
- }
SkDebugf("unfound: %s\n", undername.c_str());
this->reportError("reference unfound");
return "";
@@ -1291,11 +1297,12 @@ int IncludeWriter::lookupReference(const PunctuationState punctuation, const Wor
const int start, const int run, int lastWrite, const char last, const char* data) {
const int end = PunctuationState::kDelimiter == punctuation ||
PunctuationState::kPeriod == punctuation ? run - 1 : run;
- string temp = this->resolveRef(&data[start], &data[end], Word::kFirst == word);
+ RefType refType = RefType::kUndefined;
+ string resolved = string(&data[start], (size_t) (end - start));
+ string temp = this->resolveRef(&data[start], &data[end], Word::kFirst == word, &refType);
if (!temp.length()) {
if (Word::kFirst != word && '_' != last) {
- temp = string(&data[start], (size_t) (end - start));
- temp = ConvertRef(temp, false);
+ temp = ConvertRef(resolved, false);
}
}
if (temp.length()) {
@@ -1439,6 +1446,7 @@ IncludeWriter::Wrote IncludeWriter::rewriteBlock(int size, const char* data) {
embeddedSymbol = true;
break;
case '\'': // possessive apostrophe isn't treated as delimiting punctation
+ case '\"': // quote is passed straight through
case '=':
case '!': // assumed not to be punctuation, but a programming symbol
case '&': case '>': case '<': case '{': case '}': case '/': case '*': case '[': case ']':
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index 3718151e76..0a53fc4147 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -184,7 +184,8 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
for (string prefix : { "_", "::" } ) {
RootDefinition* root = test->asRoot();
string prefixed = root->fName + prefix + ref;
- if (const Definition* def = root->find(prefixed)) {
+ if (const Definition* def = root->find(prefixed,
+ RootDefinition::AllowParens::kYes)) {
result += linkRef(leadingSpaces, def, ref);
goto found;
}
@@ -363,7 +364,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
if (ref == fRoot->fName) {
return fRoot;
}
- if (const Definition* definition = fRoot->find(ref)) {
+ if (const Definition* definition = fRoot->find(ref, RootDefinition::AllowParens::kYes)) {
return definition;
}
Definition* test = fRoot;
@@ -376,14 +377,16 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
if (ref == leaf.first) {
return leaf.second;
}
- const Definition* definition = leaf.second->find(ref);
+ const Definition* definition = leaf.second->find(ref,
+ RootDefinition::AllowParens::kYes);
if (definition) {
return definition;
}
}
for (string prefix : { "::", "_" } ) {
string prefixed = root->fName + prefix + ref;
- if (const Definition* definition = root->find(prefixed)) {
+ if (const Definition* definition = root->find(prefixed,
+ RootDefinition::AllowParens::kYes)) {
return definition;
}
if (isupper(prefixed[0])) {
@@ -401,7 +404,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
auto classIter = fBmhParser.fClassMap.find(className);
if (classIter != fBmhParser.fClassMap.end()) {
const RootDefinition& classDef = classIter->second;
- const Definition* result = classDef.find(ref);
+ const Definition* result = classDef.find(ref, RootDefinition::AllowParens::kYes);
if (result) {
return result;
}
@@ -414,7 +417,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
// try with a prefix
if ('k' == ref[0]) {
for (auto const& iter : fBmhParser.fEnumMap) {
- if (iter.second.find(ref)) {
+ if (iter.second.find(ref, RootDefinition::AllowParens::kYes)) {
return &iter.second;
}
}
@@ -456,13 +459,15 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
string className(ref, 0, pos);
auto classIter = fBmhParser.fClassMap.find(className);
if (classIter != fBmhParser.fClassMap.end()) {
- if (const Definition* definition = classIter->second.find(ref)) {
+ if (const Definition* definition = classIter->second.find(ref,
+ RootDefinition::AllowParens::kYes)) {
return definition;
}
}
auto enumIter = fBmhParser.fEnumMap.find(className);
if (enumIter != fBmhParser.fEnumMap.end()) {
- if (const Definition* definition = enumIter->second.find(ref)) {
+ if (const Definition* definition = enumIter->second.find(ref,
+ RootDefinition::AllowParens::kYes)) {
return definition;
}
}
@@ -682,7 +687,7 @@ void MdOut::markTypeOut(Definition* def) {
TextParser tp(def->fFileName, def->fStart, def->fContentStart, def->fLineCount);
tp.skipExact("#Member");
tp.skipWhiteSpace();
- const char* end = tp.trimmedBracketEnd('\n', TextParser::OneLine::kYes);
+ const char* end = tp.trimmedBracketEnd('\n');
this->lfAlways(2);
fprintf(fOut, "<a name=\"%s\"> <code><strong>%.*s</strong></code> </a>",
def->fFiddle.c_str(), (int) (end - tp.fChar), tp.fChar);
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp
index e43a412eed..06a5d2be70 100644
--- a/tools/bookmaker/spellCheck.cpp
+++ b/tools/bookmaker/spellCheck.cpp
@@ -34,7 +34,7 @@ public:
this->reset();
}
bool check(const char* match);
- void report();
+ void report(SkCommandLineFlags::StringArray report);
private:
enum class TableState {
kNone,
@@ -56,6 +56,7 @@ private:
fTableState = TableState::kNone;
fInCode = false;
fInConst = false;
+ fInFormula = false;
fInDescription = false;
fInStdOut = false;
}
@@ -77,6 +78,7 @@ private:
bool fInCode;
bool fInConst;
bool fInDescription;
+ bool fInFormula;
bool fInStdOut;
typedef ParserCommon INHERITED;
};
@@ -88,10 +90,10 @@ private:
modifiers to try to maintain a consistent voice.
Maybe also look for passive verbs (e.g. 'is') and suggest active ones?
*/
-void BmhParser::spellCheck(const char* match) const {
+void BmhParser::spellCheck(const char* match, SkCommandLineFlags::StringArray report) const {
SpellCheck checker(*this);
checker.check(match);
- checker.report();
+ checker.report(report);
}
bool SpellCheck::check(const char* match) {
@@ -112,13 +114,22 @@ bool SpellCheck::check(const char* match) {
return true;
}
+static bool all_lower(const string& str) {
+ for (auto c : str) {
+ if (!islower(c)) {
+ return false;
+ }
+ }
+ return true;
+}
+
bool SpellCheck::check(Definition* def) {
fFileName = def->fFileName;
fLineCount = def->fLineCount;
string printable = def->printableName();
const char* textStart = def->fContentStart;
if (MarkType::kParam != def->fMarkType && MarkType::kConst != def->fMarkType &&
- TableState::kNone != fTableState) {
+ MarkType::kPrivate != def->fMarkType && TableState::kNone != fTableState) {
fTableState = TableState::kNone;
}
switch (def->fMarkType) {
@@ -170,11 +181,14 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kExample:
break;
+ case MarkType::kExperimental:
+ break;
case MarkType::kExternal:
break;
case MarkType::kFile:
break;
case MarkType::kFormula:
+ fInFormula = true;
break;
case MarkType::kFunction:
break;
@@ -184,12 +198,19 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kLegend:
break;
+ case MarkType::kLink:
+ break;
case MarkType::kList:
break;
+ case MarkType::kMarkChar:
+ break;
case MarkType::kMember:
break;
case MarkType::kMethod: {
string method_name = def->methodName();
+ if (all_lower(method_name)) {
+ method_name += "()";
+ }
string formattedStr = def->formatFunction();
if (!def->isClone()) {
this->wordCheck(method_name);
@@ -197,6 +218,8 @@ bool SpellCheck::check(Definition* def) {
fTableState = TableState::kNone;
fMethod = def;
} break;
+ case MarkType::kNoExample:
+ break;
case MarkType::kParam: {
if (TableState::kNone == fTableState) {
fTableState = TableState::kRow;
@@ -219,6 +242,8 @@ bool SpellCheck::check(Definition* def) {
} break;
case MarkType::kPlatform:
break;
+ case MarkType::kPrivate:
+ break;
case MarkType::kReturn:
break;
case MarkType::kRow:
@@ -240,6 +265,8 @@ bool SpellCheck::check(Definition* def) {
fRoot = def->asRoot();
this->wordCheck(def->fName);
break;
+ case MarkType::kSubstitute:
+ break;
case MarkType::kSubtopic:
this->printCheck(printable);
break;
@@ -263,6 +290,8 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kUnion:
break;
+ case MarkType::kVolatile:
+ break;
case MarkType::kWidth:
break;
default:
@@ -284,6 +313,9 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kExample:
break;
+ case MarkType::kFormula:
+ fInFormula = false;
+ break;
case MarkType::kLegend:
break;
case MarkType::kMethod:
@@ -336,21 +368,90 @@ void SpellCheck::childCheck(const Definition* def, const char* start) {
}
void SpellCheck::leafCheck(const char* start, const char* end) {
- TextParser text("", start, end, fLineCount);
+ const char* chPtr = start;
+ int inAngles = 0;
+ int inParens = 0;
+ bool inQuotes = false;
+ bool allLower = true;
+ char priorCh = 0;
+ char lastCh = 0;
+ const char* wordStart = nullptr;
+ const char* wordEnd = nullptr;
+ const char* possibleEnd = nullptr;
do {
- const char* lineStart = text.fChar;
- text.skipToAlpha();
- if (text.eof()) {
+ if (wordStart && wordEnd) {
+ if (!allLower || (!inQuotes && '\"' != lastCh && !inParens
+ && ')' != lastCh && !inAngles && '>' != lastCh)) {
+ string word(wordStart, (possibleEnd ? possibleEnd : wordEnd) - wordStart);
+ wordCheck(word);
+ }
+ wordStart = nullptr;
+ }
+ if (chPtr == end) {
break;
}
- const char* wordStart = text.fChar;
- text.fChar = lineStart;
- text.skipTo(wordStart); // advances line number
- text.skipToNonAlphaNum();
- fLineCount = text.fLineCount;
- string word(wordStart, text.fChar - wordStart);
- wordCheck(word);
- } while (!text.eof());
+ switch (*chPtr) {
+ case '>':
+ if (isalpha(lastCh)) {
+ --inAngles;
+ SkASSERT(inAngles >= 0);
+ }
+ wordEnd = chPtr;
+ break;
+ case '(':
+ ++inParens;
+ possibleEnd = chPtr;
+ break;
+ case ')':
+ --inParens;
+ if ('(' == lastCh) {
+ wordEnd = chPtr + 1;
+ } else {
+ wordEnd = chPtr;
+ }
+ SkASSERT(inParens >= 0);
+ break;
+ case '\"':
+ inQuotes = !inQuotes;
+ wordEnd = chPtr;
+ SkASSERT(inQuotes == !wordStart);
+ break;
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ allLower = false;
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z':
+ if (!wordStart) {
+ wordStart = chPtr;
+ wordEnd = nullptr;
+ possibleEnd = nullptr;
+ allLower = 'a' <= *chPtr;
+ if ('<' == lastCh || ('<' == priorCh && '/' == lastCh)) {
+ ++inAngles;
+ }
+ }
+ break;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case '_':
+ allLower = false;
+ case '-': // note that dash doesn't clear allLower
+ break;
+ default:
+ wordEnd = chPtr;
+ break;
+ }
+ priorCh = lastCh;
+ lastCh = *chPtr;
+ } while (++chPtr <= end);
}
void SpellCheck::printCheck(const string& str) {
@@ -360,25 +461,107 @@ void SpellCheck::printCheck(const string& str) {
}
}
-void SpellCheck::report() {
- for (auto iter : fWords) {
- if (string::npos != iter.second.fFile.find("undocumented.bmh")) {
- continue;
- }
- if (string::npos != iter.second.fFile.find("markup.bmh")) {
- continue;
+static bool stringCompare(const std::pair<string, CheckEntry>& i, const std::pair<string, CheckEntry>& j) {
+ return i.first.compare(j.first) < 0;
+}
+
+void SpellCheck::report(SkCommandLineFlags::StringArray report) {
+ vector<std::pair<string, CheckEntry>> elems(fWords.begin(), fWords.end());
+ std::sort(elems.begin(), elems.end(), stringCompare);
+ if (report.contains("once")) {
+ for (auto iter : elems) {
+ if (string::npos != iter.second.fFile.find("undocumented.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("markup.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("usingBookmaker.bmh")) {
+ continue;
+ }
+ if (iter.second.fCount == 1) {
+ SkDebugf("%s(%d): %s\n", iter.second.fFile.c_str(), iter.second.fLine,
+ iter.first.c_str());
+ }
}
- if (string::npos != iter.second.fFile.find("usingBookmaker.bmh")) {
- continue;
+ SkDebugf("\n");
+ }
+ if (report.contains("all")) {
+ int column = 0;
+ for (auto iter : elems) {
+ if (string::npos != iter.second.fFile.find("undocumented.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("markup.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("usingBookmaker.bmh")) {
+ continue;
+ }
+ string check = iter.first.c_str();
+ bool allLower = true;
+ for (auto c : check) {
+ if (isupper(c)) {
+ allLower = false;
+ break;
+ }
+ }
+ if (!allLower) {
+ continue;
+ }
+ if (column + check.length() > 100) {
+ SkDebugf("\n");
+ column = 0;
+ }
+ SkDebugf("%s ", check.c_str());
+ column += check.length();
}
- if (iter.second.fCount == 1) {
- SkDebugf("%s %s %d\n", iter.first.c_str(), iter.second.fFile.c_str(),
- iter.second.fLine);
+ SkDebugf("\n\n");
+ }
+ if (report.contains("mispellings")) {
+ const char* mispelled[] = {
+ "decrementing",
+ "differentially",
+ "incrementing",
+ "superset",
+ };
+ const char** mispellPtr = mispelled;
+ const char** mispellEnd = &mispelled[SK_ARRAY_COUNT(mispelled)];
+ for (auto iter : elems) {
+ if (string::npos != iter.second.fFile.find("undocumented.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("markup.bmh")) {
+ continue;
+ }
+ if (string::npos != iter.second.fFile.find("usingBookmaker.bmh")) {
+ continue;
+ }
+ string check = iter.first.c_str();
+ while (check.compare(*mispellPtr) > 0) {
+ SkDebugf("%s not found\n", *mispellPtr);
+ if (mispellEnd == ++mispellPtr) {
+ break;
+ }
+ }
+ if (mispellEnd == mispellPtr) {
+ break;
+ }
+ if (check.compare(*mispellPtr) == 0) {
+ SkDebugf("%s(%d): %s\n", iter.second.fFile.c_str(), iter.second.fLine,
+ iter.first.c_str());
+ if (mispellEnd == ++mispellPtr) {
+ break;
+ }
+ }
}
}
}
void SpellCheck::wordCheck(const string& str) {
+ if ("nullptr" == str) {
+ return; // doesn't seem worth it, treating nullptr as a word in need of correction
+ }
bool hasColon = false;
bool hasDot = false;
bool hasParen = false;
@@ -433,11 +616,20 @@ void SpellCheck::wordCheck(const string& str) {
&& islower(str[0]) && isupper(str[1])) {
inCode = true;
}
+ bool methodParam = false;
+ if (fMethod) {
+ for (auto child : fMethod->fChildren) {
+ if (MarkType::kParam == child->fMarkType && str == child->fName) {
+ methodParam = true;
+ break;
+ }
+ }
+ }
auto& mappy = hasColon ? fColons :
hasDot ? fDots :
hasParen ? fParens :
hasUnderscore ? fUnderscores :
- fInStdOut || inCode || fInConst ? fCode :
+ fInStdOut || fInFormula || inCode || fInConst || methodParam ? fCode :
sawDigit ? fDigits : fWords;
auto iter = mappy.find(str);
if (mappy.end() != iter) {