aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2018-02-07 01:58:51 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-07 01:58:56 +0000
commit9ff8c8c073ba553dc8b22bb9aacc23949292f72f (patch)
tree52dfdbab4fb28f2db324d45b6691c7f87c4fdca6 /docs
parent9ca602ae04a761c7983990942a72a45bdfdb2d7d (diff)
Revert "remove SkCanvas::kIsOpaque_SaveLayerFlag"
This reverts commit 9a7a2ee5ad8453a985d7d76c1e0ebb50d17fec63. Reason for revert: still need to update blink_headless in Google3 Original change's description: > remove SkCanvas::kIsOpaque_SaveLayerFlag > > This is a performance-only hint that no one but fuzzers > is using. It's even explicitly filtered out in Android. > > The fuzzers have noticed they can trick us into allocating > uninitialized memory and treating it as opaque, blending > uninitialized pixels, etc. > > Since no one's using this, we can just kill the bit. > > Bug: skia:7566, chromium:808830 > > Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7 > Reviewed-on: https://skia-review.googlesource.com/104441 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com Change-Id: I10d3c7e5184b9322715a5bfb6a7106292c8876a3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7566, chromium:808830 Reviewed-on: https://skia-review.googlesource.com/104781 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/SkCanvas_Reference.bmh374
1 files changed, 190 insertions, 184 deletions
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index bb4f4c8303..67445d4464 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -18,9 +18,9 @@ Matrix values in the stack. The transformed geometry is clipped by the intersect
of all of Clip values in the stack. The Canvas draw calls use Paint to supply drawing
state such as Color, Typeface, text size, stroke width, Shader and so on.
-To draw to a pixel-based destination, create Raster_Surface or GPU_Surface.
-Request Canvas from Surface to obtain the interface to draw.
-Canvas generated by Raster_Surface draws to memory visible to the CPU.
+To draw to a pixel-based destination, create Raster_Surface or GPU_Surface.
+Request Canvas from Surface to obtain the interface to draw.
+Canvas generated by Raster_Surface draws to memory visible to the CPU.
Canvas generated by GPU_Surface uses Vulkan or OpenGL to draw to the GPU.
To draw to a document, obtain Canvas from SVG_Canvas, Document_PDF, or Picture_Recorder.
@@ -28,7 +28,7 @@ Document based Canvas and other Canvas Subclasses reference Device describing th
destination.
Canvas can be constructed to draw to Bitmap without first creating Raster_Surface.
-This approach may be deprecated in the future.
+This approach may be deprecated in the future.
#Subtopic Related_Function
#Populate
@@ -70,7 +70,7 @@ info contains Color_Type and Alpha_Type supported by Raster_Surface;
pixels is not nullptr;
rowBytes is zero or large enough to contain info width pixels of Color_Type.
-Pass zero for rowBytes to compute rowBytes from info width and size of pixel.
+Pass zero for rowBytes to compute rowBytes from info width and size of pixel.
If rowBytes is greater than zero, it must be equal to or greater than
info width times bytes required for Color_Type.
@@ -132,7 +132,7 @@ void draw(SkCanvas* ) {
# ------------------------------------------------------------------------------
#Method static std::unique_ptr<SkCanvas> MakeRasterDirectN32(int width, int height, SkPMColor* pixels,
- size_t rowBytes)
+ size_t rowBytes)
#Line # creates from image data and Pixel_Storage ##
Allocates raster Canvas specified by inline image specification. Subsequent Canvas
@@ -147,7 +147,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 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 Color_Type.
@@ -208,7 +208,7 @@ void draw(SkCanvas* ) {
#Method SkCanvas()
#Line # creates with no Surface, no dimensions ##
-Creates an empty Canvas with no backing device or pixels, with
+Creates an empty Canvas with no backing device or pixels, with
a width and height of zero.
#Return empty Canvas ##
@@ -265,7 +265,7 @@ Creates Canvas of the specified dimensions without a Surface.
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
+Surface_Properties_Legacy_Font_Host settings, which choose the pixel striping
direction and order. Since a platform may dynamically change its direction when
the device is rotated, and since a platform may have multiple monitors with
different characteristics, it is best not to rely on this legacy behavior.
@@ -304,7 +304,7 @@ different characteristics, it is best not to rely on this legacy behavior.
#Line # uses existing Bitmap ##
Construct a canvas that draws into bitmap.
-Sets SkSurfaceProps::kLegacyFontHost_InitType in constructed Surface.
+Sets SkSurfaceProps::kLegacyFontHost_InitType in constructed Surface.
Bitmap is copied so that subsequently editing bitmap will not affect
constructed Canvas.
@@ -405,7 +405,7 @@ bitmap is copied so that subsequently editing bitmap will not affect
constructed Canvas.
#Param bitmap width, height, Color_Type, Alpha_Type,
- and pixel storage of Raster_Surface
+ and pixel storage of Raster_Surface
##
#Param props order and orientation of RGB striping; and whether to use
device independent fonts
@@ -588,7 +588,7 @@ return false and leave props unchanged.
#Method void flush()
#Line # triggers execution of all pending draw operations ##
-Triggers the immediate execution of all pending draw operations.
+Triggers the immediate execution of all pending draw operations.
If Canvas is associated with GPU_Surface, resolves all pending GPU operations.
If Canvas is associated with Raster_Surface, has no effect; raster draw
operations are never deferred.
@@ -709,7 +709,7 @@ void draw(SkCanvas* canvas) {
#ToDo fiddle should show both CPU and GPU out ##
-#SeeAlso GrContext
+#SeeAlso GrContext
##
@@ -747,7 +747,7 @@ void draw(SkCanvas* canvas) {
#Description
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.
+device.
The Layer and blended result appear on the CPU and GPU but the large dotted
"DEF" appear only on the CPU.
@@ -896,7 +896,7 @@ Canvas or Surface call may invalidate the pixmap values.
#Line # copies and converts rectangle of pixels from Canvas ##
Copies Rect of pixels from Canvas into dstPixels. Matrix and Clip are
-ignored.
+ignored.
Source Rect corners are (srcX, srcY) and (imageInfo().width(), imageInfo().height()).
Destination Rect corners are (0, 0) and (dstInfo.width(), dstInfo.height()).
@@ -950,7 +950,7 @@ Does not copy, and returns false if:
for (int x : { 32, -32 } ) {
for (int y : { 32, -32 } ) {
canvas->readPixels(info, data->writable_data(), info.minRowBytes(), x, y);
- }
+ }
}
sk_sp<SkImage> image = SkImage::MakeRasterData(info, data, info.minRowBytes());
canvas->drawImage(image, 0, 0);
@@ -1272,10 +1272,10 @@ Note that the second clipRect is not permitted to enlarge Clip.
#Height 160
void draw(SkCanvas* canvas) {
SkPaint paint;
- canvas->save(); // records stack depth to restore
+ canvas->save(); // records stack depth to restore
canvas->clipRect(SkRect::MakeWH(100, 100)); // constrains drawing to clip
canvas->clear(SK_ColorRED); // draws to limit of clip
- canvas->save(); // records stack depth to restore
+ canvas->save(); // records stack depth to restore
canvas->clipRect(SkRect::MakeWH(50, 150)); // Rect below 100 is ignored
canvas->clear(SK_ColorBLUE); // draws to smaller clip
canvas->restore(); // enlarges clip
@@ -1283,7 +1283,7 @@ void draw(SkCanvas* canvas) {
canvas->restore(); // enlarges clip
canvas->drawLine(150, 20, 50, 120, paint); // line below 100 is drawn
}
-##
+##
Each Clip uses the current Matrix for its coordinates.
@@ -1323,7 +1323,7 @@ Call restoreToCount with result to restore this and subsequent saves.
#Return depth of saved stack ##
#Example
-#Description
+#Description
The black square is translated 50 pixels down and to the right.
Restoring Canvas state removes translate() from Canvas stack;
the red square is not translated, and is drawn at the origin.
@@ -1353,9 +1353,9 @@ void draw(SkCanvas* canvas) {
#In State_Stack
#Line # restores changes to Clip and Matrix, pops save stack ##
Removes changes to Matrix, Clip, and Draw_Filter since Canvas state was
-last saved. The state is removed from the stack.
+last saved. The state is removed from the stack.
-Does nothing if the stack is empty.
+Does nothing if the stack is empty.
#Example
void draw(SkCanvas* canvas) {
@@ -1377,7 +1377,7 @@ void draw(SkCanvas* canvas) {
#In State_Stack
#Line # returns depth of stack containing Clip and Matrix ##
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.
+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 ##
@@ -1411,7 +1411,7 @@ depth = 1
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.
+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 ##
@@ -1432,7 +1432,7 @@ depth = 1
##
##
-#SeeAlso restore() getSaveCount save()
+#SeeAlso restore() getSaveCount save()
##
@@ -1446,7 +1446,7 @@ depth = 1
#Line # temporary Bitmap to draw into ##
Layer allocates a temporary Bitmap to draw into. When the drawing is
-complete, the Bitmap is drawn into the Canvas.
+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 Bitmap is drawn into the previous Layer.
@@ -1465,7 +1465,7 @@ Calling restore() discards changes to Matrix, Clip, and Draw_Filter,
and draws the Bitmap.
Matrix may be changed by translate(), scale(), rotate(), skew(), concat(),
-setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
+setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect,
clipPath, clipRegion.
Rect bounds suggests but does not define the Bitmap size. To clip drawing to
@@ -1504,7 +1504,7 @@ void draw(SkCanvas* canvas) {
##
-#Method int saveLayer(const SkRect& bounds, const SkPaint* paint)
+#Method int saveLayer(const SkRect& bounds, const SkPaint* paint)
#In Layer
Saves Matrix, Clip, and Draw_Filter (Draw_Filter deprecated on most platforms),
@@ -1532,7 +1532,7 @@ Call restoreToCount with returned value to restore this and subsequent saves.
#Example
#Description
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.
+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
@@ -1567,7 +1567,7 @@ 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 Layer size. To clip drawing to
a specific rectangle, use clipRect.
@@ -1655,7 +1655,7 @@ Call restoreToCount with returned value to restore this and subsequent saves.
##
-#ToDo
+#ToDo
add new markup to associate typedef SaveLayerFlags with Enum so that, for
documentation purposes, this enum is named rather than anonymous
##
@@ -1664,6 +1664,7 @@ documentation purposes, this enum is named rather than anonymous
#Line # sets SaveLayerRec options ##
#Code
enum {
+ kIsOpaque_SaveLayerFlag = 1 << 0,
kPreserveLCDText_SaveLayerFlag = 1 << 1,
kInitWithPrevious_SaveLayerFlag = 1 << 2,
kDontClipToLayer_Legacy_SaveLayerFlag = kDontClipToLayer_PrivateSaveLayerFlag,
@@ -1673,6 +1674,11 @@ documentation purposes, this enum is named rather than anonymous
SaveLayerFlags provides options that may be used in any combination in SaveLayerRec,
defining how Layer allocated by saveLayer operates.
+#Const kIsOpaque_SaveLayerFlag 1
+ Creates Layer without transparency. Flag is ignored if Layer Paint contains
+ Image_Filter or Color_Filter.
+##
+
#Const kPreserveLCDText_SaveLayerFlag 2
Creates Layer for LCD text. Flag is ignored if Layer Paint contains
Image_Filter or Color_Filter.
@@ -1690,7 +1696,7 @@ defining how Layer allocated by saveLayer operates.
#Height 160
#Description
Canvas Layer captures red and blue circles scaled up by four.
-scalePaint blends Layer back with transparency.
+scalePaint blends Layer back with transparency.
##
void draw(SkCanvas* canvas) {
SkPaint redPaint, bluePaint, scalePaint;
@@ -1704,7 +1710,7 @@ void draw(SkCanvas* canvas) {
scalePaint.setImageFilter(
SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
SkCanvas::SaveLayerRec saveLayerRec(nullptr, &scalePaint,
- SkCanvas::kInitWithPrevious_SaveLayerFlag);
+ SkCanvas::kInitWithPrevious_SaveLayerFlag);
canvas->saveLayer(saveLayerRec);
canvas->restore();
}
@@ -1731,7 +1737,7 @@ void draw(SkCanvas* canvas) {
};
##
-SaveLayerRec contains the state used to create the Layer.
+SaveLayerRec contains the state used to create the Layer.
#Member const SkRect* fBounds
fBounds is used as a hint to limit the size of Layer; may be nullptr.
@@ -1757,7 +1763,7 @@ SaveLayerRec contains the state used to create the Layer.
##
#Member const SkMatrix* fClipMatrix
- fClipMatrix transforms fClipMask before it clips Layer. 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.
##
@@ -1773,7 +1779,7 @@ SaveLayerRec contains the state used to create the Layer.
#Description
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.
+transferred to the main canvas.
##
void draw(SkCanvas* canvas) {
SkPaint redPaint, bluePaint;
@@ -1785,7 +1791,7 @@ void draw(SkCanvas* canvas) {
SkMatrix matrix;
matrix.setScale(4, 4);
auto scaler = SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr);
- SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);
+ SkCanvas::SaveLayerRec saveLayerRec(nullptr, nullptr, scaler.get(), 0);
canvas->saveLayer(saveLayerRec);
canvas->drawCircle(125, 85, 8, redPaint);
canvas->restore();
@@ -1800,8 +1806,8 @@ Sets fBounds, fPaint, and fBackdrop to nullptr. Clears fSaveLayerFlags.
#Example
SkCanvas::SaveLayerRec rec1;
- rec1.fSaveLayerFlags = SkCanvas::kPreserveLCDText_SaveLayerFlag;
- SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kPreserveLCDText_SaveLayerFlag);
+ rec1.fSaveLayerFlags = SkCanvas::kIsOpaque_SaveLayerFlag;
+ SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kIsOpaque_SaveLayerFlag);
SkDebugf("rec1 %c= rec2\n", rec1.fBounds == rec2.fBounds
&& rec1.fPaint == rec2.fPaint
&& rec1.fBackdrop == rec2.fBackdrop
@@ -1895,7 +1901,7 @@ Implementation is not complete; has no effect if Device is GPU-backed.
##
#Param clipMask clip applied to Layer; may be nullptr ##
#Param clipMatrix matrix applied to clipMask; may be nullptr to use
- identity matrix
+ identity matrix
##
#Param saveLayerFlags SaveLayerRec options to modify Layer ##
@@ -1968,7 +1974,7 @@ Outside of the circle the mandrill is brightened.
Translate Matrix by dx along the x-axis and dy along the y-axis.
Mathematically, replace Matrix with a translation matrix
-Premultiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of moving the drawing by (dx, dy) before transforming
the result with Matrix.
@@ -1980,10 +1986,10 @@ the result with Matrix.
#Height 128
#Description
scale() followed by translate() produces different results from translate() followed
-by scale().
+by scale().
The blue stroke follows translate of (50, 50); a black
-fill follows scale of (2, 1/2.f). After restoring the clip, which resets
+fill follows scale of (2, 1/2.f). After restoring the clip, which resets
Matrix, a red frame follows the same scale of (2, 1/2.f); a gray fill
follows translate of (50, 50).
##
@@ -2020,7 +2026,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
-Premultiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of scaling the drawing by (sx, sy) before transforming
the result with Matrix.
@@ -2054,7 +2060,7 @@ void draw(SkCanvas* canvas) {
Rotate Matrix by degrees. Positive degrees rotates clockwise.
Mathematically, replace Matrix with a rotation matrix
-Premultiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of rotating the drawing by degrees before transforming
the result with Matrix.
@@ -2073,7 +2079,7 @@ void draw(SkCanvas* canvas) {
canvas->drawCircle(0, 0, 60, paint);
canvas->save();
canvas->rotate(10 * 360 / 60); // 10 minutes of 60 scaled to 360 degrees
- canvas->drawLine(0, 0, 0, -50, paint);
+ canvas->drawLine(0, 0, 0, -50, paint);
canvas->restore();
canvas->rotate((5 + 10.f/60) * 360 / 12); // 5 and 10/60 hours of 12 scaled to 360 degrees
canvas->drawLine(0, 0, 0, -30, paint);
@@ -2094,7 +2100,7 @@ clockwise.
Mathematically, construct a rotation matrix. Premultiply the rotation matrix by
a translation matrix, then replace Matrix with the resulting matrix
-Premultiplied with Matrix.
+Premultiplied with Matrix.
This has the effect of rotating the drawing about a given point before
transforming the result with Matrix.
@@ -2128,7 +2134,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 Premultiplied 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.
@@ -2137,7 +2143,7 @@ the result with Matrix.
#Param sy amount to skew in y ##
#Example
- #Description
+ #Description
Black text mimics an oblique text style by using a negative skew in x that
shifts the geometry to the right as the y values decrease.
Red text uses a positive skew in y to shift the geometry down as the x values
@@ -2281,13 +2287,13 @@ This does not account for translation by Device or Surface.
#Line # stack of clipping Paths ##
Clip is built from a stack of clipping paths. Each Path in the
-stack can be constructed from one or more Path_Contour elements. The
+stack can be constructed from one or more Path_Contour elements. The
Path_Contour may be composed of any number of Path_Verb segments. Each
Path_Contour forms a closed area; Path_Fill_Type defines the area enclosed
by Path_Contour.
Clip stack of Path elements successfully restrict the Path area. Each
-Path is transformed by Matrix, then intersected with or subtracted from the
+Path is transformed by Matrix, then intersected with or subtracted from the
prior Clip to form the replacement Clip. Use SkClipOp::kDifference
to subtract Path from Clip; use SkClipOp::kIntersect to intersect Path
with Clip.
@@ -2298,7 +2304,7 @@ 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
+that drawing blend partially with the destination along the edge. A rotated
rectangular Anti-aliased clip looks smoother but draws slower.
Clip can combine with Rect and Round_Rect primitives; like
@@ -2332,7 +2338,7 @@ and is unaffected by Matrix.
scalePaint.setImageFilter(
SkImageFilter::MakeMatrixFilter(matrix, kNone_SkFilterQuality, nullptr));
SkCanvas::SaveLayerRec saveLayerRec(
- nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);
+ nullptr, &scalePaint, SkCanvas::kInitWithPrevious_SaveLayerFlag);
canvas->saveLayer(saveLayerRec);
canvas->restore();
##
@@ -2369,7 +2375,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipRect(const SkRect& rect, SkClipOp op)
+#Method void clipRect(const SkRect& rect, SkClipOp op)
#In Clip
Replace Clip with the intersection or difference of Clip and rect.
@@ -2398,7 +2404,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipRect(const SkRect& rect, bool doAntiAlias = false)
+#Method void clipRect(const SkRect& rect, bool doAntiAlias = false)
#In Clip
Replace Clip with the intersection of Clip and rect.
@@ -2449,7 +2455,7 @@ clipPath and intersect the current clip with the specified rect.
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 maximum clip.
+Pass an empty rect to disable maximum clip.
#Private
This is private API to be used only by Android framework.
@@ -2491,7 +2497,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipRRect(const SkRRect& rrect, SkClipOp op)
+#Method void clipRRect(const SkRRect& rrect, SkClipOp op)
#In Clip
Replace Clip with the intersection or difference of Clip and rrect.
@@ -2516,7 +2522,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
+#Method void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
#In Clip
Replace Clip with the intersection of Clip and rrect,
@@ -2584,7 +2590,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipPath(const SkPath& path, SkClipOp op)
+#Method void clipPath(const SkPath& path, SkClipOp op)
#In Clip
Replace Clip with the intersection or difference of Clip and path.
@@ -2601,7 +2607,7 @@ before it is combined with Clip.
#Example
#Description
Overlapping Rects form a clip. When clip Path_Fill_Type is set to
-SkPath::kWinding_FillType, the overlap is included. Set to
+SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
void draw(SkCanvas* canvas) {
@@ -2626,7 +2632,7 @@ void draw(SkCanvas* canvas) {
##
-#Method void clipPath(const SkPath& path, bool doAntiAlias = false)
+#Method void clipPath(const SkPath& path, bool doAntiAlias = false)
#In Clip
Replace Clip with the intersection of Clip and path.
@@ -2642,8 +2648,8 @@ path is transformed by Matrix before it is combined with Clip.
#Example
#Height 212
#Description
-Clip loops over itself covering its center twice. When clip Path_Fill_Type
-is set to SkPath::kWinding_FillType, the overlap is included. Set to
+Clip loops over itself covering its center twice. When clip Path_Fill_Type
+is set to SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
void draw(SkCanvas* canvas) {
@@ -2671,7 +2677,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
-#Method void setAllowSimplifyClip(bool allow)
+#Method void setAllowSimplifyClip(bool allow)
#In Clip
#Line # experimental ##
@@ -2737,8 +2743,8 @@ Use to check if an area to be drawn is clipped out, to skip subsequent draw call
#Example
void draw(SkCanvas* canvas) {
- SkRect testRect = {30, 30, 120, 129 };
- SkRect clipRect = {30, 130, 120, 230 };
+ SkRect testRect = {30, 30, 120, 129 };
+ SkRect clipRect = {30, 130, 120, 230 };
canvas->save();
canvas->clipRect(clipRect);
SkDebugf("quickReject %s\n", canvas->quickReject(testRect) ? "true" : "false");
@@ -2771,8 +2777,8 @@ Use to check if an area to be drawn is clipped out, to skip subsequent draw call
#Example
void draw(SkCanvas* canvas) {
- SkPoint testPoints[] = {{30, 30}, {120, 30}, {120, 129} };
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPoint testPoints[] = {{30, 30}, {120, 30}, {120, 129} };
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
SkPath testPath, clipPath;
testPath.addPoly(testPoints, SK_ARRAY_COUNT(testPoints), true);
clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
@@ -2794,7 +2800,7 @@ void draw(SkCanvas* canvas) {
##
-#Method SkRect getLocalClipBounds() const
+#Method SkRect getLocalClipBounds() const
#In Clip
#Line # returns Clip bounds in source coordinates ##
@@ -2807,7 +2813,7 @@ is Anti-aliased.
#Return bounds of Clip in local coordinates ##
#Example
- #Description
+ #Description
Initial bounds is device bounds outset by 1 on all sides.
Clipped bounds is clipPath bounds outset by 1 on all sides.
Scaling the canvas by two in x and y scales the local bounds by 1/2 in x and y.
@@ -2817,7 +2823,7 @@ is Anti-aliased.
SkRect bounds = canvas->getLocalClipBounds();
SkDebugf("left:%g top:%g right:%g bottom:%g\n",
bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
SkPath clipPath;
clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
canvas->clipPath(clipPath);
@@ -2841,7 +2847,7 @@ is Anti-aliased.
##
-#Method bool getLocalClipBounds(SkRect* bounds) const
+#Method bool getLocalClipBounds(SkRect* bounds) const
#In Clip
Return bounds of Clip, transformed by inverse of Matrix. If Clip is empty,
@@ -2878,14 +2884,14 @@ is Anti-aliased.
##
-#Method SkIRect getDeviceClipBounds() const
+#Method SkIRect getDeviceClipBounds() const
#In Clip
#Line # returns IRect bounds of Clip ##
Return IRect bounds of Clip, unaffected by Matrix. If Clip is empty,
return SkRect::MakeEmpty, where all Rect sides equal zero.
-Unlike getLocalClipBounds, returned IRect is not outset.
+Unlike getLocalClipBounds, returned IRect is not outset.
#Return bounds of Clip in Device coordinates ##
@@ -2901,7 +2907,7 @@ void draw(SkCanvas* canvas) {
SkIRect bounds = canvas->getDeviceClipBounds();
SkDebugf("left:%d top:%d right:%d bottom:%d\n",
bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
- SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
+ SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };
SkPath clipPath;
clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);
canvas->save();
@@ -2931,13 +2937,13 @@ void draw(SkCanvas* canvas) {
##
-#Method bool getDeviceClipBounds(SkIRect* bounds) const
+#Method bool getDeviceClipBounds(SkIRect* bounds) const
#In Clip
Return IRect bounds of Clip, unaffected by Matrix. If Clip is empty,
return false, and set bounds to SkRect::MakeEmpty, where all Rect sides equal zero.
-Unlike getLocalClipBounds, bounds is not outset.
+Unlike getLocalClipBounds, bounds is not outset.
#Param bounds Rect of Clip in device coordinates ##
@@ -2990,10 +2996,10 @@ mode determines how Color_ARGB is combined with destination.
# ------------------------------------------------------------------------------
-#Method void clear(SkColor color)
+#Method void clear(SkColor color)
#Line # fills Clip with Color ##
-Fill Clip with Color color using SkBlendMode::kSrc.
+Fill Clip with Color color using SkBlendMode::kSrc.
This has the effect of replacing all pixels contained by Clip with color.
#Param color Unpremultiplied Color_ARGB ##
@@ -3002,7 +3008,7 @@ This has the effect of replacing all pixels contained by Clip with color.
void draw(SkCanvas* canvas) {
canvas->save();
canvas->clipRect(SkRect::MakeWH(256, 128));
- canvas->clear(SkColorSetARGB(0x80, 0xFF, 0x00, 0x00));
+ canvas->clear(SkColorSetARGB(0x80, 0xFF, 0x00, 0x00));
canvas->restore();
canvas->save();
canvas->clipRect(SkRect::MakeWH(150, 192));
@@ -3019,7 +3025,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
-#Method void discard()
+#Method void discard()
#Line # makes Canvas contents undefined ##
Make Canvas contents undefined. Subsequent calls that read Canvas pixels,
@@ -3037,7 +3043,7 @@ any cached data is deleted when owning Surface or Device is deleted.
#ToDo example? not sure how to make this meaningful w/o more implementation detail ##
#SeeAlso flush() SkSurface::prepareForExternalIO GrContext::abandonContext
-#NoExample
+#NoExample
##
##
@@ -3098,7 +3104,7 @@ an open polygon.
##
#Example
- #Description
+ #Description
The upper left corner shows three squares when drawn as points.
The upper right corner shows one line; when drawn as lines, two points are required per line.
The lower right corner shows two lines; when draw as polygon, no miter is drawn at the corner.
@@ -3142,7 +3148,7 @@ Paint_Stroke_Width.
If mode is kLines_PointMode, each pair of points draws a line segment.
One line is drawn for every two points; each point is used once. If count is odd,
-the final point is ignored.
+the final point is ignored.
If mode is kPolygon_PointMode, each adjacent pair of points draws a line segment.
count minus one lines are drawn; the first and last point are used once.
@@ -3152,7 +3158,7 @@ Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
Always draws each element one at a time; is not affected by
Paint_Stroke_Join, and unlike drawPath, does not create a mask from all points
-and lines before drawing.
+and lines before drawing.
#Param mode whether pts draws points or lines ##
#Param count number of points in the array ##
@@ -3161,7 +3167,7 @@ and lines before drawing.
#Example
#Height 200
- #Description
+ #Description
#List
# The first column draws points. ##
# The second column draws points as lines. ##
@@ -3181,7 +3187,7 @@ void draw(SkCanvas* canvas) {
paint.setStrokeWidth(10);
paint.setColor(0x80349a45);
const SkPoint points[] = {{32, 16}, {48, 48}, {16, 32}};
- const SkPaint::Join join[] = { SkPaint::kRound_Join,
+ const SkPaint::Join join[] = { SkPaint::kRound_Join,
SkPaint::kMiter_Join,
SkPaint::kBevel_Join };
int joinIndex = 0;
@@ -3215,7 +3221,7 @@ Draw point at (x, y) using Clip, Matrix and Paint paint.
The shape of point drawn depends on paint Paint_Stroke_Cap.
If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
-Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
+Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
draw a square of width and height Paint_Stroke_Width.
Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
@@ -3249,7 +3255,7 @@ Draw point p using Clip, Matrix and Paint paint.
The shape of point drawn depends on paint Paint_Stroke_Cap.
If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
-Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
+Paint_Stroke_Width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
draw a square of width and height Paint_Stroke_Width.
Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
@@ -3339,7 +3345,7 @@ Paint_Style is ignored, as if were set to SkPaint::kStroke_Style.
#Line # draws Rect using Clip, Matrix, and Paint ##
Draw Rect rect using Clip, Matrix, and Paint paint.
-In paint: Paint_Style determines if rectangle is stroked or filled;
+In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
@@ -3366,17 +3372,17 @@ void draw(SkCanvas* canvas) {
}
##
-#SeeAlso drawIRect drawRRect drawRoundRect drawRegion drawPath drawLine
+#SeeAlso drawIRect drawRRect drawRoundRect drawRegion drawPath drawLine
##
# ------------------------------------------------------------------------------
-#Method void drawIRect(const SkIRect& rect, const SkPaint& paint)
+#Method void drawIRect(const SkIRect& rect, const SkPaint& paint)
#Line # draws IRect using Clip, Matrix, and Paint ##
Draw IRect rect using Clip, Matrix, and Paint paint.
-In paint: Paint_Style determines if rectangle is stroked or filled;
+In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
@@ -3407,7 +3413,7 @@ Paint_Stroke_Join draws the corners rounded or square.
#Line # draws Region using Clip, Matrix, and Paint ##
Draw Region region using Clip, Matrix, and Paint paint.
-In paint: Paint_Style determines if rectangle is stroked or filled;
+In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
@@ -3438,7 +3444,7 @@ void draw(SkCanvas* canvas) {
#Line # draws Oval using Clip, Matrix, and Paint ##
Draw Oval oval using Clip, Matrix, and Paint.
-In paint: Paint_Style determines if Oval is stroked or filled;
+In paint: Paint_Style determines if Oval is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
#Param oval Rect bounds of Oval ##
@@ -3470,7 +3476,7 @@ void draw(SkCanvas* canvas) {
#Line # draws Round_Rect using Clip, Matrix, and Paint ##
Draw Round_Rect rrect using Clip, Matrix, and Paint paint.
-In paint: Paint_Style determines if rrect is stroked or filled;
+In paint: Paint_Style determines if rrect is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
rrect may represent a rectangle, circle, oval, uniformly rounded rectangle, or
@@ -3491,11 +3497,11 @@ void draw(SkCanvas* canvas) {
paint.setColor(SK_ColorWHITE);
canvas->drawLine(outer.fLeft + radii.fLeft, outer.fTop,
outer.fLeft + radii.fLeft, outer.fBottom, paint);
- canvas->drawLine(outer.fRight - radii.fRight, outer.fTop,
+ canvas->drawLine(outer.fRight - radii.fRight, outer.fTop,
outer.fRight - radii.fRight, outer.fBottom, paint);
- canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop,
+ canvas->drawLine(outer.fLeft, outer.fTop + radii.fTop,
outer.fRight, outer.fTop + radii.fTop, paint);
- canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom,
+ canvas->drawLine(outer.fLeft, outer.fBottom - radii.fBottom,
outer.fRight, outer.fBottom - radii.fBottom, paint);
}
##
@@ -3510,16 +3516,16 @@ void draw(SkCanvas* canvas) {
#Line # draws double Round_Rect stroked or filled ##
Draw Round_Rect outer and inner
-using Clip, Matrix, and Paint paint.
+using Clip, Matrix, and Paint paint.
outer must contain inner or the drawing is undefined.
-In paint: Paint_Style determines if Round_Rect 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.
+draw corners rounded or square.
GPU-backed platforms optimize drawing when both outer and inner are
concave and outer contains inner. These platforms may not be able to draw
-Path built with identical data as fast.
+Path built with identical data as fast.
#Param outer Round_Rect outer bounds to draw ##
#Param inner Round_Rect inner bounds to draw ##
@@ -3566,7 +3572,7 @@ void draw(SkCanvas* canvas) {
#Line # draws Circle using Clip, Matrix, and Paint ##
Draw Circle at (cx, cy) with radius using Clip, Matrix, and Paint paint.
If radius is zero or less, nothing is drawn.
-In paint: Paint_Style determines if Circle is stroked or filled;
+In paint: Paint_Style determines if Circle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
#Param cx Circle center on the x-axis ##
@@ -3594,7 +3600,7 @@ if stroked, Paint_Stroke_Width describes the line thickness.
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;
+In paint: Paint_Style determines if Circle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
#Param center Circle center ##
@@ -3690,7 +3696,7 @@ If Rect oval is empty or sweepAngle is zero, nothing is drawn.
Draw Round_Rect bounded by Rect rect, with corner radii (rx, ry) using Clip,
Matrix, and Paint paint.
-In paint: Paint_Style determines if Round_Rect is stroked or filled;
+In paint: Paint_Style determines if Round_Rect is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness.
If rx or ry are less than zero, they are treated as if they are zero.
If rx plus ry exceeds rect width or rect height, radii are scaled down to fit.
@@ -3751,7 +3757,7 @@ corners are drawn.
#Description
Top rows draw stroked path with combinations of joins and caps. The open contour
is affected by caps; the closed contour is affected by joins.
- Bottom row draws fill the same for open and closed contour.
+ Bottom row draws fill the same for open and closed contour.
First bottom column shows winding fills overlap.
Second bottom column shows even odd fills exclude overlap.
Third bottom column shows inverse winding fills area outside both contours.
@@ -3777,8 +3783,8 @@ void draw(SkCanvas* canvas) {
canvas->translate(-240, 60);
}
paint.setStyle(SkPaint::kFill_Style);
- for (auto fill : { SkPath::kWinding_FillType,
- SkPath::kEvenOdd_FillType,
+ for (auto fill : { SkPath::kWinding_FillType,
+ SkPath::kEvenOdd_FillType,
SkPath::kInverseWinding_FillType } ) {
path.setFillType(fill);
canvas->save();
@@ -3813,7 +3819,7 @@ and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
If paint contains Mask_Filter, generate mask from image bounds. If generated
mask extends beyond image bounds, replicate image edge colors, just as Shader
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
-image edge color when it samples outside of its bounds.
+image edge color when it samples outside of its bounds.
#Param image uncompressed rectangular map of pixels ##
#Param left left side of image ##
@@ -3843,7 +3849,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top,
- const SkPaint* paint = nullptr)
+ const SkPaint* paint = nullptr)
#In Draw_Image
Draw Image image, with its top-left corner at (left, top),
@@ -3854,7 +3860,7 @@ Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
If paint contains Mask_Filter, generate mask from image bounds. If generated
mask extends beyond image bounds, replicate image edge colors, just as Shader
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
-image edge color when it samples outside of its bounds.
+image edge color when it samples outside of its bounds.
#Param image uncompressed rectangular map of pixels ##
#Param left left side of image ##
@@ -3887,8 +3893,8 @@ void draw(SkCanvas* canvas) {
#Code
enum SrcRectConstraint {
- kStrict_SrcRectConstraint,
- kFast_SrcRectConstraint,
+ kStrict_SrcRectConstraint,
+ kFast_SrcRectConstraint,
};
##
@@ -3897,7 +3903,7 @@ provided to drawImageRect, trading off speed for precision.
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 source Rect.
+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 source Rect.
@@ -3990,13 +3996,13 @@ improve performance.
with kFast_SrcRectConstraint red bleeds on the edges.
##
void draw(SkCanvas* canvas) {
- uint32_t pixels[][4] = {
+ uint32_t pixels[][4] = {
{ 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 },
{ 0xFFFF0000, 0xFF000000, 0xFFFFFFFF, 0xFFFF0000 },
{ 0xFFFF0000, 0xFFFFFFFF, 0xFF000000, 0xFFFF0000 },
{ 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 } };
SkBitmap redBorder;
- redBorder.installPixels(SkImageInfo::MakeN32Premul(4, 4),
+ redBorder.installPixels(SkImageInfo::MakeN32Premul(4, 4),
(void*) pixels, sizeof(pixels[0]));
sk_sp<SkImage> image = SkImage::MakeFromBitmap(redBorder);
SkPaint lowPaint;
@@ -4025,7 +4031,7 @@ void draw(SkCanvas* canvas) {
Draw IRect isrc of Image image, scaled and translated to fill Rect dst.
Note that isrc is on integer pixel boundaries; dst may include fractional
boundaries. Additionally transform draw using Clip, Matrix, and optional Paint
-paint.
+paint.
If Paint paint is supplied, apply Color_Filter, Color_Alpha, Image_Filter,
Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
@@ -4052,7 +4058,7 @@ improve performance.
void draw(SkCanvas* canvas) {
// sk_sp<SkImage> image;
for (auto i : { 1, 2, 4, 8 } ) {
- canvas->drawImageRect(image.get(), SkIRect::MakeLTRB(0, 0, 100, 100),
+ canvas->drawImageRect(image.get(), SkIRect::MakeLTRB(0, 0, 100, 100),
SkRect::MakeXYWH(i * 20, i * 20, i * 20, i * 20), nullptr);
}
}
@@ -4108,7 +4114,7 @@ void draw(SkCanvas* canvas) {
#Method void drawImageRect(const sk_sp<SkImage>& image, const SkRect& src, const SkRect& dst,
const SkPaint* paint,
- SrcRectConstraint constraint = kStrict_SrcRectConstraint)
+ SrcRectConstraint constraint = kStrict_SrcRectConstraint)
#In Draw_Image
Draw Rect src of Image image, scaled and translated to fill Rect dst.
@@ -4144,7 +4150,7 @@ void draw(SkCanvas* canvas) {
uint32_t pixels[][2] = { { SK_ColorBLACK, SK_ColorWHITE },
{ SK_ColorWHITE, SK_ColorBLACK } };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
(void*) pixels, sizeof(pixels[0]));
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
SkPaint paint;
@@ -4164,7 +4170,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawImageRect(const sk_sp<SkImage>& image, const SkIRect& isrc, const SkRect& dst,
- const SkPaint* paint, SrcRectConstraint constraint = kStrict_SrcRectConstraint)
+ const SkPaint* paint, SrcRectConstraint constraint = kStrict_SrcRectConstraint)
#In Draw_Image
Draw IRect isrc of Image image, scaled and translated to fill Rect dst.
@@ -4197,7 +4203,7 @@ void draw(SkCanvas* canvas) {
uint32_t pixels[][2] = { { 0x00000000, 0x55555555},
{ 0xAAAAAAAA, 0xFFFFFFFF} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
(void*) pixels, sizeof(pixels[0]));
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
SkPaint paint;
@@ -4217,7 +4223,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst, const SkPaint* paint,
- SrcRectConstraint constraint = kStrict_SrcRectConstraint)
+ SrcRectConstraint constraint = kStrict_SrcRectConstraint)
#In Draw_Image
Draw Image image, scaled and translated to fill Rect dst,
@@ -4248,7 +4254,7 @@ void draw(SkCanvas* canvas) {
uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
{ 0xAAAA0000, 0xFFFF0000} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
(void*) pixels, sizeof(pixels[0]));
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
SkPaint paint;
@@ -4318,7 +4324,7 @@ void draw(SkCanvas* canvas) {
gray += 0x001f1f1f;
top = bottom;
}
- left = right;
+ left = right;
}
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
SkImage* imagePtr = image.get();
@@ -4336,7 +4342,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawImageNine(const sk_sp<SkImage>& image, const SkIRect& center, const SkRect& dst,
- const SkPaint* paint = nullptr)
+ const SkPaint* paint = nullptr)
#In Draw_Image
Draw Image image stretched proportionally to fit into Rect dst.
@@ -4366,7 +4372,7 @@ replicates the image 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 not scaled; 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.
@@ -4387,7 +4393,7 @@ void draw(SkCanvas* canvas) {
gray += 0x001f1f1f;
top = bottom;
}
- left = right;
+ left = right;
}
sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);
for (auto dest: { 20, 30, 40, 60, 90 } ) {
@@ -4418,7 +4424,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
-outside of its bounds.
+outside of its bounds.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
#Param left left side of bitmap ##
@@ -4439,7 +4445,7 @@ void draw(SkCanvas* canvas) {
{ 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00},
{ 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
(void*) pixels, sizeof(pixels[0]));
SkPaint paint;
canvas->scale(4, 4);
@@ -4498,7 +4504,7 @@ void draw(SkCanvas* canvas) {
{ 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
{ 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
(void*) pixels, sizeof(pixels[0]));
SkPaint paint;
paint.setMaskFilter(SkBlurMaskFilter::Make(kSolid_SkBlurStyle, 6));
@@ -4557,7 +4563,7 @@ void draw(SkCanvas* canvas) {
{ 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
{ 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
+ bitmap.installPixels(SkImageInfo::MakeA8(8, 8),
(void*) pixels, sizeof(pixels[0]));
SkPaint paint;
paint.setFilterQuality(kHigh_SkFilterQuality);
@@ -4609,7 +4615,7 @@ void draw(SkCanvas* canvas) {
uint32_t pixels[][2] = { { 0x00000000, 0x55550000},
{ 0xAAAA0000, 0xFFFF0000} };
SkBitmap bitmap;
- bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(2, 2),
(void*) pixels, sizeof(pixels[0]));
SkPaint paint;
canvas->scale(4, 4);
@@ -4661,7 +4667,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 not scaled; 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.
@@ -4682,7 +4688,7 @@ void draw(SkCanvas* canvas) {
gray += 0x001f1f1f;
top = bottom;
}
- left = right;
+ left = right;
}
for (auto dest: { 20, 30, 40, 60, 90 } ) {
canvas->drawBitmapNine(bitmap, center, SkRect::MakeWH(dest, 110 - dest), nullptr);
@@ -4840,7 +4846,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 not scaled; 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.
@@ -4861,7 +4867,7 @@ void draw(SkCanvas* canvas) {
gray += 0x001f1f1f;
top = bottom;
}
- left = right;
+ left = right;
}
const int xDivs[] = { center.fLeft, center.fRight };
const int yDivs[] = { center.fTop, center.fBottom };
@@ -4939,12 +4945,12 @@ void draw(SkCanvas* canvas) {
gray += 0x001f1f1f;
top = bottom;
}
- left = right;
+ left = right;
}
const int xDivs[] = { center.fLeft, center.fRight };
const int yDivs[] = { center.fTop, center.fBottom };
SkCanvas::Lattice::RectType fillTypes[3][3];
- memset(fillTypes, 0, sizeof(fillTypes));
+ memset(fillTypes, 0, sizeof(fillTypes));
fillTypes[1][1] = SkCanvas::Lattice::kTransparent;
SkColor dummy[9]; // temporary pending bug fix
SkCanvas::Lattice lattice = { xDivs, yDivs, fillTypes[0], SK_ARRAY_COUNT(xDivs),
@@ -4977,7 +4983,7 @@ UTF-8.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
text draws left to right, positioning the first glyph left side bearing at x
-and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -4993,7 +4999,7 @@ filled 12 point black Glyphs.
#Height 200
#Description
The same text is drawn varying Paint_Text_Size and varying
- Matrix.
+ Matrix.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -5013,7 +5019,7 @@ void draw(SkCanvas* canvas) {
canvas->translate(100, 0);
canvas->scale(scale, scale);
canvas->drawText("Aa", 2, 10 / scale, yPos / scale, paint);
- yPos += size * 2;
+ yPos += size * 2;
}
}
##
@@ -5034,7 +5040,7 @@ results, since zero bytes may be embedded in the string.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
string draws left to right, positioning the first glyph left side bearing at x
-and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5067,7 +5073,7 @@ results, since zero bytes may be embedded in the string.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
string draws left to right, positioning the first glyph left side bearing at x
-and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
+and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5104,7 +5110,7 @@ text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
by default each glyph left side bearing is positioned at x and its
baseline is positioned at y. Text size is affected by Matrix and
-Paint_Text_Size.
+Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5148,7 +5154,7 @@ text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. xpos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
by default each glyph 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.
+Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5194,7 +5200,7 @@ than the path length, the excess text is clipped.
text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
default text positions the first glyph left side bearing at origin x and its
-baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
+baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5208,7 +5214,7 @@ filled 12 point black Glyphs.
#Param paint text size, blend, color, and so on, used to draw ##
#Example
- void draw(SkCanvas* canvas) {
+ void draw(SkCanvas* canvas) {
const char aero[] = "correo a" "\xC3" "\xA9" "reo";
const size_t len = sizeof(aero) - 1;
SkPath path;
@@ -5243,7 +5249,7 @@ than the path length, the excess text is clipped.
text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
default text positions the first glyph left side bearing at origin x and its
-baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
+baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Mask_Filter, Shader,
Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
@@ -5258,7 +5264,7 @@ filled 12 point black Glyphs.
#Param paint text size, blend, color, and so on, used to draw ##
#Example
- void draw(SkCanvas* canvas) {
+ void draw(SkCanvas* canvas) {
const char roller[] = "rollercoaster";
const size_t len = sizeof(roller) - 1;
SkPath path;
@@ -5290,7 +5296,7 @@ filled 12 point black Glyphs.
Draw text, transforming each glyph by the corresponding SkRSXform,
using Clip, Matrix, and Paint paint.
-RSXform array specifies a separate square scale, rotation, and translation for
+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
@@ -5307,7 +5313,7 @@ filled 12 point black Glyphs.
#Param paint text size, blend, color, and so on, used to draw ##
#Example
-void draw(SkCanvas* canvas) {
+void draw(SkCanvas* canvas) {
const int iterations = 26;
SkRSXform transforms[iterations];
char alphabet[iterations];
@@ -5370,7 +5376,7 @@ Image_Filter, and Draw_Looper; apply to blob.
int glyphIndex = 0;
for (auto runLen : runs) {
paint.setTextSize(1 == runLen ? 20 : 50);
- const SkTextBlobBuilder::RunBuffer& run =
+ const SkTextBlobBuilder::RunBuffer& run =
textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);
memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);
textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
@@ -5388,7 +5394,7 @@ Image_Filter, and Draw_Looper; apply to blob.
# ------------------------------------------------------------------------------
-#Method void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, const SkPaint& paint)
+#Method void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, const SkPaint& paint)
Draw Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
@@ -5400,7 +5406,7 @@ Subpixel_Text, and Paint_Vertical_Text.
Paint_Text_Encoding must be set to SkPaint::kGlyphID_TextEncoding.
-Elements of paint: Path_Effect, Mask_Filter, Shader, Color_Filter,
+Elements of paint: Path_Effect, 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 ##
@@ -5420,7 +5426,7 @@ Paint attributes related to text, like text size, have no effect on paint passed
paint.setTextSize(50);
paint.setColor(SK_ColorRED);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- const SkTextBlobBuilder::RunBuffer& run =
+ const SkTextBlobBuilder::RunBuffer& run =
textBlobBuilder.allocRun(paint, 1, 20, 100);
run.glyphs[0] = 20;
sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
@@ -5436,7 +5442,7 @@ Paint attributes related to text, like text size, have no effect on paint passed
# ------------------------------------------------------------------------------
-#Method void drawPicture(const SkPicture* picture)
+#Method void drawPicture(const SkPicture* picture)
#Line # draws Picture using Clip and Matrix ##
Draw Picture picture, using Clip and Matrix.
@@ -5448,7 +5454,7 @@ Picture records a series of draw commands for later playback.
#Param picture recorded drawing commands to play ##
#Example
-void draw(SkCanvas* canvas) {
+void draw(SkCanvas* canvas) {
SkPictureRecorder recorder;
SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
@@ -5473,7 +5479,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
-#Method void drawPicture(const sk_sp<SkPicture>& picture)
+#Method void drawPicture(const sk_sp<SkPicture>& picture)
Draw Picture picture, using Clip and Matrix.
Clip and Matrix are unchanged by picture contents, as if
@@ -5484,7 +5490,7 @@ Picture records a series of draw commands for later playback.
#Param picture recorded drawing commands to play ##
#Example
-void draw(SkCanvas* canvas) {
+void draw(SkCanvas* canvas) {
SkPictureRecorder recorder;
SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
for (auto color : { SK_ColorRED, SK_ColorBLUE, 0xff007f00 } ) {
@@ -5522,7 +5528,7 @@ paint use is equivalent to: saveLayer, drawPicture, restore().
#Param paint Paint to apply transparency, filtering, and so on; may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
+void draw(SkCanvas* canvas) {
SkPaint paint;
SkPictureRecorder recorder;
SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
@@ -5550,7 +5556,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
-#Method void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint)
+#Method void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint)
Draw Picture picture, using Clip and Matrix; transforming picture with
Matrix matrix, if provided; and use Paint paint Color_Alpha, Color_Filter,
@@ -5564,7 +5570,7 @@ paint use is equivalent to: saveLayer, drawPicture, restore().
#Param paint Paint to apply transparency, filtering, and so on; may be nullptr ##
#Example
-void draw(SkCanvas* canvas) {
+void draw(SkCanvas* canvas) {
SkPaint paint;
SkPictureRecorder recorder;
SkCanvas* recordingCanvas = recorder.beginRecording(50, 50);
@@ -5653,7 +5659,7 @@ void draw(SkCanvas* canvas) {
const SkPoint texCoords[4], SkBlendMode mode, const SkPaint& paint)
#Line # draws Coons_Patch ##
-Draws a 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.
Coons_Patch uses Clip and Matrix, paint Shader, Color_Filter,
@@ -5661,7 +5667,7 @@ Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
as 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,
+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.
@@ -5674,7 +5680,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 texture coordinates, mapping Shader to corners;
- may be nullptr
+ may be nullptr
#Param ##
#Param mode Blend_Mode for colors, and for Shader if paint has one ##
#Param paint Shader, Color_Filter, Blend_Mode, used to draw ##
@@ -5710,9 +5716,9 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
- const SkPoint texCoords[4], const SkPaint& paint)
+ const SkPoint texCoords[4], const SkPaint& paint)
-Draws 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.
Coons_Patch uses Clip and Matrix, paint Shader, Color_Filter,
@@ -5720,7 +5726,7 @@ Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
as 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,
+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.
@@ -5733,7 +5739,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 texture coordinates, mapping Shader to corners;
- may be nullptr
+ may be nullptr
#Param ##
#Param paint Shader, Color_Filter, Blend_Mode, used to draw ##
@@ -5803,7 +5809,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.
+Optional cullRect is a conservative bounds of all transformed sprites.
If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
@@ -5835,7 +5841,7 @@ void draw(SkCanvas* canvas) {
#Method void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[], const SkRect tex[],
const SkColor colors[], int count, SkBlendMode mode, const SkRect* cullRect,
- const SkPaint* paint)
+ const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
@@ -5844,7 +5850,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.
+Optional cullRect is a conservative bounds of all transformed sprites.
If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
@@ -5878,7 +5884,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[], int count,
- const SkRect* cullRect, const SkPaint* paint)
+ const SkRect* cullRect, const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
@@ -5886,7 +5892,7 @@ to draw, if present. For each entry in the array, Rect tex locates sprite in
atlas, and RSXform xform transforms it into destination space.
xform and text must contain count entries.
-Optional cullRect is a conservative bounds of all transformed sprites.
+Optional cullRect is a conservative bounds of all transformed sprites.
If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
@@ -5914,7 +5920,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[], const SkRect tex[],
- int count, const SkRect* cullRect, const SkPaint* paint)
+ int count, const SkRect* cullRect, const SkPaint* paint)
Draw a set of sprites from atlas, using Clip, Matrix, and optional Paint paint.
paint uses Anti-alias, Color_Alpha, Color_Filter, Image_Filter, and Blend_Mode
@@ -5922,7 +5928,7 @@ to draw, if present. For each entry in the array, Rect tex locates sprite in
atlas, and RSXform xform transforms it into destination space.
xform and text must contain count entries.
-Optional cullRect is a conservative bounds of all transformed sprites.
+Optional cullRect is a conservative bounds of all transformed sprites.
If cullRect is outside of Clip, canvas can skip drawing.
#Param atlas Image containing sprites ##
@@ -5951,10 +5957,10 @@ void draw(SkCanvas* canvas) {
#Method void drawDrawable(SkDrawable* drawable, const SkMatrix* matrix = nullptr)
#Line # draws Drawable, encapsulated drawing commands ##
-Draw Drawable drawable using Clip and Matrix, concatenated with
+Draw Drawable drawable using Clip and Matrix, concatenated with
optional matrix.
-If Canvas has an asynchronous implementation, as is the case
+If Canvas has an asynchronous implementation, as is the case
when it is recording into Picture, then drawable will be referenced,
so that SkDrawable::draw() can be called when the operation is finalized. To force
immediate drawing, call SkDrawable::draw() instead.
@@ -5999,7 +6005,7 @@ void draw(SkCanvas* canvas) {
Draw Drawable drawable using Clip and Matrix, offset by (x, y).
-If Canvas has an asynchronous implementation, as is the case
+If Canvas has an asynchronous implementation, as is the case
when it is recording into Picture, then drawable will be referenced,
so that SkDrawable::draw() can be called when the operation is finalized. To force
immediate drawing, call SkDrawable::draw() instead.
@@ -6045,7 +6051,7 @@ void draw(SkCanvas* canvas) {
Associate Rect on Canvas when an annotation; a key-value pair, where the key is
a null-terminated utf8 string, and optional value is stored as Data.
-Only some canvas implementations, such as recording to Picture, or drawing to
+Only some canvas implementations, such as recording to Picture, or drawing to
Document_PDF, use annotations.
#Param rect Rect extent of canvas to annotate ##
@@ -6070,12 +6076,12 @@ Document_PDF, use annotations.
# ------------------------------------------------------------------------------
-#Method void drawAnnotation(const SkRect& rect, const char key[], const sk_sp<SkData>& value)
+#Method void drawAnnotation(const SkRect& rect, const char key[], const sk_sp<SkData>& value)
Associate Rect on Canvas when an annotation; a key-value pair, where the key is
a null-terminated utf8 string, and optional value is stored as Data.
-Only some canvas implementations, such as recording to Picture, or drawing to
+Only some canvas implementations, such as recording to Picture, or drawing to
Document_PDF, use annotations.
#Param rect Rect extent of canvas to annotate ##