From 224c700a1fb0b7f6abd85a9729d29cbbdf5872dd Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 27 Jun 2018 11:00:21 -0400 Subject: sync docs up with tip of tree Also check in work in progress for blend modes, round rects, and a placeholder for pictures. One minor include change to add a parameter name for SkBlendMode function. TBR=reed@google.com R=caryclark@google.com Docs-Preview: https://skia.org/?cl=134200 Bug: skia:6898 Change-Id: I5d2a9221d61edb32d9c7edbb3193401605b2b513 Reviewed-on: https://skia-review.googlesource.com/134200 Reviewed-by: Cary Clark Reviewed-by: Cary Clark Commit-Queue: Cary Clark Auto-Submit: Cary Clark --- site/user/api/SkCanvas_Reference.md | 367 +++++++++++++++++------------------- 1 file changed, 176 insertions(+), 191 deletions(-) (limited to 'site/user/api/SkCanvas_Reference.md') diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md index 5c391e0245..3239e20199 100644 --- a/site/user/api/SkCanvas_Reference.md +++ b/site/user/api/SkCanvas_Reference.md @@ -18,7 +18,7 @@ Request Canvas from 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. +To draw to a document, obtain Canvas from SVG Canvas, Document PDF, or Picture Recorder. Document based Canvas and other Canvas Subclasses reference Device describing the destination. @@ -114,7 +114,6 @@ SkCanvas global, struct, and class related member func - ## Constant @@ -123,33 +122,33 @@ SkCanvas related constants are defined by enum, enum classTopic Description + ColorBehavior::kLegacy + placeholder + + ColorBehavior exists for Android framework only - + PointMode sets drawPoints options - + SaveLayerFlagsSet sets SaveLayerRec options - + SrcRectConstraint sets drawImageRect options - + kFast SrcRectConstraint sample outside bounds; faster - + kInitWithPrevious SaveLayerFlag initializes with previous contents - - ColorBehavior::kLegacy - placeholder - kLines PointMode draw each pair of points as a line segment @@ -172,7 +171,6 @@ SkCanvas related constants are defined by enum, enum class - ## Struct @@ -190,7 +188,6 @@ SkCanvas uses C++ structs to declare the public data structures and interfaces. - ## Typedef @@ -204,7 +201,6 @@ SkCanvas typedef define a data type. - ## Constructor Create the desired type of Surface to obtain its Canvas when possible. Useful @@ -253,7 +249,6 @@ SkCanvas can be constructed or initialized by these functions, including C++ cla - ## Member Function @@ -291,7 +286,7 @@ SkCanvas member functions read and modify the structure properties. clipRRect - combines Clip with Round Rect + combines Clip with Round Rect clipRect @@ -343,11 +338,11 @@ SkCanvas member functions read and modify the structure properties. drawColor - fills Clip with Color and Blend Mode + fills Clip with Color and Blend Mode drawDRRect - draws double Round Rect stroked or filled + draws double Round Rect stroked or filled drawDrawable @@ -395,7 +390,7 @@ SkCanvas member functions read and modify the structure properties. drawPicture - draws Picture using Clip and Matrix + draws Picture using Clip and Matrix drawPoint @@ -415,7 +410,7 @@ SkCanvas member functions read and modify the structure properties. drawRRect - draws Round Rect using Clip, Matrix, and Paint + draws Round Rect using Clip, Matrix, and Paint drawRect @@ -427,7 +422,7 @@ SkCanvas member functions read and modify the structure properties. drawRoundRect - draws Round Rect using Clip, Matrix, and Paint + draws Round Rect using Clip, Matrix, and Paint drawString @@ -575,7 +570,6 @@ SkCanvas member functions read and modify the structure properties. - ## MakeRasterDirect @@ -873,8 +867,6 @@ storage of Raster Surface ## Enum SkCanvas::ColorBehavior -Android framework only. -
     enum class ColorBehavior {
         kLegacy,
@@ -1039,7 +1031,6 @@ transparent letters.
   
 
 
-
 
 ## getMetaData
 
@@ -1171,7 +1162,6 @@ isRGB:1
   
 
 
-
 
 ## flush
 
@@ -1421,7 +1411,6 @@ context = skia
   
 
 
-
 
 ## peekPixels
 
@@ -2058,7 +2047,7 @@ is restored, the Bitmap is drawn into th
 
 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.
+Color Alpha, Color Filter, Image Filter, and Blend Mode.
 
 
 ## saveLayer
@@ -2080,7 +2069,7 @@ and draws the Bitmap.
 a specific rectangle, use clipRect.
 
 Optional Paint paint applies Color Alpha, Color Filter, Image Filter, and
-Blend Mode when restore is called.
+Blend Mode when restore is called.
 
 Call restoreToCount with returned value to restore this and subsequent saves.
 
@@ -2129,7 +2118,7 @@ and draws the Bitmap.
 a specific rectangle, use clipRect.
 
 Optional Paint paint applies Color Alpha, Color Filter, Image Filter, and
-Blend Mode when restore is called.
+Blend Mode when restore is called.
 
 Call restoreToCount with returned value to restore this and subsequent saves.
 
@@ -2182,7 +2171,7 @@ and draws Layer.
 a specific rectangle, use clipRect.
 
 Optional Paint paint applies Color Alpha, Color Filter, Image Filter, and
-Blend Mode when restore is called.
+Blend Mode when restore is called.
 
 Call restoreToCount with returned value to restore this and subsequent saves.
 
@@ -2334,8 +2323,8 @@ scalePaint blends Layer back with transparency.
 # Struct SkCanvas::SaveLayerRec
 
 
-    struct SaveLayerRec {
-        SaveLayerRec*(...
+    struct SaveLayerRec {
+        SaveLayerRec*(...
 
         const SkRect*           fBounds;
         const SkPaint*          fPaint;
@@ -2344,7 +2333,7 @@ scalePaint blends Layer back with transparency.
     };
 
-SaveLayerRec contains the state used to create the Layer. +SaveLayerRec contains the state used to create the Layer. ## Layer SaveLayerRec Overview @@ -2370,7 +2359,6 @@ scalePaint blends Layer back with transparency. Description - ### Members @@ -2391,7 +2379,7 @@ a specific rectangle, use clipRect. @@ -2447,19 +2435,18 @@ transferred to the main canvas.
fPaint fPaint modifies how Layer overlays the prior Layer; may be nullptr. -Color Alpha, Blend Mode, Color Filter, Draw Looper, Image Filter, and +Color Alpha, Blend Mode, Color Filter, Draw Looper, Image Filter, and Mask Filter affect Layer draw.
Description
- - + ## SaveLayerRec
-SaveLayerRec()
+SaveLayerRec()
 
Sets fBounds, fPaint, and fBackdrop to nullptr. Clears fSaveLayerFlags. ### Return Value -empty SaveLayerRec +empty SaveLayerRec ### Example @@ -2479,30 +2466,31 @@ rec1 == rec2 --- - + +## SaveLayerRec
-SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
+SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
 
Sets fBounds, fPaint, and fSaveLayerFlags; sets fBackdrop to nullptr. ### Parameters - +
bounds
- + - - + +
bounds Layer dimensions; may be nullptr
paint
paint applied to Layer when overlaying prior Layer; may be nullptr
saveLayerFlagsSaveLayerRec options to modify Layer
saveLayerFlagsSaveLayerRec options to modify Layer
### Return Value -SaveLayerRec with empty backdrop +SaveLayerRec with empty backdrop ### Example @@ -2522,10 +2510,11 @@ rec1 == rec2 --- - + +## SaveLayerRec
-SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
+SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
              SaveLayerFlags saveLayerFlags)
 
@@ -2533,24 +2522,24 @@ Sets fBounds, bounds + - + - + - - + +
bounds Layer dimensions; may be nullptr
paint
paint applied to Layer when overlaying prior Layer; may be nullptr
backdrop
backdrop prior Layer copied with Image Filter; may be nullptr
saveLayerFlagsSaveLayerRec options to modify Layer
saveLayerFlagsSaveLayerRec options to modify Layer
### Return Value -SaveLayerRec fully specified +SaveLayerRec fully specified ### Example @@ -2570,49 +2559,50 @@ rec1 == rec2 --- - + +## SaveLayerRec
-SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
+SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
              const SkImage* clipMask, const SkMatrix* clipMatrix, SaveLayerFlags saveLayerFlags)
 
Experimental. not readySets fBounds, fPaint, fBackdrop, fClipMask, fClipMatrix, and fSaveLayerFlags. -clipMatrix uses Color Alpha channel of image, transformed by clipMatrix, to clip +clipMatrix uses Color Alpha channel of image, transformed by clipMatrix, to clip Layer when drawn to Canvas. Implementation is not complete; has no effect if Device is GPU-backed. ### Parameters - +
bounds
- + - + - + - - + - - + +
bounds Layer dimensions; may be nullptr
paint
paint graphics state applied to Layer when overlaying prior Layer; may be nullptr
backdrop
backdrop prior Layer copied with Image Filter; may be nullptr
clipMask
clipMask clip applied to Layer; may be nullptr
clipMatrixmatrix applied to clipMask; may be nullptr to use +
clipMatrixmatrix applied to clipMask; may be nullptr to use identity matrix
saveLayerFlagsSaveLayerRec options to modify Layer
saveLayerFlagsSaveLayerRec options to modify Layer
### Return Value -SaveLayerRec fully specified +SaveLayerRec fully specified ### See Also @@ -2654,7 +2644,7 @@ depth of save state stack ### Example
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. +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.
@@ -2989,7 +2979,7 @@ If clipping Path has Anti Aliased clip looks smoother but draws slower. -Clip can combine with Rect and Round Rect primitives; like +Clip can combine with Rect and Round Rect primitives; like Path, these are transformed by Matrix before they are combined with Clip. Clip can combine with Region. Region is assumed to be in Device coordinates @@ -3115,8 +3105,6 @@ The clip restriction is not recorded in pictures. Pass an empty rect to disable maximum clip. -This private API is for use by Android framework only. - ### Parameters @@ -3130,7 +3118,7 @@ This private API is for use by Android framework only. ## clipRRect
-void clipRRect(const SkRRect& rrect, SkClipOp op, bool doAntiAlias)
+void clipRRect(const SkRRect& rrect, SkClipOp op, bool doAntiAlias)
 
Replace Clip with the intersection or difference of Clip and rrect, @@ -3141,7 +3129,7 @@ before it is combined with Clip. ### Parameters
rect
- + @@ -3164,7 +3152,7 @@ before it is combined with Clip.
-void clipRRect(const SkRRect& rrect, SkClipOp op)
+void clipRRect(const SkRRect& rrect, SkClipOp op)
 
Replace Clip with the intersection or difference of Clip and rrect. @@ -3174,7 +3162,7 @@ Resulting Clip is Aliased; ### Parameters
rrectRound Rect to combine with ClipRound Rect to combine with Clip
op Clip Op to apply to Clip
- + @@ -3194,7 +3182,7 @@ Resulting Clip is Aliased;
-void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
+void clipRRect(const SkRRect& rrect, bool doAntiAlias = false)
 
Replace Clip with the intersection of Clip and rrect, @@ -3204,7 +3192,7 @@ with an Aliased or rrect - + @@ -3689,11 +3677,11 @@ device bounds empty = true - + - + @@ -3749,7 +3737,7 @@ device bounds empty = true - + @@ -3785,7 +3773,7 @@ device bounds empty = true - + @@ -3797,7 +3785,7 @@ device bounds empty = true - + @@ -3813,12 +3801,11 @@ device bounds empty = true
rrectRound Rect to combine with ClipRound Rect to combine with Clip
op Clip Op to apply to Clip Round Rect to combine with ClipRound Rect to combine with Clip
doAntiAlias true if Clip is to be Anti Aliased
drawColorfills Clip with Color and Blend Modefills Clip with Color and Blend Mode
drawDRRectdraws double Round Rect stroked or filleddraws double Round Rect stroked or filled
drawDrawable
drawPicturedraws Picture using Clip and Matrixdraws Picture using Clip and Matrix
drawRRectdraws Round Rect using Clip, Matrix, and Paintdraws Round Rect using Clip, Matrix, and Paint
drawRect
drawRoundRectdraws Round Rect using Clip, Matrix, and Paintdraws Round Rect using Clip, Matrix, and Paint
drawVertices
- ## drawColor
-void drawColor(SkColor color, SkBlendMode mode = SkBlendMode::kSrcOver)
+void drawColor(SkColor color, SkBlendMode mode = SkBlendMode::kSrcOver)
 
Fill Clip with Color color. @@ -3830,7 +3817,7 @@ Fill Clip with Color < Unpremultiplied ARGB mode - SkBlendMode used to combine source color and destination + SkBlendMode used to combine source color and destination @@ -3851,7 +3838,7 @@ Fill Clip with Color < void clear(SkColor 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. ### Parameters @@ -3879,7 +3866,7 @@ void discard() Make Canvas contents undefined. Subsequent calls that read Canvas pixels, -such as drawing with SkBlendMode, return undefined results. discard does +such as drawing with SkBlendMode, return undefined results. discard does not change Clip or Matrix. discard may do nothing, depending on the implementation of Surface or Device @@ -3904,7 +3891,7 @@ void drawPaint(const Clip with Paint paint. Paint components Mask Filter, Shader, -Color Filter, Image Filter, and Blend Mode affect drawing; +Color Filter, Image Filter, and Blend Mode affect drawing; Path Effect in paint is ignored. ### Parameters @@ -4331,10 +4318,10 @@ if stroked, Paint Stroke Width desc ## drawRRect
-void drawRRect(const SkRRect& rrect, const SkPaint& paint)
+void drawRRect(const SkRRect& rrect, const SkPaint& paint)
 
-Draw Round Rect rrect using Clip, Matrix, and Paint paint. +Draw Round Rect rrect using Clip, Matrix, and Paint paint. In paint: Paint Style determines if rrect is stroked or filled; if stroked, Paint Stroke Width describes the line thickness. @@ -4344,7 +4331,7 @@ may have any combination of positive non-square radii for the four corners. ### Parameters - + @@ -4365,15 +4352,15 @@ may have any combination of positive non-square radii for the four corners. ## drawDRRect
-void drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint)
+void drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint)
 
-DrawRound Rectouter and inner +DrawRound Rectouter and inner using Clip, Matrix, and Paintpaint. 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 +If stroked and Round Rect corner has zero length radii, Paint Stroke Join can draw corners rounded or square. GPU-backed platforms optimize drawing when both outer and inner are @@ -4383,10 +4370,10 @@ concave and outer contains outer - + - + @@ -4400,8 +4387,8 @@ concave and outer contains Rect has no corner radii, but stroke join is rounded. -Inner Round Rect has corner radii; outset stroke increases radii of corners. -Stroke join does not affect innerRound Rect since it has no sharp corners. +Inner Round Rect has corner radii; outset stroke increases radii of corners. +Stroke join does not affect innerRound Rect since it has no sharp corners. ### See Also @@ -4544,20 +4531,20 @@ If Rectova void drawRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, const SkPaint& paint) -DrawRound Rect bounded by Rectrect, with corner radii (rx, ry) using Clip, +DrawRound Rect bounded by Rectrect, with corner radii (rx, ry) using Clip, Matrix, and Paintpaint. -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. -If rx and ry are zero, Round Rect is drawn as Rect and if stroked is affected by +If rx and ry are zero, Round Rect is drawn as Rect and if stroked is affected by Paint Stroke Join. ### Parameters
rrectRound Rect with up to eight corner radii to drawRound Rect with up to eight corner radii to draw
paint Paint stroke or fill, blend, color, and so on, used to draw Round Rect outer bounds to drawRound Rect outer bounds to draw
innerRound Rect inner bounds to drawRound Rect inner bounds to draw
paint Paint stroke or fill, blend, color, and so on, used to draw
- + @@ -4594,7 +4581,7 @@ void drawPath(const DrawPathpath using Clip, Matrix, and Paintpaint. Path contains an array of Path Contour, each of which may be open or closed. -In paint: Paint Style determines if Round Rect is stroked or filled: +In paint: Paint Style determines if Round Rect is stroked or filled: if filled, Path Fill Type determines whether Path Contour describes inside or outside of fill; if stroked, Paint Stroke Width describes the line thickness, Paint Stroke Cap describes line ends, and Paint Stroke Join describes how @@ -4641,7 +4628,7 @@ void drawImage(const DrawImageimage, with its top-left corner at (left, top), using Clip, Matrix, and optional Paintpaint. -If paint is supplied, apply Color Filter, Color Alpha, Image Filter, Blend Mode, +If paint is supplied, apply Color Filter, Color Alpha, Image Filter, Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from image bounds. If generated mask extends beyond image bounds, replicate image edge colors, just as Shader @@ -4660,7 +4647,7 @@ made from SkImage::makeShader -
rectRect bounds of Round Rect to drawRect bounds of Round Rect to draw
rx axis length on x-axis of oval describing rounded corners top side of image
paintPaint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr
@@ -4686,7 +4673,7 @@ void drawImage(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +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 @@ -4704,7 +4691,7 @@ made from SkImage::makeShader pop side of image paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -4787,7 +4774,7 @@ void drawImageRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +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 @@ -4810,7 +4797,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -4846,7 +4833,7 @@ boundaries. Additionally transform draw using Clip, 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. +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 @@ -4869,7 +4856,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -4898,7 +4885,7 @@ void drawImageRect(const 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. +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 @@ -4918,7 +4905,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -4947,7 +4934,7 @@ void drawImageRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +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 @@ -4970,7 +4957,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5002,7 +4989,7 @@ void drawImageRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +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 @@ -5025,7 +5012,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5054,7 +5041,7 @@ void drawImageRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +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 @@ -5074,7 +5061,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5107,7 +5094,7 @@ are larger than dst; Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from image bounds. If paint Filter Quality set to kNone_SkFilterQuality, disable pixel filtering. For all other values of paint Filter Quality, use kLow_SkFilterQuality to filter pixels. @@ -5128,7 +5115,7 @@ replicates the image edge color when destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -5161,7 +5148,7 @@ are larger than dst; Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from image bounds. If paint Filter Quality set to kNone_SkFilterQuality, disable pixel filtering. For all other values of paint Filter Quality, use kLow_SkFilterQuality to filter pixels. @@ -5182,7 +5169,7 @@ replicates the image edge color wh destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -5214,7 +5201,7 @@ void drawBitmap(const Clip, Matrix, and optional Paint paint. If Paint paint is not nullptr, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from bitmap bounds. If generated mask extends beyond bitmap bounds, replicate bitmap edge colors, @@ -5234,7 +5221,7 @@ outside of its bounds. top side of bitmap paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -5261,7 +5248,7 @@ void drawBitmapRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from bitmap bounds. If generated mask extends beyond bitmap bounds, replicate bitmap edge colors, @@ -5285,7 +5272,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5315,7 +5302,7 @@ void drawBitmapRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from bitmap bounds. If generated mask extends beyond bitmap bounds, replicate bitmap edge colors, @@ -5339,7 +5326,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5369,7 +5356,7 @@ void drawBitmapRect(const Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from bitmap bounds. If generated mask extends beyond bitmap bounds, replicate bitmap edge colors, @@ -5390,7 +5377,7 @@ improve performance. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr constraint @@ -5424,7 +5411,7 @@ space, if any. Additionally transform draw using Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from bitmap bounds. If paint Filter Quality set to kNone_SkFilterQuality, disable pixel filtering. For all other values of paint Filter Quality, use kLow_SkFilterQuality to filter pixels. @@ -5446,7 +5433,7 @@ outside of its bounds. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -5517,7 +5504,6 @@ remaining space, if any. Description - ## Enum SkCanvas::Lattice::RectType
@@ -5565,7 +5551,6 @@ draws one of fColors into lattice rectangle
 Description
 
 
-
 ### Members
 
 
@@ -5664,7 +5649,7 @@ dimension. All other grid elements scale to fill the available space, if any.
 
 Additionally transform draw using Clip, Matrix, and optional Paintpaint.
 If Paintpaint is supplied, apply Color Filter, Color Alpha, Image Filter,
-Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
+Blend Mode, and Draw Looper. If bitmap is kAlpha_8_SkColorType, apply Shader.
 If paint contains Mask Filter, generate mask from bitmap bounds. If paintFilter Quality set to kNone_SkFilterQuality, disable pixel filtering. For all
 other values of paintFilter Quality, use kLow_SkFilterQuality to filter pixels.
@@ -5686,7 +5671,7 @@ outside of its bounds.
     
-    
destination Rect of image to draw to
paintPaint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr
@@ -5725,7 +5710,7 @@ dimension. All other grid elements scale to fill the available space, if any. Additionally transform draw using Clip, Matrix, and optional Paint paint. If Paint paint is supplied, apply Color Filter, Color Alpha, Image Filter, -Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. +Blend Mode, and Draw Looper. If image is kAlpha_8_SkColorType, apply Shader. If paint contains Mask Filter, generate mask from image bounds. If paint Filter Quality set to kNone_SkFilterQuality, disable pixel filtering. For all other values of paint Filter Quality, use kLow_SkFilterQuality to filter pixels. @@ -5747,7 +5732,7 @@ outside of its bounds. destination Rect of image to draw to paint - Paint containing Blend Mode, Color Filter, Image Filter, + Paint containing Blend Mode, Color Filter, Image Filter, and so on; or nullptr @@ -5822,7 +5807,6 @@ are scaled if needed to take up the remaining space; the center is transparent. - ## drawText @@ -6337,14 +6321,14 @@ Elements of paint: drawPicture(const SkPicture* picture) +void drawPicture(const SkPicture* picture)
-Draw Picture picture, using Clip and Matrix. +Draw Picture picture, using Clip and Matrix. Clip and Matrix are unchanged by picture contents, as if save was called before and restore was called after drawPicture. -Picture records a series of draw commands for later playback. +Picture records a series of draw commands for later playback. ### Parameters @@ -6359,21 +6343,21 @@ void drawPicture(const drawDrawable[2] SkPicture SkPicture::playback +drawDrawable[2] SkPicture SkPicture::playback ---
-void drawPicture(const sk sp<SkPicture>& picture)
+void drawPicture(const sk sp<SkPicture>& picture)
 
-Draw Picture picture, using Clip and Matrix. +Draw Picture picture, using Clip and Matrix. Clip and Matrix are unchanged by picture contents, as if save was called before and restore was called after drawPicture. -Picture records a series of draw commands for later playback. +Picture records a series of draw commands for later playback. ### Parameters @@ -6388,19 +6372,19 @@ void drawPicture(const drawDrawable[2] SkPicture SkPicture::playback +drawDrawable[2] SkPicture SkPicture::playback ---
-void drawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint)
+void drawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint)
 
-Draw Picture picture, using Clip and Matrix; transforming picture with +Draw Picture picture, using Clip and Matrix; transforming picture with Matrix matrix, if provided; and use Paint paint Color Alpha, Color Filter, -Image Filter, and Blend Mode, if provided. +Image Filter, and Blend Mode, if provided. matrix transformation is equivalent to: save, concat, drawPicture, restore. paint use is equivalent to: saveLayer, drawPicture, restore. @@ -6424,19 +6408,19 @@ void drawPicture(const drawDrawable[2] SkPicture SkPicture::playback +drawDrawable[2] SkPicture SkPicture::playback ---
-void drawPicture(const sk sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint)
+void drawPicture(const sk sp<SkPicture>& picture, const SkMatrix* matrix, const SkPaint* paint)
 
-Draw Picture picture, using Clip and Matrix; transforming picture with +Draw Picture picture, using Clip and Matrix; transforming picture with Matrix matrix, if provided; and use Paint paint Color Alpha, Color Filter, -Image Filter, and Blend Mode, if provided. +Image Filter, and Blend Mode, if provided. matrix transformation is equivalent to: save, concat, drawPicture, restore. paint use is equivalent to: saveLayer, drawPicture, restore. @@ -6460,7 +6444,7 @@ void drawPicture(const drawDrawable[2] SkPicture SkPicture::playback +drawDrawable[2] SkPicture SkPicture::playback --- @@ -6468,12 +6452,12 @@ void drawPicture(const drawVertices(const SkVertices* vertices, SkBlendMode mode, const SkPaint& paint) +void drawVertices(const SkVertices* vertices, SkBlendMode mode, const SkPaint& paint) Draw Vertices vertices, a triangle mesh, using Clip and Matrix. If Vertices Texs and Vertices Colors are defined in vertices, and Paint paint -contains Shader, Blend Mode mode combines Vertices Colors with Shader. +contains Shader, Blend Mode mode combines Vertices Colors with Shader. ### Parameters @@ -6501,12 +6485,12 @@ contains Shader,
-void drawVertices(const sk sp<SkVertices>& vertices, SkBlendMode mode, const SkPaint& paint)
+void drawVertices(const sk sp<SkVertices>& vertices, SkBlendMode mode, const SkPaint& paint)
 
Draw Vertices vertices, a triangle mesh, using Clip and Matrix. If Vertices Texs and Vertices Colors are defined in vertices, and Paint paint -contains Shader, Blend Mode mode combines Vertices Colors with Shader. +contains Shader, Blend Mode mode combines Vertices Colors with Shader. ### Parameters @@ -6536,15 +6520,15 @@ contains Shader, drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], - SkBlendMode mode, const SkPaint& paint) + SkBlendMode mode, const SkPaint& paint) Draws a Coons Patch: the interpolation of four cubics with shared corners, associating a color, and optionally a texture Point, with each corner. Coons Patch uses Clip and Matrix, paint Shader, Color Filter, -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 +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, @@ -6570,10 +6554,10 @@ corners in top-left, top-right, bottom-right, bottom-left order. may be nullptr # mode - Blend Mode for colors, and for Shader if paint has one + Blend Mode for colors, and for Shader if paint has one paint - Shader, Color Filter, Blend Mode, used to draw + Shader, Color Filter, Blend Mode, used to draw @@ -6598,8 +6582,8 @@ Draws Cubic Point, with each corner. Coons Patch uses Clip and Matrix, paint Shader, Color Filter, -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 +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, @@ -6625,7 +6609,7 @@ corners in top-left, top-right, bottom-right, bottom-left order. may be nullptr # paint - Shader, Color Filter, Blend Mode, used to draw + Shader, Color Filter, Blend Mode, used to draw @@ -6648,17 +6632,18 @@ SeeAlso drawVerticesdrawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[], - const SkColor colors[], int count, SkBlendMode mode, const SkRect* cullRect, + const SkColor colors[], int count, SkBlendMode mode, 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 +paint uses Anti Alias, Color Alpha, Color Filter, Image Filter, and Blend Mode to draw, if present. For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it into destination space. xform, text, and colors if present, must contain count entries. -Optional colors are applied for each sprite using Blend Mode. +Optional colors are applied for each sprite using Blend Mode mode, treating +sprite as source and colors as destination. Optional cullRect is a conservative bounds of all transformed sprites. If cullRect is outside of Clip, canvas can skip drawing. @@ -6674,19 +6659,19 @@ If cullRect is outside of Rect locations of sprites in atlas colors - one per sprite, blended with sprite using Blend Mode; may be nullptr + one per sprite, blended with sprite using Blend Mode; may be nullptr count number of sprites to draw mode - Blend Mode combining colors and sprites + Blend Mode combining colors and sprites cullRect bounds of transformed sprites for efficient clipping; may be nullptr paint - Color Filter, Image Filter, Blend Mode, and so on; may be nullptr + Color Filter, Image Filter, Blend Mode, and so on; may be nullptr @@ -6704,17 +6689,17 @@ If cullRect is outside of drawAtlas(const sk sp<SkImage>& atlas, const SkRSXform xform[], const SkRect tex[], - const SkColor colors[], int count, SkBlendMode mode, const SkRect* cullRect, + const SkColor colors[], int count, SkBlendMode mode, 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 +paint uses Anti Alias, Color Alpha, Color Filter, Image Filter, and Blend Mode to draw, if present. For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it into destination space. xform, text, and colors if present, must contain count entries. -Optional colors is applied for each sprite using Blend Mode. +Optional colors 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. @@ -6730,19 +6715,19 @@ If cullRect is outside of Rect locations of sprites in atlas colors - one per sprite, blended with sprite using Blend Mode; may be nullptr + one per sprite, blended with sprite using Blend Mode; may be nullptr count number of sprites to draw mode - Blend Mode combining colors and sprites + Blend Mode combining colors and sprites cullRect bounds of transformed sprites for efficient clipping; may be nullptr paint - Color Filter, Image Filter, Blend Mode, and so on; may be nullptr + Color Filter, Image Filter, Blend Mode, and so on; may be nullptr @@ -6764,7 +6749,7 @@ void drawAtlas(const 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 +paint uses Anti Alias, Color Alpha, Color Filter, Image Filter, and Blend Mode to draw, if present. For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it into destination space. @@ -6790,7 +6775,7 @@ If cullRect is outside of paint - Color Filter, Image Filter, Blend Mode, and so on; may be nullptr + Color Filter, Image Filter, Blend Mode, and so on; may be nullptr @@ -6812,7 +6797,7 @@ void drawAtlas(const 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 +paint uses Anti Alias, Color Alpha, Color Filter, Image Filter, and Blend Mode to draw, if present. For each entry in the array, Rect tex locates sprite in atlas, and RSXform xform transforms it into destination space. @@ -6838,7 +6823,7 @@ If cullRect is outside of paint - Color Filter, Image Filter, Blend Mode, and so on; may be nullptr + Color Filter, Image Filter, Blend Mode, and so on; may be nullptr @@ -6863,7 +6848,7 @@ void drawDrawable(matrix. If Canvas has an asynchronous implementation, as is the case -when it is recording into Picture, then drawable will be referenced, +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. @@ -6896,7 +6881,7 @@ void drawDrawable(Draw Drawable drawable using Clip and Matrix, offset by (x, y). If Canvas has an asynchronous implementation, as is the case -when it is recording into Picture, then drawable will be referenced, +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. @@ -6933,7 +6918,7 @@ void drawAnnotation(const Rect on Canvas with 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. ### Parameters @@ -6955,7 +6940,7 @@ Only some canvas implementations, such as recording to SkPicture SkDocument +SkPicture SkDocument --- @@ -6968,7 +6953,7 @@ void drawAnnotation(const 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. ### Parameters @@ -6990,7 +6975,7 @@ Only some canvas implementations, such as recording to SkPicture SkDocument +SkPicture SkDocument --- -- cgit v1.2.3