aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2017-09-01 15:51:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-01 20:10:51 +0000
commitce1012403bacf017c0d91c779fa9e9bddd1475f8 (patch)
treec37f3cf044fec75b6ad5e2e298363f3ea233e6cb /docs
parentbd40a5bf5bef1ebb5400f0cf087a420a98bb707b (diff)
bookmaker spelling with fixed linux build
Work on spell-checker to identify errors and isolate more concepts requiring definitions. fix linux build Docs-Preview: https://skia.org/?cl=42103 Docs-Preview: https://skia.org/?cl=41180 Tbr: caryclark@google.com Bug: skia: 6898 Change-Id: Id939b0c2915c22e0fa1b15623c1a56fbe9d4051d Reviewed-on: https://skia-review.googlesource.com/42103 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'docs')
-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
4 files changed, 669 insertions, 555 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