• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1SkCanvas Reference
2===
3
4
5<a name='SkCanvas'></a>
6
7---
8
9<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
10class <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> {
11
12    static std::unique_ptr<<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>> <a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, void* pixels,
13                                                      size_t rowBytes,
14                                                      const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr);
15    static std::unique_ptr<<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>> <a href='#SkCanvas_MakeRasterDirectN32'>MakeRasterDirectN32</a>(int width, int height, <a href='SkColor_Reference#SkPMColor'>SkPMColor</a>* pixels,
16                                                         size_t rowBytes);
17    <a href='#SkCanvas_empty_constructor'>SkCanvas()</a>;
18    <a href='#SkCanvas_int_int_const_SkSurfaceProps_star'>SkCanvas</a>(int width, int height, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr);
19    explicit <a href='#SkCanvas_copy_const_SkBitmap'>SkCanvas</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>);
20    <a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps'>SkCanvas</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>& props);
21    virtual <a href='#SkCanvas_destructor'>~SkCanvas()</a>;
22    <a href='undocumented#SkMetaData'>SkMetaData</a>& <a href='#SkCanvas_getMetaData'>getMetaData</a>();
23    <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> <a href='#SkCanvas_imageInfo'>imageInfo</a>() const;
24    bool <a href='#SkCanvas_getProps'>getProps</a>(<a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props) const;
25    void <a href='#SkCanvas_flush'>flush()</a>;
26    virtual <a href='undocumented#SkISize'>SkISize</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a>() const;
27    <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkSurface_Reference#SkSurface'>SkSurface</a>> <a href='#SkCanvas_makeSurface'>makeSurface</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr);
28    virtual <a href='undocumented#GrContext'>GrContext</a>* <a href='#SkCanvas_getGrContext'>getGrContext</a>();
29    void* <a href='#SkCanvas_accessTopLayerPixels'>accessTopLayerPixels</a>(<a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>* info, size_t* rowBytes, <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>* origin = nullptr);
30    <a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_Handle'>Handle</a> <a href='#SkCanvas_accessTopRasterHandle'>accessTopRasterHandle</a>() const;
31    bool <a href='#SkCanvas_peekPixels'>peekPixels</a>(<a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>* <a href='SkPixmap_Reference#Pixmap'>pixmap</a>);
32    bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& dstInfo, void* dstPixels, size_t dstRowBytes,
33                    int srcX, int srcY);
34    bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>& <a href='SkPixmap_Reference#Pixmap'>pixmap</a>, int srcX, int srcY);
35    bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, int srcX, int srcY);
36    bool <a href='#SkCanvas_writePixels'>writePixels</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, const void* pixels, size_t rowBytes, int x, int y);
37    bool <a href='#SkCanvas_writePixels'>writePixels</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, int x, int y);
38    int <a href='#SkCanvas_save'>save()</a>;
39    int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
40    int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
41    int <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
42    int <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, <a href='undocumented#U8CPU'>U8CPU</a> <a href='SkColor_Reference#Alpha'>alpha</a>);
43
44    enum <a href='#SkCanvas_SaveLayerFlagsSet'>SaveLayerFlagsSet</a> {
45        <a href='#SkCanvas_kPreserveLCDText_SaveLayerFlag'>kPreserveLCDText_SaveLayerFlag</a> = 1 << 1,
46        <a href='#SkCanvas_kInitWithPrevious_SaveLayerFlag'>kInitWithPrevious_SaveLayerFlag</a> = 1 << 2,
47    };
48
49    typedef uint32_t <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a>;
50
51    int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>& layerRec);
52    void <a href='#SkCanvas_restore'>restore()</a>;
53    int <a href='#SkCanvas_getSaveCount'>getSaveCount</a>() const;
54    void <a href='#SkCanvas_restoreToCount'>restoreToCount</a>(int saveCount);
55    void <a href='#SkCanvas_translate'>translate</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy);
56    void <a href='#SkCanvas_scale'>scale</a>(<a href='undocumented#SkScalar'>SkScalar</a> sx, <a href='undocumented#SkScalar'>SkScalar</a> sy);
57    void <a href='#SkCanvas_rotate'>rotate</a>(<a href='undocumented#SkScalar'>SkScalar</a> degrees);
58    void <a href='#SkCanvas_rotate'>rotate</a>(<a href='undocumented#SkScalar'>SkScalar</a> degrees, <a href='undocumented#SkScalar'>SkScalar</a> px, <a href='undocumented#SkScalar'>SkScalar</a> py);
59    void <a href='#SkCanvas_skew'>skew</a>(<a href='undocumented#SkScalar'>SkScalar</a> sx, <a href='undocumented#SkScalar'>SkScalar</a> sy);
60    void <a href='#SkCanvas_concat'>concat</a>(const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='SkMatrix_Reference#Matrix'>matrix</a>);
61    void <a href='#SkCanvas_setMatrix'>setMatrix</a>(const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='SkMatrix_Reference#Matrix'>matrix</a>);
62    void <a href='#SkCanvas_resetMatrix'>resetMatrix</a>();
63    void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias);
64    void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op);
65    void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, bool doAntiAlias = false);
66    void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias);
67    void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, <a href='undocumented#SkClipOp'>SkClipOp</a> op);
68    void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, bool doAntiAlias = false);
69    void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias);
70    void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op);
71    void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, bool doAntiAlias = false);
72    void <a href='#SkCanvas_clipRegion'>clipRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& deviceRgn, <a href='undocumented#SkClipOp'>SkClipOp</a> op = <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kIntersect'>kIntersect</a>);
73    bool <a href='#SkCanvas_quickReject'>quickReject</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>) const;
74    bool <a href='#SkCanvas_quickReject'>quickReject</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>) const;
75    <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>() const;
76    bool <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>(<a href='SkRect_Reference#SkRect'>SkRect</a>* bounds) const;
77    <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>() const;
78    bool <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>(<a href='SkIRect_Reference#SkIRect'>SkIRect</a>* bounds) const;
79    void <a href='#SkCanvas_drawColor'>drawColor</a>(<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='SkColor_Reference#Color'>color</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode = <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>::<a href='#SkBlendMode_kSrcOver'>kSrcOver</a>);
80    void <a href='#SkCanvas_clear'>clear</a>(<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='SkColor_Reference#Color'>color</a>);
81    void <a href='#SkCanvas_discard'>discard()</a>;
82    void <a href='#SkCanvas_drawPaint'>drawPaint</a>(const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
83
84    enum <a href='#SkCanvas_PointMode'>PointMode</a> {
85        <a href='#SkCanvas_kPoints_PointMode'>kPoints_PointMode</a>,
86        <a href='#SkCanvas_kLines_PointMode'>kLines_PointMode</a>,
87        <a href='#SkCanvas_kPolygon_PointMode'>kPolygon_PointMode</a>,
88    };
89
90    void <a href='#SkCanvas_drawPoints'>drawPoints</a>(<a href='#SkCanvas_PointMode'>PointMode</a> mode, size_t count, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pts[], const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
91    void <a href='#SkCanvas_drawPoint'>drawPoint</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
92    void <a href='#SkCanvas_drawPoint'>drawPoint</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> p, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
93    void <a href='#SkCanvas_drawLine'>drawLine</a>(<a href='undocumented#SkScalar'>SkScalar</a> x0, <a href='undocumented#SkScalar'>SkScalar</a> y0, <a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
94    void <a href='#SkCanvas_drawLine'>drawLine</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> p0, <a href='SkPoint_Reference#SkPoint'>SkPoint</a> p1, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
95    void <a href='#SkCanvas_drawRect'>drawRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
96    void <a href='#SkCanvas_drawIRect'>drawIRect</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
97    void <a href='#SkCanvas_drawRegion'>drawRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& <a href='SkRegion_Reference#Region'>region</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
98    void <a href='#SkCanvas_drawOval'>drawOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='undocumented#Oval'>oval</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
99    void <a href='#SkCanvas_drawRRect'>drawRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
100    void <a href='#SkCanvas_drawDRRect'>drawDRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& outer, const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& inner, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
101    void <a href='#SkCanvas_drawCircle'>drawCircle</a>(<a href='undocumented#SkScalar'>SkScalar</a> cx, <a href='undocumented#SkScalar'>SkScalar</a> cy, <a href='undocumented#SkScalar'>SkScalar</a> radius, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
102    void <a href='#SkCanvas_drawCircle'>drawCircle</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> center, <a href='undocumented#SkScalar'>SkScalar</a> radius, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
103    void <a href='#SkCanvas_drawArc'>drawArc</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='undocumented#Oval'>oval</a>, <a href='undocumented#SkScalar'>SkScalar</a> startAngle, <a href='undocumented#SkScalar'>SkScalar</a> sweepAngle,
104                 bool useCenter, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
105    void <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkScalar'>SkScalar</a> rx, <a href='undocumented#SkScalar'>SkScalar</a> ry, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
106    void <a href='#SkCanvas_drawPath'>drawPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
107    void <a href='#SkCanvas_drawImage'>drawImage</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top,
108                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
109    void <a href='#SkCanvas_drawImage'>drawImage</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& <a href='SkImage_Reference#Image'>image</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top,
110                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
111
112    enum <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> {
113        <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>,
114        <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a>,
115    };
116
117    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
118                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
119                       <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
120    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
121                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
122                       <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
123    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
124    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
125                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
126                       <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
127    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
128                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
129                       <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
130    void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
131    void <a href='#SkCanvas_drawImageNine'>drawImageNine</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
132                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
133    void <a href='#SkCanvas_drawImageNine'>drawImageNine</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
134                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
135    void <a href='#SkCanvas_drawBitmap'>drawBitmap</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top,
136                    const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
137    void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
138                        const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
139                        <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
140    void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
141                        const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
142                        <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
143    void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
144                        <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
145    void <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
146                        const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
147    void <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='#SkCanvas_Lattice'>Lattice</a>& lattice, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
148                           const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
149    void <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='#SkCanvas_Lattice'>Lattice</a>& lattice, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
150                          const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr);
151    void <a href='#SkCanvas_drawText'>drawText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y,
152                  const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
153    void <a href='#SkCanvas_drawString'>drawString</a>(const char* <a href='undocumented#String'>string</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
154    void <a href='#SkCanvas_drawString'>drawString</a>(const <a href='undocumented#SkString'>SkString</a>& <a href='undocumented#String'>string</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
155    void <a href='#SkCanvas_drawPosText'>drawPosText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[],
156                     const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
157    void <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='undocumented#SkScalar'>SkScalar</a> xpos[], <a href='undocumented#SkScalar'>SkScalar</a> constY,
158                      const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
159    void <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[],
160                         const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
161    void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>* blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
162    void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>>& blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
163    void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='SkPicture_Reference#SkPicture'>SkPicture</a>* <a href='SkPicture_Reference#Picture'>picture</a>);
164    void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkPicture_Reference#SkPicture'>SkPicture</a>>& <a href='SkPicture_Reference#Picture'>picture</a>);
165    void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='SkPicture_Reference#SkPicture'>SkPicture</a>* <a href='SkPicture_Reference#Picture'>picture</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
166    void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkPicture_Reference#SkPicture'>SkPicture</a>>& <a href='SkPicture_Reference#Picture'>picture</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a>,
167                     const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
168    void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#SkVertices'>SkVertices</a>* <a href='undocumented#Vertices'>vertices</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
169    void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkVertices'>SkVertices</a>>& <a href='undocumented#Vertices'>vertices</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
170    void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#SkVertices'>SkVertices</a>* <a href='undocumented#Vertices'>vertices</a>, const <a href='undocumented#SkVertices'>SkVertices</a>::<a href='#SkVertices_Bone'>Bone</a> bones[], int boneCount,
171                      <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
172    void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkVertices'>SkVertices</a>>& <a href='undocumented#Vertices'>vertices</a>, const <a href='undocumented#SkVertices'>SkVertices</a>::<a href='#SkVertices_Bone'>Bone</a> bones[],
173                      int boneCount, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
174    void <a href='#SkCanvas_drawPatch'>drawPatch</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPath_Reference#Cubic'>cubics</a>[12], const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[4],
175                   const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> texCoords[4], <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
176    void <a href='#SkCanvas_drawPatch'>drawPatch</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPath_Reference#Cubic'>cubics</a>[12], const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[4],
177                   const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> texCoords[4], const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>);
178    void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[],
179                   const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[], int count, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect,
180                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
181    void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[],
182                   const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[], int count, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect,
183                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
184    void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[], int count,
185                   const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
186    void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='undocumented#sk_sp'>sk_sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[],
187                   int count, const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>);
188    void <a href='#SkCanvas_drawDrawable'>drawDrawable</a>(<a href='undocumented#SkDrawable'>SkDrawable</a>* <a href='undocumented#Drawable'>drawable</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a> = nullptr);
189    void <a href='#SkCanvas_drawDrawable'>drawDrawable</a>(<a href='undocumented#SkDrawable'>SkDrawable</a>* <a href='undocumented#Drawable'>drawable</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y);
190    void <a href='#SkCanvas_drawAnnotation'>drawAnnotation</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const char key[], <a href='undocumented#SkData'>SkData</a>* value);
191    void <a href='#SkCanvas_drawAnnotation'>drawAnnotation</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const char key[], const <a href='undocumented#sk_sp'>sk_sp</a><<a href='undocumented#SkData'>SkData</a>>& value);
192    virtual bool <a href='#SkCanvas_isClipEmpty'>isClipEmpty</a>() const;
193    virtual bool <a href='#SkCanvas_isClipRect'>isClipRect</a>() const;
194    const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='#SkCanvas_getTotalMatrix'>getTotalMatrix</a>() const;
195};
196
197</pre>
198
199<a href='SkCanvas_Reference#Canvas'>Canvas</a> provides an interface for drawing, and how the drawing is clipped and transformed.
200<a href='SkCanvas_Reference#Canvas'>Canvas</a> contains a stack of <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip values.
201
202<a href='SkCanvas_Reference#Canvas'>Canvas</a> and <a href='SkPaint_Reference#Paint'>Paint</a> together provide the state to draw into <a href='SkSurface_Reference#Surface'>Surface</a> or <a href='undocumented#Device'>Device</a>.
203Each <a href='SkCanvas_Reference#Canvas'>Canvas</a> draw call transforms the geometry of the object by the concatenation of all
204<a href='SkMatrix_Reference#Matrix'>Matrix</a> values in the stack. The transformed geometry is clipped by the intersection
205of all of Clip values in the stack. The <a href='SkCanvas_Reference#Canvas'>Canvas</a> draw calls use <a href='SkPaint_Reference#Paint'>Paint</a> to supply drawing
206state such as <a href='SkColor_Reference#Color'>Color</a>, <a href='undocumented#Typeface'>Typeface</a>, <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, stroke width, <a href='undocumented#Shader'>Shader</a> and so on.
207
208To draw to a pixel-based destination, create <a href='#Raster_Surface'>Raster_Surface</a> or <a href='#GPU_Surface'>GPU_Surface</a>.
209Request <a href='SkCanvas_Reference#Canvas'>Canvas</a> from <a href='SkSurface_Reference#Surface'>Surface</a> to obtain the interface to draw.
210<a href='SkCanvas_Reference#Canvas'>Canvas</a> generated by <a href='#Raster_Surface'>Raster_Surface</a> draws to memory visible to the CPU.
211<a href='SkCanvas_Reference#Canvas'>Canvas</a> generated by <a href='#GPU_Surface'>GPU_Surface</a> uses Vulkan or OpenGL to draw to the GPU.
212
213To draw to a <a href='undocumented#Document'>document</a>, obtain <a href='SkCanvas_Reference#Canvas'>Canvas</a> from <a href='#SVG_Canvas'>SVG_Canvas</a>, <a href='#Document_PDF'>Document_PDF</a>, or <a href='#Picture_Recorder'>Picture_Recorder</a>.
214<a href='undocumented#Document'>Document</a> based <a href='SkCanvas_Reference#Canvas'>Canvas</a> and other <a href='SkCanvas_Reference#Canvas'>Canvas</a> subclasses reference <a href='undocumented#Device'>Device</a> describing the
215destination.
216
217<a href='SkCanvas_Reference#Canvas'>Canvas</a> can be constructed to draw to <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> without first creating <a href='#Raster_Surface'>Raster_Surface</a>.
218This approach may be deprecated in the future.
219
220<a href='SkCanvas_Reference#Canvas'>Canvas</a> may be created directly when no <a href='SkSurface_Reference#Surface'>Surface</a> is required; some <a href='SkCanvas_Reference#Canvas'>Canvas</a> methods
221implicitly create <a href='#Raster_Surface'>Raster_Surface</a>.
222
223<a name='SkCanvas_MakeRasterDirect'></a>
224
225---
226
227<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
228static std::unique_ptr&lt;<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>&gt; <a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, void* pixels,
229                                                  size_t rowBytes,
230                                                  const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr)
231</pre>
232
233Allocates raster <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> that will draw directly into <a href='#SkCanvas_MakeRasterDirect_pixels'>pixels</a>.
234
235<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned if all parameters are valid.
236Valid parameters include:
237<a href='#SkCanvas_MakeRasterDirect_info'>info</a> dimensions are zero or positive;
238<a href='#SkCanvas_MakeRasterDirect_info'>info</a> contains <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a> and <a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> supported by  <a href='undocumented#Raster_Surface'>raster surface</a>;
239<a href='#SkCanvas_MakeRasterDirect_pixels'>pixels</a> is not nullptr;
240<a href='#SkCanvas_MakeRasterDirect_rowBytes'>rowBytes</a> is zero or large enough to contain <a href='#SkCanvas_MakeRasterDirect_info'>info</a> width <a href='#SkCanvas_MakeRasterDirect_pixels'>pixels</a> of <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
241
242Pass zero for <a href='#SkCanvas_MakeRasterDirect_rowBytes'>rowBytes</a> to compute <a href='#SkCanvas_MakeRasterDirect_rowBytes'>rowBytes</a> from <a href='#SkCanvas_MakeRasterDirect_info'>info</a> width and <a href='undocumented#Size'>size</a> of <a href='undocumented#Pixel'>pixel</a>.
243If <a href='#SkCanvas_MakeRasterDirect_rowBytes'>rowBytes</a> is greater than zero, it must be equal to or greater than
244<a href='#SkCanvas_MakeRasterDirect_info'>info</a> width times bytes required for <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
245
246<a href='undocumented#Pixel'>Pixel</a> buffer <a href='undocumented#Size'>size</a> should be <a href='#SkCanvas_MakeRasterDirect_info'>info</a> height times computed <a href='#SkCanvas_MakeRasterDirect_rowBytes'>rowBytes</a>.
247Pixels are not initialized.
248To access <a href='#SkCanvas_MakeRasterDirect_pixels'>pixels</a> after drawing, call <a href='#SkCanvas_flush'>flush()</a> or <a href='#SkCanvas_peekPixels'>peekPixels</a>().
249
250### Parameters
251
252<table>  <tr>    <td><a name='SkCanvas_MakeRasterDirect_info'><code><strong>info</strong></code></a></td>
253    <td>width, height, <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>, <a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>, <a href='undocumented#SkColorSpace'>SkColorSpace</a>, of  <a href='undocumented#Raster_Surface'>raster surface</a>;</td>
254  </tr>
255</table>
256
257width, or height, or both, may be zero
258
259### Parameters
260
261<table>  <tr>    <td><a name='SkCanvas_MakeRasterDirect_pixels'><code><strong>pixels</strong></code></a></td>
262    <td>pointer to destination <a href='#SkCanvas_MakeRasterDirect_pixels'>pixels</a> buffer</td>
263  </tr>
264  <tr>    <td><a name='SkCanvas_MakeRasterDirect_rowBytes'><code><strong>rowBytes</strong></code></a></td>
265    <td>interval from one <a href='SkSurface_Reference#SkSurface'>SkSurface</a> row to the next, or zero</td>
266  </tr>
267  <tr>    <td><a name='SkCanvas_MakeRasterDirect_props'><code><strong>props</strong></code></a></td>
268    <td>LCD striping orientation and setting for <a href='undocumented#Device'>device</a> independent fonts;</td>
269  </tr>
270</table>
271
272may be nullptr
273
274### Return Value
275
276<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> if all parameters are valid; otherwise, nullptr
277
278### Example
279
280<div><fiddle-embed name="525285073aae7e53eb8f454a398f880c"><div>Allocates a three by three <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, clears it to white, and draws a black <a href='undocumented#Pixel'>pixel</a>
281in the center.
282</div>
283
284#### Example Output
285
286~~~~
287---
288-x-
289---
290~~~~
291
292</fiddle-embed></div>
293
294### See Also
295
296<a href='#SkCanvas_MakeRasterDirectN32'>MakeRasterDirectN32</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_MakeRasterDirect'>MakeRasterDirect</a>
297
298<a name='SkCanvas_MakeRasterDirectN32'></a>
299
300---
301
302<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
303static std::unique_ptr&lt;<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>&gt; <a href='#SkCanvas_MakeRasterDirectN32'>MakeRasterDirectN32</a>(int width, int height, <a href='SkColor_Reference#SkPMColor'>SkPMColor</a>* pixels,
304                                                     size_t rowBytes)
305</pre>
306
307Allocates raster <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> specified by inline <a href='SkImage_Reference#Image'>image</a> specification. Subsequent <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
308calls draw into <a href='#SkCanvas_MakeRasterDirectN32_pixels'>pixels</a>.
309<a href='SkImageInfo_Reference#SkColorType'>SkColorType</a> is set to <a href='SkImageInfo_Reference#kN32_SkColorType'>kN32_SkColorType</a>.
310<a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a> is set to <a href='SkImageInfo_Reference#kPremul_SkAlphaType'>kPremul_SkAlphaType</a>.
311To access <a href='#SkCanvas_MakeRasterDirectN32_pixels'>pixels</a> after drawing, call <a href='#SkCanvas_flush'>flush()</a> or <a href='#SkCanvas_peekPixels'>peekPixels</a>().
312
313<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned if all parameters are valid.
314Valid parameters include:
315<a href='#SkCanvas_MakeRasterDirectN32_width'>width</a> and <a href='#SkCanvas_MakeRasterDirectN32_height'>height</a> are zero or positive;
316<a href='#SkCanvas_MakeRasterDirectN32_pixels'>pixels</a> is not nullptr;
317<a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a> is zero or large enough to contain <a href='#SkCanvas_MakeRasterDirectN32_width'>width</a> <a href='#SkCanvas_MakeRasterDirectN32_pixels'>pixels</a> of <a href='SkImageInfo_Reference#kN32_SkColorType'>kN32_SkColorType</a>.
318
319Pass zero for <a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a> to compute <a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a> from <a href='#SkCanvas_MakeRasterDirectN32_width'>width</a> and <a href='undocumented#Size'>size</a> of <a href='undocumented#Pixel'>pixel</a>.
320If <a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a> is greater than zero, it must be equal to or greater than
321<a href='#SkCanvas_MakeRasterDirectN32_width'>width</a> times bytes required for <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>.
322
323<a href='undocumented#Pixel'>Pixel</a> buffer <a href='undocumented#Size'>size</a> should be <a href='#SkCanvas_MakeRasterDirectN32_height'>height</a> times <a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a>.
324
325### Parameters
326
327<table>  <tr>    <td><a name='SkCanvas_MakeRasterDirectN32_width'><code><strong>width</strong></code></a></td>
328    <td><a href='undocumented#Pixel'>pixel</a> column count on  <a href='undocumented#Raster_Surface'>raster surface</a> created; must be zero or greater</td>
329  </tr>
330  <tr>    <td><a name='SkCanvas_MakeRasterDirectN32_height'><code><strong>height</strong></code></a></td>
331    <td><a href='undocumented#Pixel'>pixel</a> row count on  <a href='undocumented#Raster_Surface'>raster surface</a> created; must be zero or greater</td>
332  </tr>
333  <tr>    <td><a name='SkCanvas_MakeRasterDirectN32_pixels'><code><strong>pixels</strong></code></a></td>
334    <td>pointer to destination <a href='#SkCanvas_MakeRasterDirectN32_pixels'>pixels</a> buffer; buffer <a href='undocumented#Size'>size</a> should be <a href='#SkCanvas_MakeRasterDirectN32_height'>height</a></td>
335  </tr>
336</table>
337
338times <a href='#SkCanvas_MakeRasterDirectN32_rowBytes'>rowBytes</a>
339
340### Parameters
341
342<table>  <tr>    <td><a name='SkCanvas_MakeRasterDirectN32_rowBytes'><code><strong>rowBytes</strong></code></a></td>
343    <td>interval from one <a href='SkSurface_Reference#SkSurface'>SkSurface</a> row to the next, or zero</td>
344  </tr>
345</table>
346
347### Return Value
348
349<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> if all parameters are valid; otherwise, nullptr
350
351### Example
352
353<div><fiddle-embed name="87f55e62ec4c3535e1a5d0f1415b20c6"><div>Allocates a three by three <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, clears it to white, and draws a black <a href='undocumented#Pixel'>pixel</a>
354in the center.
355</div>
356
357#### Example Output
358
359~~~~
360---
361-x-
362---
363~~~~
364
365</fiddle-embed></div>
366
367### See Also
368
369<a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_MakeRasterDirect'>MakeRasterDirect</a> <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>::<a href='#SkImageInfo_MakeN32Premul'>MakeN32Premul</a>
370
371<a name='SkCanvas_empty_constructor'></a>
372
373---
374
375<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
376<a href='#SkCanvas_empty_constructor'>SkCanvas()</a>
377</pre>
378
379Creates an empty <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> with no backing <a href='undocumented#Device'>device</a> or pixels, with
380a width and height of zero.
381
382### Return Value
383
384empty <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
385
386### Example
387
388<div><fiddle-embed name="4a00e6589e862fde5be532f4b6e316ce"><div>Passes a placeholder to a function that requires one.
389</div>
390
391#### Example Output
392
393~~~~
394rect stays rect is true
395rect stays rect is false
396rect stays rect is true
397~~~~
398
399</fiddle-embed></div>
400
401### See Also
402
403<a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_MakeCanvas'>MakeCanvas</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_getCanvas'>getCanvas</a> <a href='undocumented#SkCreateColorSpaceXformCanvas'>SkCreateColorSpaceXformCanvas</a>
404
405<a name='SkCanvas_int_int_const_SkSurfaceProps_star'></a>
406
407---
408
409<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
410<a href='#SkCanvas_int_int_const_SkSurfaceProps_star'>SkCanvas</a>(int width, int height, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr)
411</pre>
412
413Creates <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> of the specified dimensions without a <a href='SkSurface_Reference#SkSurface'>SkSurface</a>.
414Used by subclasses with custom implementations for draw member functions.
415
416If <a href='#SkCanvas_int_int_const_SkSurfaceProps_star_props'>props</a> equals nullptr, <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> are created with
417<a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>::<a href='#SkSurfaceProps_InitType'>InitType</a> settings, which choose the <a href='undocumented#Pixel'>pixel</a> striping
418direction and order. Since a platform may dynamically change its direction when
419the <a href='undocumented#Device'>device</a> is rotated, and since a platform may have multiple monitors with
420different characteristics, it is best not to rely on this legacy behavior.
421
422### Parameters
423
424<table>  <tr>    <td><a name='SkCanvas_int_int_const_SkSurfaceProps_star_width'><code><strong>width</strong></code></a></td>
425    <td>zero or greater</td>
426  </tr>
427  <tr>    <td><a name='SkCanvas_int_int_const_SkSurfaceProps_star_height'><code><strong>height</strong></code></a></td>
428    <td>zero or greater</td>
429  </tr>
430  <tr>    <td><a name='SkCanvas_int_int_const_SkSurfaceProps_star_props'><code><strong>props</strong></code></a></td>
431    <td>LCD striping orientation and setting for <a href='undocumented#Device'>device</a> independent fonts;</td>
432  </tr>
433</table>
434
435may be nullptr
436
437### Return Value
438
439<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> placeholder with dimensions
440
441### Example
442
443<div><fiddle-embed name="ce6a5ef2df447970b4453489d9d67930">
444
445#### Example Output
446
447~~~~
448canvas is empty
449~~~~
450
451</fiddle-embed></div>
452
453### See Also
454
455<a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> <a href='undocumented#SkPixelGeometry'>SkPixelGeometry</a> <a href='undocumented#SkCreateColorSpaceXformCanvas'>SkCreateColorSpaceXformCanvas</a>
456
457<a name='SkCanvas_copy_const_SkBitmap'></a>
458
459---
460
461<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
462explicit <a href='#SkCanvas_copy_const_SkBitmap'>SkCanvas</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>)
463</pre>
464
465Constructs a <a href='SkCanvas_Reference#Canvas'>canvas</a> that draws into <a href='#SkCanvas_copy_const_SkBitmap_bitmap'>bitmap</a>.
466Sets <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>::<a href='#SkSurfaceProps_kLegacyFontHost_InitType'>kLegacyFontHost_InitType</a> in constructed <a href='SkSurface_Reference#SkSurface'>SkSurface</a>.
467
468<a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> is copied so that subsequently editing <a href='#SkCanvas_copy_const_SkBitmap_bitmap'>bitmap</a> will not affect
469constructed <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
470
471May be deprecated in the future.
472
473### Parameters
474
475<table>  <tr>    <td><a name='SkCanvas_copy_const_SkBitmap_bitmap'><code><strong>bitmap</strong></code></a></td>
476    <td>width, height, <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>, <a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>, and <a href='undocumented#Pixel'>pixel</a></td>
477  </tr>
478</table>
479
480storage of  <a href='undocumented#Raster_Surface'>raster surface</a>
481
482### Return Value
483
484<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> that can be used to draw into <a href='#SkCanvas_copy_const_SkBitmap_bitmap'>bitmap</a>
485
486### Example
487
488<div><fiddle-embed name="dd92db963af190e849894038f39b598a"><div>The actual output depends on the installed fonts.
489</div>
490
491#### Example Output
492
493~~~~
494-----
495---x-
496---x-
497---x-
498---x-
499---x-
500---x-
501-----
502---x-
503---x-
504-----
505~~~~
506
507</fiddle-embed></div>
508
509### See Also
510
511<a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_MakeCanvas'>MakeCanvas</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_getCanvas'>getCanvas</a> <a href='undocumented#SkCreateColorSpaceXformCanvas'>SkCreateColorSpaceXformCanvas</a>
512
513<a name='SkCanvas_const_SkBitmap_const_SkSurfaceProps'></a>
514
515---
516
517<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
518<a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps'>SkCanvas</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>& props)
519</pre>
520
521Constructs a <a href='SkCanvas_Reference#Canvas'>canvas</a> that draws into <a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps_bitmap'>bitmap</a>.
522Use <a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps_props'>props</a> to match the <a href='undocumented#Device'>device</a> characteristics, like LCD striping.
523
524<a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps_bitmap'>bitmap</a> is copied so that subsequently editing <a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps_bitmap'>bitmap</a> will not affect
525constructed <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
526
527### Parameters
528
529<table>  <tr>    <td><a name='SkCanvas_const_SkBitmap_const_SkSurfaceProps_bitmap'><code><strong>bitmap</strong></code></a></td>
530    <td>width, height, <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>, <a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>,</td>
531  </tr>
532</table>
533
534and  <a href='undocumented#Pixel_Storage'>pixel storage</a> of  <a href='undocumented#Raster_Surface'>raster surface</a>
535
536### Parameters
537
538<table>  <tr>    <td><a name='SkCanvas_const_SkBitmap_const_SkSurfaceProps_props'><code><strong>props</strong></code></a></td>
539    <td>order and orientation of RGB striping; and whether to use</td>
540  </tr>
541</table>
542
543<a href='undocumented#Device'>device</a> independent fonts
544
545### Return Value
546
547<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> that can be used to draw into <a href='#SkCanvas_const_SkBitmap_const_SkSurfaceProps_bitmap'>bitmap</a>
548
549### Example
550
551<div><fiddle-embed name="c26cfae4c42cb445240335cc12a50235"><div>The actual output depends on the installed fonts.
552</div>
553
554#### Example Output
555
556~~~~
557-----
558---x-
559---x-
560---x-
561---x-
562---x-
563---x-
564-----
565---x-
566---x-
567-----
568~~~~
569
570</fiddle-embed></div>
571
572### See Also
573
574<a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_MakeCanvas'>MakeCanvas</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_getCanvas'>getCanvas</a> <a href='undocumented#SkCreateColorSpaceXformCanvas'>SkCreateColorSpaceXformCanvas</a>
575
576<a name='SkCanvas_destructor'></a>
577
578---
579
580<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
581virtual <a href='#SkCanvas_destructor'>~SkCanvas()</a>
582</pre>
583
584Draws saved <a href='SkCanvas_Reference#Layer'>layers</a>, if any.
585Frees up resources used by <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
586
587### Example
588
589<div><fiddle-embed name="b7bc91ff16c9b9351b2a127f35394b82"><div><a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='SkCanvas_Reference#Layer'>Layer</a> draws into <a href='SkBitmap_Reference#Bitmap'>bitmap</a>. <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> sets up an additional
590drawing <a href='SkSurface_Reference#Surface'>surface</a> that blends with the <a href='SkBitmap_Reference#Bitmap'>bitmap</a>. When <a href='SkCanvas_Reference#Layer'>Layer</a> goes out of
591scope, <a href='SkCanvas_Reference#Layer'>Layer</a> destructor is called. The saved <a href='SkCanvas_Reference#Layer'>Layer</a> is restored, drawing
592transparent letters.
593</div></fiddle-embed></div>
594
595### See Also
596
597<a href='#Canvas_State_Stack'>State_Stack</a>
598
599<a name='Property'></a>
600
601<a name='SkCanvas_getMetaData'></a>
602
603---
604
605<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
606<a href='undocumented#SkMetaData'>SkMetaData</a>& <a href='#SkCanvas_getMetaData'>getMetaData</a>()
607</pre>
608
609Returns storage to associate additional <a href='undocumented#Data'>data</a> with the <a href='SkCanvas_Reference#Canvas'>canvas</a>.
610The storage is freed when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is deleted.
611
612### Return Value
613
614storage that can be read from and written to
615
616### Example
617
618<div><fiddle-embed name="1598396056045e8d0c583b748293d652">
619
620#### Example Output
621
622~~~~
623before: (null)
624during: Hello!
625after: (null)
626~~~~
627
628</fiddle-embed></div>
629
630### See Also
631
632<a href='undocumented#SkMetaData'>SkMetaData</a>
633
634<a name='SkCanvas_imageInfo'></a>
635
636---
637
638<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
639<a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> <a href='#SkCanvas_imageInfo'>imageInfo</a>()const
640</pre>
641
642Returns <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> for <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>. If <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is not associated with raster <a href='SkSurface_Reference#Surface'>surface</a> or
643GPU <a href='SkSurface_Reference#Surface'>surface</a>, returned <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a> is set to <a href='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>.
644
645### Return Value
646
647dimensions and <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a> of <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
648
649### Example
650
651<div><fiddle-embed name="d93389d971f8084c4ccc7a66e4e157ee">
652
653#### Example Output
654
655~~~~
656emptyInfo == canvasInfo
657~~~~
658
659</fiddle-embed></div>
660
661### See Also
662
663<a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> <a href='#SkCanvas_MakeRasterDirect'>MakeRasterDirect</a> <a href='#SkCanvas_makeSurface'>makeSurface</a>
664
665<a name='SkCanvas_getProps'></a>
666
667---
668
669<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
670bool <a href='#SkCanvas_getProps'>getProps</a>(<a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props)const
671</pre>
672
673Copies <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>, if <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is associated with  <a href='undocumented#Raster_Surface'>raster surface</a> or
674<a href='undocumented#GPU_Surface'>GPU surface</a>, and returns true. Otherwise, returns false and leave <a href='#SkCanvas_getProps_props'>props</a> unchanged.
675
676### Parameters
677
678<table>  <tr>    <td><a name='SkCanvas_getProps_props'><code><strong>props</strong></code></a></td>
679    <td>storage for writable <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a></td>
680  </tr>
681</table>
682
683### Return Value
684
685true if <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> was copied
686
687### Example
688
689<div><fiddle-embed name="0fbf2dedc2619bbfbf173c9e3bc1a508">
690
691#### Example Output
692
693~~~~
694isRGB:0
695isRGB:1
696~~~~
697
698</fiddle-embed></div>
699
700### See Also
701
702<a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> <a href='#SkCanvas_makeSurface'>makeSurface</a>
703
704<a name='Utility'></a>
705
706<a name='SkCanvas_flush'></a>
707
708---
709
710<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
711void <a href='#SkCanvas_flush'>flush()</a>
712</pre>
713
714Triggers the immediate execution of all pending draw operations.
715If <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is associated with GPU <a href='SkSurface_Reference#Surface'>surface</a>, resolves all pending GPU operations.
716If <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is associated with raster <a href='SkSurface_Reference#Surface'>surface</a>, has no effect; raster draw
717operations are never deferred.
718
719### See Also
720
721<a href='#SkCanvas_peekPixels'>peekPixels</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_flush'>flush</a> <a href='undocumented#GrContext'>GrContext</a>::<a href='#GrContext_flush'>flush</a> <a href='undocumented#GrContext'>GrContext</a>::<a href='#GrContext_abandonContext'>abandonContext</a>
722
723<a name='SkCanvas_getBaseLayerSize'></a>
724
725---
726
727<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
728virtual <a href='undocumented#SkISize'>SkISize</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a>()const
729</pre>
730
731Gets the <a href='undocumented#Size'>size</a> of the base or root <a href='SkCanvas_Reference#Layer'>layer</a> in global <a href='SkCanvas_Reference#Canvas'>canvas</a> coordinates. The
732origin of the base <a href='SkCanvas_Reference#Layer'>layer</a> is always (0,0). The area available for drawing may be
733smaller (due to clipping or <a href='#SkCanvas_saveLayer'>saveLayer</a>).
734
735### Return Value
736
737integral width and height of base <a href='SkCanvas_Reference#Layer'>layer</a>
738
739### Example
740
741<div><fiddle-embed name="374e245d91cd729eca48fd20e631fdf3">
742
743#### Example Output
744
745~~~~
746clip=10,30
747size=20,30
748~~~~
749
750</fiddle-embed></div>
751
752### See Also
753
754<a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>
755
756<a name='SkCanvas_makeSurface'></a>
757
758---
759
760<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
761<a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkSurface_Reference#SkSurface'>SkSurface</a>&gt; <a href='#SkCanvas_makeSurface'>makeSurface</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, const <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>* props = nullptr)
762</pre>
763
764Creates <a href='SkSurface_Reference#SkSurface'>SkSurface</a> matching <a href='#SkCanvas_makeSurface_info'>info</a> and <a href='#SkCanvas_makeSurface_props'>props</a>, and associates it with <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
765Returns nullptr if no match found.
766
767If <a href='#SkCanvas_makeSurface_props'>props</a> is nullptr, matches <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> in <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>. If <a href='#SkCanvas_makeSurface_props'>props</a> is nullptr and <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
768does not have <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>, creates <a href='SkSurface_Reference#SkSurface'>SkSurface</a> with default <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>.
769
770### Parameters
771
772<table>  <tr>    <td><a name='SkCanvas_makeSurface_info'><code><strong>info</strong></code></a></td>
773    <td>width, height, <a href='SkImageInfo_Reference#SkColorType'>SkColorType</a>, <a href='SkImageInfo_Reference#SkAlphaType'>SkAlphaType</a>, and <a href='undocumented#SkColorSpace'>SkColorSpace</a></td>
774  </tr>
775  <tr>    <td><a name='SkCanvas_makeSurface_props'><code><strong>props</strong></code></a></td>
776    <td><a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a> to match; may be nullptr to match <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a></td>
777  </tr>
778</table>
779
780### Return Value
781
782<a href='SkSurface_Reference#SkSurface'>SkSurface</a> matching <a href='#SkCanvas_makeSurface_info'>info</a> and <a href='#SkCanvas_makeSurface_props'>props</a>, or nullptr if no match is available
783
784### Example
785
786<div><fiddle-embed name="1ce28351444b41ab2b8e3128a4b9b9c2">
787
788#### Example Output
789
790~~~~
791compatible != nullptr
792size = 3, 4
793~~~~
794
795</fiddle-embed></div>
796
797### See Also
798
799<a href='SkSurface_Reference#SkSurface'>SkSurface</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_makeSurface'>makeSurface</a> <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> <a href='undocumented#SkSurfaceProps'>SkSurfaceProps</a>
800
801<a name='SkCanvas_getGrContext'></a>
802
803---
804
805<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
806virtual <a href='undocumented#GrContext'>GrContext</a>* <a href='#SkCanvas_getGrContext'>getGrContext</a>()
807</pre>
808
809Returns GPU context of the GPU <a href='SkSurface_Reference#Surface'>surface</a> associated with <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
810
811### Return Value
812
813GPU context, if available; nullptr otherwise
814
815### Example
816
817<div><fiddle-embed name="c4ea949e5fa5a0630dcb6b0204bd498f"></fiddle-embed></div>
818
819### See Also
820
821<a href='undocumented#GrContext'>GrContext</a>
822
823<a name='SkCanvas_accessTopLayerPixels'></a>
824
825---
826
827<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
828void* <a href='#SkCanvas_accessTopLayerPixels'>accessTopLayerPixels</a>(<a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>* info, size_t* rowBytes, <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>* origin = nullptr)
829</pre>
830
831Returns the <a href='undocumented#Pixel'>pixel</a> base address, <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>, <a href='#SkCanvas_accessTopLayerPixels_rowBytes'>rowBytes</a>, and <a href='#SkCanvas_accessTopLayerPixels_origin'>origin</a> if the pixels
832can be read directly. The returned address is only valid
833while <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is in scope and unchanged. Any <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> call or <a href='SkSurface_Reference#SkSurface'>SkSurface</a> call
834may invalidate the returned address and other returned values.
835
836If pixels are inaccessible, <a href='#SkCanvas_accessTopLayerPixels_info'>info</a>, <a href='#SkCanvas_accessTopLayerPixels_rowBytes'>rowBytes</a>, and <a href='#SkCanvas_accessTopLayerPixels_origin'>origin</a> are unchanged.
837
838### Parameters
839
840<table>  <tr>    <td><a name='SkCanvas_accessTopLayerPixels_info'><code><strong>info</strong></code></a></td>
841    <td>storage for writable pixels' <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>; may be nullptr</td>
842  </tr>
843  <tr>    <td><a name='SkCanvas_accessTopLayerPixels_rowBytes'><code><strong>rowBytes</strong></code></a></td>
844    <td>storage for writable pixels' row bytes; may be nullptr</td>
845  </tr>
846  <tr>    <td><a name='SkCanvas_accessTopLayerPixels_origin'><code><strong>origin</strong></code></a></td>
847    <td>storage for <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> top <a href='SkCanvas_Reference#Layer'>layer</a> <a href='#SkCanvas_accessTopLayerPixels_origin'>origin</a>, its top-left corner;</td>
848  </tr>
849</table>
850
851may be nullptr
852
853### Return Value
854
855address of pixels, or nullptr if inaccessible
856
857### Example
858
859<div><fiddle-embed name="38d0d6ca9bea146d31bcbec197856359"></fiddle-embed></div>
860
861### Example
862
863<div><fiddle-embed name="a7ac9c21bbabcdeeca00f72a61cd0f3e"><div>Draws "ABC" on the <a href='undocumented#Device'>device</a>. Then draws "DEF" in <a href='SkCanvas_Reference#Layer'>Layer</a>, and reads
864<a href='SkCanvas_Reference#Layer'>Layer</a> to add a large dotted "DEF". Finally blends <a href='SkCanvas_Reference#Layer'>Layer</a> with the
865<a href='undocumented#Device'>device</a>.
866
867The <a href='SkCanvas_Reference#Layer'>Layer</a> and blended result appear on the CPU and GPU but the large dotted
868"DEF" appear only on the CPU.
869</div></fiddle-embed></div>
870
871### See Also
872
873<a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a> <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>
874
875<a name='SkCanvas_accessTopRasterHandle'></a>
876
877---
878
879<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
880<a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_Handle'>Handle</a> <a href='#SkCanvas_accessTopRasterHandle'>accessTopRasterHandle</a>()const
881</pre>
882
883Returns custom context that tracks the <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip.
884
885Use <a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a> to blend Skia drawing with custom drawing, typically performed
886by the host platform user interface. The custom context returned is generated by
887<a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>::<a href='#SkRasterHandleAllocator_MakeCanvas'>MakeCanvas</a>, which creates a custom <a href='SkCanvas_Reference#Canvas'>canvas</a> with raster storage for
888the drawing destination.
889
890### Return Value
891
892context of custom allocation
893
894### Example
895
896<div><fiddle-embed name="4486d0c0b22ad2931db130f42da4c80c"><div></div>
897
898#### Example Output
899
900~~~~
901context = skia
902~~~~
903
904</fiddle-embed></div>
905
906### See Also
907
908<a href='undocumented#SkRasterHandleAllocator'>SkRasterHandleAllocator</a>
909
910<a name='Pixels'></a>
911
912<a name='SkCanvas_peekPixels'></a>
913
914---
915
916<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
917bool <a href='#SkCanvas_peekPixels'>peekPixels</a>(<a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>* <a href='SkPixmap_Reference#Pixmap'>pixmap</a>)
918</pre>
919
920Returns true if <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> has direct access to its pixels.
921
922Pixels are readable when <a href='undocumented#SkBaseDevice'>SkBaseDevice</a> is raster. Pixels are not readable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
923is returned from  <a href='undocumented#GPU_Surface'>GPU surface</a>, returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>, returned by
924<a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is the base of a utility class
925like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
926
927<a href='#SkCanvas_peekPixels_pixmap'>pixmap</a> is valid only while <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is in scope and unchanged. Any
928<a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> or <a href='SkSurface_Reference#SkSurface'>SkSurface</a> call may invalidate the <a href='#SkCanvas_peekPixels_pixmap'>pixmap</a> values.
929
930### Parameters
931
932<table>  <tr>    <td><a name='SkCanvas_peekPixels_pixmap'><code><strong>pixmap</strong></code></a></td>
933    <td>storage for <a href='undocumented#Pixel'>pixel</a> state if pixels are readable; otherwise, ignored</td>
934  </tr>
935</table>
936
937### Return Value
938
939true if <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> has direct access to pixels
940
941### Example
942
943<div><fiddle-embed name="e9411d676d1fa13b46331abe9e14ad3e">
944
945#### Example Output
946
947~~~~
948width=256 height=256
949~~~~
950
951</fiddle-embed></div>
952
953### See Also
954
955<a href='#SkCanvas_readPixels'>readPixels</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_peekPixels'>peekPixels</a> <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_peekPixels'>peekPixels</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_peekPixels'>peekPixels</a>
956
957<a name='SkCanvas_readPixels'></a>
958
959---
960
961<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
962bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY)
963</pre>
964
965Copies <a href='SkRect_Reference#Rect'>Rect</a> of pixels from <a href='SkCanvas_Reference#Canvas'>Canvas</a> into <a href='#SkCanvas_readPixels_dstPixels'>dstPixels</a>. <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip are
966ignored.
967
968Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkCanvas_readPixels_srcX'>srcX</a>, <a href='#SkCanvas_readPixels_srcY'>srcY</a>) and (<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_height'>height()</a>).
969Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_height'>height()</a>).
970Copies each readable <a href='undocumented#Pixel'>pixel</a> intersecting both rectangles, without scaling,
971converting to <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_colorType'>colorType</a>() and <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_alphaType'>alphaType</a>() if required.
972
973Pixels are readable when <a href='undocumented#Device'>Device</a> is raster, or backed by a GPU.
974Pixels are not readable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>,
975returned by <a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#Canvas'>Canvas</a> is the base of a utility
976class like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
977
978The destination  <a href='undocumented#Pixel_Storage'>pixel storage</a> must be allocated by the caller.
979
980<a href='undocumented#Pixel'>Pixel</a> values are converted only if <a href='#Image_Info_Color_Type'>Color_Type</a> and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a>
981do not match. Only pixels within both source and destination rectangles
982are copied. <a href='#SkCanvas_readPixels_dstPixels'>dstPixels</a> contents outside <a href='SkRect_Reference#Rect'>Rect</a> intersection are unchanged.
983
984Pass negative values for <a href='#SkCanvas_readPixels_srcX'>srcX</a> or <a href='#SkCanvas_readPixels_srcY'>srcY</a> to offset pixels across or down destination.
985
986Does not copy, and returns false if:
987
988<table>  <tr>
989    <td>Source and destination rectangles do not intersect.</td>
990  </tr>  <tr>
991    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels could not be converted to <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_colorType'>colorType</a>() or <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_alphaType'>alphaType</a>().</td>
992  </tr>  <tr>
993    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels are not readable; for instance, <a href='SkCanvas_Reference#Canvas'>Canvas</a> is document-based.</td>
994  </tr>  <tr>
995    <td><a href='#SkCanvas_readPixels_dstRowBytes'>dstRowBytes</a> is too small to contain one row of pixels.</td>
996  </tr>
997</table>
998
999### Parameters
1000
1001<table>  <tr>    <td><a name='SkCanvas_readPixels_dstInfo'><code><strong>dstInfo</strong></code></a></td>
1002    <td>width, height, <a href='#Image_Info_Color_Type'>Color_Type</a>, and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a> of <a href='#SkCanvas_readPixels_dstPixels'>dstPixels</a></td>
1003  </tr>
1004  <tr>    <td><a name='SkCanvas_readPixels_dstPixels'><code><strong>dstPixels</strong></code></a></td>
1005    <td>storage for pixels; <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_height'>height()</a> times <a href='#SkCanvas_readPixels_dstRowBytes'>dstRowBytes</a>, or larger</td>
1006  </tr>
1007  <tr>    <td><a name='SkCanvas_readPixels_dstRowBytes'><code><strong>dstRowBytes</strong></code></a></td>
1008    <td><a href='undocumented#Size'>size</a> of one destination row; <a href='#SkCanvas_readPixels_dstInfo'>dstInfo</a>.<a href='#SkImageInfo_width'>width()</a> times <a href='undocumented#Pixel'>pixel</a> <a href='undocumented#Size'>size</a>, or larger</td>
1009  </tr>
1010  <tr>    <td><a name='SkCanvas_readPixels_srcX'><code><strong>srcX</strong></code></a></td>
1011    <td>offset into readable pixels on x-axis; may be negative</td>
1012  </tr>
1013  <tr>    <td><a name='SkCanvas_readPixels_srcY'><code><strong>srcY</strong></code></a></td>
1014    <td>offset into readable pixels on y-axis; may be negative</td>
1015  </tr>
1016</table>
1017
1018### Return Value
1019
1020true if pixels were copied
1021
1022### Example
1023
1024<div><fiddle-embed name="102d014d7f753db2a9b9ee08893aaf11"><div>A black <a href='undocumented#Circle'>circle</a> drawn on a blue background provides an <a href='SkImage_Reference#Image'>image</a> to copy.
1025<a href='#SkCanvas_readPixels'>readPixels</a> copies one quarter of the <a href='SkCanvas_Reference#Canvas'>canvas</a> into each of the four corners.
1026The copied quarter <a href='undocumented#Circle'>circles</a> overdraw the original <a href='undocumented#Circle'>circle</a>.
1027</div></fiddle-embed></div>
1028
1029### Example
1030
1031<div><fiddle-embed name="481e990e923a0ed34654f4361b94f096"><div><a href='SkCanvas_Reference#Canvas'>Canvas</a> returned by <a href='#Raster_Surface'>Raster_Surface</a> has <a href='undocumented#Premultiply'>Premultiplied</a> <a href='undocumented#Pixel'>pixel</a> values.
1032<a href='#SkCanvas_clear'>clear()</a> takes <a href='undocumented#Unpremultiply'>Unpremultiplied</a> input with <a href='#Color_Alpha'>Color_Alpha</a> equal 0x80
1033and RGB equal 0x55, 0xAA, 0xFF. RGB is multiplied by <a href='#Color_Alpha'>Color_Alpha</a>
1034to generate <a href='undocumented#Premultiply'>Premultiplied</a> value 0x802B5580. <a href='#SkCanvas_readPixels'>readPixels</a> converts <a href='undocumented#Pixel'>pixel</a> back
1035to <a href='undocumented#Unpremultiply'>Unpremultiplied</a> value 0x8056A9FF, introducing error.
1036</div>
1037
1038#### Example Output
1039
1040~~~~
1041pixel = 802b5580
1042pixel = 8056a9ff
1043~~~~
1044
1045</fiddle-embed></div>
1046
1047### See Also
1048
1049<a href='#SkCanvas_peekPixels'>peekPixels</a> <a href='#SkCanvas_writePixels'>writePixels</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_readPixels'>readPixels</a> <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>::<a href='#SkPixmap_readPixels'>readPixels</a> <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_readPixels'>readPixels</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_readPixels'>readPixels</a>
1050
1051<a name='SkCanvas_readPixels_2'></a>
1052
1053---
1054
1055<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1056bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>& <a href='SkPixmap_Reference#Pixmap'>pixmap</a>, int srcX, int srcY)
1057</pre>
1058
1059Copies <a href='SkRect_Reference#Rect'>Rect</a> of pixels from <a href='SkCanvas_Reference#Canvas'>Canvas</a> into <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>. <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip are
1060ignored.
1061
1062Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkCanvas_readPixels_2_srcX'>srcX</a>, <a href='#SkCanvas_readPixels_2_srcY'>srcY</a>) and (<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_height'>height()</a>).
1063Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_width'>width()</a>, <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_height'>height()</a>).
1064Copies each readable <a href='undocumented#Pixel'>pixel</a> intersecting both rectangles, without scaling,
1065converting to <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_colorType'>colorType</a>() and <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_alphaType'>alphaType</a>() if required.
1066
1067Pixels are readable when <a href='undocumented#Device'>Device</a> is raster, or backed by a GPU.
1068Pixels are not readable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>,
1069returned by <a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#Canvas'>Canvas</a> is the base of a utility
1070class like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
1071
1072Caller must allocate  <a href='undocumented#Pixel_Storage'>pixel storage</a> in <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a> if needed.
1073
1074<a href='undocumented#Pixel'>Pixel</a> values are converted only if <a href='#Image_Info_Color_Type'>Color_Type</a> and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a>
1075do not match. Only pixels within both source and destination <a href='SkRect_Reference#Rect'>Rects</a>
1076are copied.  <a href='SkPixmap_Reference#Pixmap_Pixels'>pixmap pixels</a> contents outside <a href='SkRect_Reference#Rect'>Rect</a> intersection are unchanged.
1077
1078Pass negative values for <a href='#SkCanvas_readPixels_2_srcX'>srcX</a> or <a href='#SkCanvas_readPixels_2_srcY'>srcY</a> to offset pixels across or down <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.
1079
1080Does not copy, and returns false if:
1081
1082<table>  <tr>
1083    <td>Source and destination rectangles do not intersect.</td>
1084  </tr>  <tr>
1085    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels could not be converted to <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_colorType'>colorType</a>() or <a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_alphaType'>alphaType</a>().</td>
1086  </tr>  <tr>
1087    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels are not readable; for instance, <a href='SkCanvas_Reference#Canvas'>Canvas</a> is document-based.</td>
1088  </tr>  <tr>
1089    <td><a href='SkPixmap_Reference#Pixmap'>Pixmap</a> pixels could not be allocated.</td>
1090  </tr>  <tr>
1091    <td><a href='#SkCanvas_readPixels_2_pixmap'>pixmap</a>.<a href='#SkPixmap_rowBytes'>rowBytes</a>() is too small to contain one row of pixels.</td>
1092  </tr>
1093</table>
1094
1095### Parameters
1096
1097<table>  <tr>    <td><a name='SkCanvas_readPixels_2_pixmap'><code><strong>pixmap</strong></code></a></td>
1098    <td>storage for pixels copied from <a href='SkCanvas_Reference#Canvas'>Canvas</a></td>
1099  </tr>
1100  <tr>    <td><a name='SkCanvas_readPixels_2_srcX'><code><strong>srcX</strong></code></a></td>
1101    <td>offset into readable pixels on x-axis; may be negative</td>
1102  </tr>
1103  <tr>    <td><a name='SkCanvas_readPixels_2_srcY'><code><strong>srcY</strong></code></a></td>
1104    <td>offset into readable pixels on y-axis; may be negative</td>
1105  </tr>
1106</table>
1107
1108### Return Value
1109
1110true if pixels were copied
1111
1112### Example
1113
1114<div><fiddle-embed name="85f199032943b6483722c34a91c4e20f"><div><a href='#SkCanvas_clear'>clear()</a> takes <a href='undocumented#Unpremultiply'>Unpremultiplied</a> input with <a href='#Color_Alpha'>Color_Alpha</a> equal 0x80
1115and RGB equal 0x55, 0xAA, 0xFF. RGB is multiplied by <a href='#Color_Alpha'>Color_Alpha</a>
1116to generate <a href='undocumented#Premultiply'>Premultiplied</a> value 0x802B5580.
1117</div>
1118
1119#### Example Output
1120
1121~~~~
1122pixel = 802b5580
1123~~~~
1124
1125</fiddle-embed></div>
1126
1127### See Also
1128
1129<a href='#SkCanvas_peekPixels'>peekPixels</a> <a href='#SkCanvas_writePixels'>writePixels</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_readPixels'>readPixels</a> <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>::<a href='#SkPixmap_readPixels'>readPixels</a> <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_readPixels'>readPixels</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_readPixels'>readPixels</a>
1130
1131<a name='SkCanvas_readPixels_3'></a>
1132
1133---
1134
1135<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1136bool <a href='#SkCanvas_readPixels'>readPixels</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, int srcX, int srcY)
1137</pre>
1138
1139Copies <a href='SkRect_Reference#Rect'>Rect</a> of pixels from <a href='SkCanvas_Reference#Canvas'>Canvas</a> into <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>. <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip are
1140ignored.
1141
1142Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkCanvas_readPixels_3_srcX'>srcX</a>, <a href='#SkCanvas_readPixels_3_srcY'>srcY</a>) and (<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_height'>height()</a>).
1143Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_width'>width()</a>, <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_height'>height()</a>).
1144Copies each readable <a href='undocumented#Pixel'>pixel</a> intersecting both rectangles, without scaling,
1145converting to <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_colorType'>colorType</a>() and <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_alphaType'>alphaType</a>() if required.
1146
1147Pixels are readable when <a href='undocumented#Device'>Device</a> is raster, or backed by a GPU.
1148Pixels are not readable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>,
1149returned by <a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#Canvas'>Canvas</a> is the base of a utility
1150class like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
1151
1152Caller must allocate  <a href='undocumented#Pixel_Storage'>pixel storage</a> in <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a> if needed.
1153
1154<a href='SkBitmap_Reference#Bitmap'>Bitmap</a> values are converted only if <a href='#Image_Info_Color_Type'>Color_Type</a> and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a>
1155do not match. Only pixels within both source and destination rectangles
1156are copied. <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> pixels outside <a href='SkRect_Reference#Rect'>Rect</a> intersection are unchanged.
1157
1158Pass negative values for <a href='#SkCanvas_readPixels_3_srcX'>srcX</a> or <a href='#SkCanvas_readPixels_3_srcY'>srcY</a> to offset pixels across or down <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.
1159
1160Does not copy, and returns false if:
1161
1162<table>  <tr>
1163    <td>Source and destination rectangles do not intersect.</td>
1164  </tr>  <tr>
1165    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels could not be converted to <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_colorType'>colorType</a>() or <a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_alphaType'>alphaType</a>().</td>
1166  </tr>  <tr>
1167    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels are not readable; for instance, <a href='SkCanvas_Reference#Canvas'>Canvas</a> is document-based.</td>
1168  </tr>  <tr>
1169    <td><a href='SkBitmap_Reference#Bitmap_Pixels'>bitmap pixels</a> could not be allocated.</td>
1170  </tr>  <tr>
1171    <td><a href='#SkCanvas_readPixels_3_bitmap'>bitmap</a>.<a href='#SkBitmap_rowBytes'>rowBytes</a>() is too small to contain one row of pixels.</td>
1172  </tr>
1173</table>
1174
1175### Parameters
1176
1177<table>  <tr>    <td><a name='SkCanvas_readPixels_3_bitmap'><code><strong>bitmap</strong></code></a></td>
1178    <td>storage for pixels copied from <a href='SkCanvas_Reference#Canvas'>Canvas</a></td>
1179  </tr>
1180  <tr>    <td><a name='SkCanvas_readPixels_3_srcX'><code><strong>srcX</strong></code></a></td>
1181    <td>offset into readable pixels on x-axis; may be negative</td>
1182  </tr>
1183  <tr>    <td><a name='SkCanvas_readPixels_3_srcY'><code><strong>srcY</strong></code></a></td>
1184    <td>offset into readable pixels on y-axis; may be negative</td>
1185  </tr>
1186</table>
1187
1188### Return Value
1189
1190true if pixels were copied
1191
1192### Example
1193
1194<div><fiddle-embed name="af6dec8ef974aa67bf102f29915bcd6a"><div><a href='#SkCanvas_clear'>clear()</a> takes <a href='undocumented#Unpremultiply'>Unpremultiplied</a> input with <a href='#Color_Alpha'>Color_Alpha</a> equal 0x80
1195and RGB equal 0x55, 0xAA, 0xFF. RGB is multiplied by <a href='#Color_Alpha'>Color_Alpha</a>
1196to generate <a href='undocumented#Premultiply'>Premultiplied</a> value 0x802B5580.
1197</div>
1198
1199#### Example Output
1200
1201~~~~
1202pixel = 802b5580
1203~~~~
1204
1205</fiddle-embed></div>
1206
1207### See Also
1208
1209<a href='#SkCanvas_peekPixels'>peekPixels</a> <a href='#SkCanvas_writePixels'>writePixels</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_readPixels'>readPixels</a> <a href='SkPixmap_Reference#SkPixmap'>SkPixmap</a>::<a href='#SkPixmap_readPixels'>readPixels</a> <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_readPixels'>readPixels</a> <a href='SkSurface_Reference#SkSurface'>SkSurface</a>::<a href='#SkSurface_readPixels'>readPixels</a>
1210
1211<a name='SkCanvas_writePixels'></a>
1212
1213---
1214
1215<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1216bool <a href='#SkCanvas_writePixels'>writePixels</a>(const <a href='SkImageInfo_Reference#SkImageInfo'>SkImageInfo</a>& info, const void* pixels, size_t rowBytes, int x, int y)
1217</pre>
1218
1219Copies <a href='SkRect_Reference#Rect'>Rect</a> from <a href='#SkCanvas_writePixels_pixels'>pixels</a> to <a href='SkCanvas_Reference#Canvas'>Canvas</a>. <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip are ignored.
1220Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkCanvas_writePixels_info'>info</a>.<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_writePixels_info'>info</a>.<a href='#SkImageInfo_height'>height()</a>).
1221Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkCanvas_writePixels_x'>x</a>, <a href='#SkCanvas_writePixels_y'>y</a>) and
1222(<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_height'>height()</a>).
1223
1224Copies each readable <a href='undocumented#Pixel'>pixel</a> intersecting both rectangles, without scaling,
1225converting to <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_colorType'>colorType</a>() and <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_alphaType'>alphaType</a>() if required.
1226
1227Pixels are writable when <a href='undocumented#Device'>Device</a> is raster, or backed by a GPU.
1228Pixels are not writable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>,
1229returned by <a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#Canvas'>Canvas</a> is the base of a utility
1230class like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
1231
1232<a href='undocumented#Pixel'>Pixel</a> values are converted only if <a href='#Image_Info_Color_Type'>Color_Type</a> and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a>
1233do not match. Only <a href='#SkCanvas_writePixels_pixels'>pixels</a> within both source and destination rectangles
1234are copied. <a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='#SkCanvas_writePixels_pixels'>pixels</a> outside <a href='SkRect_Reference#Rect'>Rect</a> intersection are unchanged.
1235
1236Pass negative values for <a href='#SkCanvas_writePixels_x'>x</a> or <a href='#SkCanvas_writePixels_y'>y</a> to offset <a href='#SkCanvas_writePixels_pixels'>pixels</a> to the left or
1237above <a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='#SkCanvas_writePixels_pixels'>pixels</a>.
1238
1239Does not copy, and returns false if:
1240
1241<table>  <tr>
1242    <td>Source and destination rectangles do not intersect.</td>
1243  </tr>  <tr>
1244    <td><a href='#SkCanvas_writePixels_pixels'>pixels</a> could not be converted to <a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_colorType'>colorType</a>() or
1245<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_alphaType'>alphaType</a>().</td>
1246  </tr>  <tr>
1247    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='#SkCanvas_writePixels_pixels'>pixels</a> are not writable; for instance, <a href='SkCanvas_Reference#Canvas'>Canvas</a> is document-based.</td>
1248  </tr>  <tr>
1249    <td><a href='#SkCanvas_writePixels_rowBytes'>rowBytes</a> is too small to contain one row of <a href='#SkCanvas_writePixels_pixels'>pixels</a>.</td>
1250  </tr>
1251</table>
1252
1253### Parameters
1254
1255<table>  <tr>    <td><a name='SkCanvas_writePixels_info'><code><strong>info</strong></code></a></td>
1256    <td>width, height, <a href='#Image_Info_Color_Type'>Color_Type</a>, and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a> of <a href='#SkCanvas_writePixels_pixels'>pixels</a></td>
1257  </tr>
1258  <tr>    <td><a name='SkCanvas_writePixels_pixels'><code><strong>pixels</strong></code></a></td>
1259    <td><a href='#SkCanvas_writePixels_pixels'>pixels</a> to copy, of <a href='undocumented#Size'>size</a> <a href='#SkCanvas_writePixels_info'>info</a>.<a href='#SkImageInfo_height'>height()</a> times <a href='#SkCanvas_writePixels_rowBytes'>rowBytes</a>, or larger</td>
1260  </tr>
1261  <tr>    <td><a name='SkCanvas_writePixels_rowBytes'><code><strong>rowBytes</strong></code></a></td>
1262    <td><a href='undocumented#Size'>size</a> of one row of <a href='#SkCanvas_writePixels_pixels'>pixels</a>; <a href='#SkCanvas_writePixels_info'>info</a>.<a href='#SkImageInfo_width'>width()</a> times <a href='undocumented#Pixel'>pixel</a> <a href='undocumented#Size'>size</a>, or larger</td>
1263  </tr>
1264  <tr>    <td><a name='SkCanvas_writePixels_x'><code><strong>x</strong></code></a></td>
1265    <td>offset into <a href='SkCanvas_Reference#Canvas'>Canvas</a> writable <a href='#SkCanvas_writePixels_pixels'>pixels</a> on x-axis; may be negative</td>
1266  </tr>
1267  <tr>    <td><a name='SkCanvas_writePixels_y'><code><strong>y</strong></code></a></td>
1268    <td>offset into <a href='SkCanvas_Reference#Canvas'>Canvas</a> writable <a href='#SkCanvas_writePixels_pixels'>pixels</a> on y-axis; may be negative</td>
1269  </tr>
1270</table>
1271
1272### Return Value
1273
1274true if <a href='#SkCanvas_writePixels_pixels'>pixels</a> were written to <a href='SkCanvas_Reference#Canvas'>Canvas</a>
1275
1276### Example
1277
1278<div><fiddle-embed name="29b98ebf58aa9fd1edfaabf9f4490b3a"></fiddle-embed></div>
1279
1280### See Also
1281
1282<a href='#SkCanvas_readPixels'>readPixels</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_writePixels'>writePixels</a>
1283
1284<a name='SkCanvas_writePixels_2'></a>
1285
1286---
1287
1288<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1289bool <a href='#SkCanvas_writePixels'>writePixels</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, int x, int y)
1290</pre>
1291
1292Copies <a href='SkRect_Reference#Rect'>Rect</a> from pixels to <a href='SkCanvas_Reference#Canvas'>Canvas</a>. <a href='SkMatrix_Reference#Matrix'>Matrix</a> and Clip are ignored.
1293Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkCanvas_writePixels_2_bitmap'>bitmap</a>.<a href='#SkBitmap_width'>width()</a>, <a href='#SkCanvas_writePixels_2_bitmap'>bitmap</a>.<a href='#SkBitmap_height'>height()</a>).
1294
1295Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkCanvas_writePixels_2_x'>x</a>, <a href='#SkCanvas_writePixels_2_y'>y</a>) and
1296(<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_width'>width()</a>, <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_height'>height()</a>).
1297
1298Copies each readable <a href='undocumented#Pixel'>pixel</a> intersecting both rectangles, without scaling,
1299converting to <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_colorType'>colorType</a>() and <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_alphaType'>alphaType</a>() if required.
1300
1301Pixels are writable when <a href='undocumented#Device'>Device</a> is raster, or backed by a GPU.
1302Pixels are not writable when <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> is returned by <a href='undocumented#SkDocument'>SkDocument</a>::<a href='#SkDocument_beginPage'>beginPage</a>,
1303returned by <a href='undocumented#SkPictureRecorder'>SkPictureRecorder</a>::<a href='#SkPictureRecorder_beginRecording'>beginRecording</a>, or <a href='SkCanvas_Reference#Canvas'>Canvas</a> is the base of a utility
1304class like <a href='undocumented#SkDebugCanvas'>SkDebugCanvas</a>.
1305
1306<a href='undocumented#Pixel'>Pixel</a> values are converted only if <a href='#Image_Info_Color_Type'>Color_Type</a> and <a href='#Image_Info_Alpha_Type'>Alpha_Type</a>
1307do not match. Only pixels within both source and destination rectangles
1308are copied. <a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels outside <a href='SkRect_Reference#Rect'>Rect</a> intersection are unchanged.
1309
1310Pass negative values for <a href='#SkCanvas_writePixels_2_x'>x</a> or <a href='#SkCanvas_writePixels_2_y'>y</a> to offset pixels to the left or
1311above <a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels.
1312
1313Does not copy, and returns false if:
1314
1315<table>  <tr>
1316    <td>Source and destination rectangles do not intersect.</td>
1317  </tr>  <tr>
1318    <td><a href='#SkCanvas_writePixels_2_bitmap'>bitmap</a> does not have allocated pixels.</td>
1319  </tr>  <tr>
1320    <td><a href='SkBitmap_Reference#Bitmap_Pixels'>bitmap pixels</a> could not be converted to <a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_colorType'>colorType</a>() or
1321<a href='#SkCanvas_imageInfo'>imageInfo</a>().<a href='#SkImageInfo_alphaType'>alphaType</a>().</td>
1322  </tr>  <tr>
1323    <td><a href='SkCanvas_Reference#Canvas'>Canvas</a> pixels are not writable; for instance, <a href='SkCanvas_Reference#Canvas'>Canvas</a> is <a href='undocumented#Document'>document</a> based.</td>
1324  </tr>  <tr>
1325    <td><a href='SkBitmap_Reference#Bitmap_Pixels'>bitmap pixels</a> are inaccessible; for instance, <a href='#SkCanvas_writePixels_2_bitmap'>bitmap</a> wraps a <a href='undocumented#Texture'>texture</a>.</td>
1326  </tr>
1327</table>
1328
1329### Parameters
1330
1331<table>  <tr>    <td><a name='SkCanvas_writePixels_2_bitmap'><code><strong>bitmap</strong></code></a></td>
1332    <td>contains pixels copied to <a href='SkCanvas_Reference#Canvas'>Canvas</a></td>
1333  </tr>
1334  <tr>    <td><a name='SkCanvas_writePixels_2_x'><code><strong>x</strong></code></a></td>
1335    <td>offset into <a href='SkCanvas_Reference#Canvas'>Canvas</a> writable pixels in <a href='#SkCanvas_writePixels_2_x'>x</a>; may be negative</td>
1336  </tr>
1337  <tr>    <td><a name='SkCanvas_writePixels_2_y'><code><strong>y</strong></code></a></td>
1338    <td>offset into <a href='SkCanvas_Reference#Canvas'>Canvas</a> writable pixels in <a href='#SkCanvas_writePixels_2_y'>y</a>; may be negative</td>
1339  </tr>
1340</table>
1341
1342### Return Value
1343
1344true if pixels were written to <a href='SkCanvas_Reference#Canvas'>Canvas</a>
1345
1346### Example
1347
1348<div><fiddle-embed name="8b128e067881f9251357653692fa28da"></fiddle-embed></div>
1349
1350### See Also
1351
1352<a href='#SkCanvas_readPixels'>readPixels</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_writePixels'>writePixels</a>
1353
1354<a name='State_Stack'></a>
1355
1356---
1357
1358<a href='SkCanvas_Reference#Canvas'>Canvas</a> maintains a stack of state that allows hierarchical drawing, commonly used
1359to implement windows and views. The initial state has an identity <a href='SkMatrix_Reference#Matrix'>matrix</a> and and
1360an infinite clip. Even with a wide-open clip, drawing is constrained by the
1361bounds of the <a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='SkSurface_Reference#Surface'>Surface</a> or <a href='undocumented#Device'>Device</a>.
1362
1363<a href='SkCanvas_Reference#Canvas'>Canvas</a> savable state consists of Clip and <a href='SkMatrix_Reference#Matrix'>Matrix</a>.
1364Clip describes the area that may be drawn to.
1365<a href='SkMatrix_Reference#Matrix'>Matrix</a> transforms the geometry.
1366
1367<a href='#SkCanvas_save'>save()</a>, <a href='#SkCanvas_saveLayer'>saveLayer</a>, <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a>, and <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>
1368save state and return the depth of the stack.
1369
1370<a href='#SkCanvas_restore'>restore()</a>, <a href='#SkCanvas_restoreToCount'>restoreToCount</a>, and <a href='#SkCanvas_destructor'>~SkCanvas()</a> revert state to its value when saved.
1371
1372Each state on the stack intersects Clip with the previous Clip,
1373and concatenates <a href='SkMatrix_Reference#Matrix'>Matrix</a> with the previous <a href='SkMatrix_Reference#Matrix'>Matrix</a>.
1374The intersected Clip makes the drawing area the same or smaller;
1375the concatenated <a href='SkMatrix_Reference#Matrix'>Matrix</a> may move the origin and potentially scale or rotate
1376the coordinate space.
1377
1378<a href='SkCanvas_Reference#Canvas'>Canvas</a> does not require balancing the  <a href='#State_Stack'>state stack</a> but it is a good idea
1379to do so. Calling <a href='#SkCanvas_save'>save()</a> without <a href='#SkCanvas_restore'>restore()</a> will eventually cause Skia to fail;
1380mismatched <a href='#SkCanvas_save'>save()</a> and <a href='#SkCanvas_restore'>restore()</a> create hard to find bugs.
1381
1382It is not possible to use state to draw outside of the clip defined by the
1383previous state.
1384
1385### Example
1386
1387<div><fiddle-embed name="bb1dbfdca3aedf716beb6f07e2aab065"><div>Draw to ever smaller clips; then restore drawing to full <a href='SkCanvas_Reference#Canvas'>canvas</a>.
1388Note that the second <a href='#SkCanvas_clipRect'>clipRect</a> is not permitted to enlarge Clip.
1389</div></fiddle-embed></div>
1390
1391Each Clip uses the current <a href='SkMatrix_Reference#Matrix'>Matrix</a> for its coordinates.
1392
1393### Example
1394
1395<div><fiddle-embed name="9f563a2d60aa31d4b26742e5aa17aa4e"><div>While <a href='#SkCanvas_clipRect'>clipRect</a> is given the same rectangle twice, <a href='SkMatrix_Reference#Matrix'>Matrix</a> makes the second
1396<a href='#SkCanvas_clipRect'>clipRect</a> draw at half the <a href='undocumented#Size'>size</a> of the first.
1397</div></fiddle-embed></div>
1398
1399### See Also
1400
1401<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_restore'>restore()</a> <a href='#SkCanvas_restoreToCount'>restoreToCount</a>
1402
1403<a name='SkCanvas_save'></a>
1404
1405---
1406
1407<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1408int <a href='#SkCanvas_save'>save()</a>
1409</pre>
1410
1411Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip.
1412Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip,
1413restoring the <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip to their state when <a href='#SkCanvas_save'>save()</a> was called.
1414
1415<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>, <a href='#SkCanvas_setMatrix'>setMatrix</a>(),
1416and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(), <a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
1417
1418Saved <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> state is put on a stack; multiple calls to <a href='#SkCanvas_save'>save()</a> should be balance
1419by an equal number of calls to <a href='#SkCanvas_restore'>restore()</a>.
1420
1421Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with result to restore this and subsequent saves.
1422
1423### Return Value
1424
1425depth of saved stack
1426
1427### Example
1428
1429<div><fiddle-embed name="e477dce358a9ba3b0aa1bf33b8a376de"><div>The black square is translated 50 pixels down and to the right.
1430Restoring <a href='SkCanvas_Reference#Canvas'>Canvas</a> state removes <a href='#SkCanvas_translate'>translate()</a> from <a href='SkCanvas_Reference#Canvas'>Canvas</a> stack;
1431the red square is not translated, and is drawn at the origin.
1432</div></fiddle-embed></div>
1433
1434### See Also
1435
1436<a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_restoreToCount'>restoreToCount</a>
1437
1438<a name='SkCanvas_restore'></a>
1439
1440---
1441
1442<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1443void <a href='#SkCanvas_restore'>restore()</a>
1444</pre>
1445
1446Removes changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip since <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> state was
1447last saved. The state is removed from the stack.
1448
1449Does nothing if the stack is empty.
1450
1451### Example
1452
1453<div><fiddle-embed name="e78471212a67f2f4fd39496e17a30d17"></fiddle-embed></div>
1454
1455### See Also
1456
1457<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_restoreToCount'>restoreToCount</a>
1458
1459<a name='SkCanvas_getSaveCount'></a>
1460
1461---
1462
1463<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1464int <a href='#SkCanvas_getSaveCount'>getSaveCount</a>()const
1465</pre>
1466
1467Returns the number of saved states, each containing: <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip.
1468Equals the number of <a href='#SkCanvas_save'>save()</a> calls less the number of <a href='#SkCanvas_restore'>restore()</a> calls plus one.
1469The save count of a new <a href='SkCanvas_Reference#Canvas'>canvas</a> is one.
1470
1471### Return Value
1472
1473depth of save state stack
1474
1475### Example
1476
1477<div><fiddle-embed name="005f2b207e078baac596681924fe591e">
1478
1479#### Example Output
1480
1481~~~~
1482depth = 1
1483depth = 2
1484depth = 1
1485~~~~
1486
1487</fiddle-embed></div>
1488
1489### See Also
1490
1491<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_restoreToCount'>restoreToCount</a>
1492
1493<a name='SkCanvas_restoreToCount'></a>
1494
1495---
1496
1497<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1498void <a href='#SkCanvas_restoreToCount'>restoreToCount</a>(int saveCount)
1499</pre>
1500
1501Restores state to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip values when <a href='#SkCanvas_save'>save()</a>, <a href='#SkCanvas_saveLayer'>saveLayer</a>(),
1502<a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a>(), or <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>() returned <a href='#SkCanvas_restoreToCount_saveCount'>saveCount</a>.
1503
1504Does nothing if <a href='#SkCanvas_restoreToCount_saveCount'>saveCount</a> is greater than  <a href='#State_Stack'>state stack</a> count.
1505Restores state to initial values if <a href='#SkCanvas_restoreToCount_saveCount'>saveCount</a> is less than or equal to one.
1506
1507### Parameters
1508
1509<table>  <tr>    <td><a name='SkCanvas_restoreToCount_saveCount'><code><strong>saveCount</strong></code></a></td>
1510    <td>depth of  <a href='#State_Stack'>state stack</a> to restore</td>
1511  </tr>
1512</table>
1513
1514### Example
1515
1516<div><fiddle-embed name="9ed0d56436e114c7097fd49eed1aea47">
1517
1518#### Example Output
1519
1520~~~~
1521depth = 1
1522depth = 3
1523depth = 1
1524~~~~
1525
1526</fiddle-embed></div>
1527
1528### See Also
1529
1530<a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_getSaveCount'>getSaveCount</a> <a href='#SkCanvas_save'>save</a>
1531
1532<a name='Layer'></a>
1533
1534<a href='SkCanvas_Reference#Layer'>Layer</a> allocates a temporary <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> to draw into. When the drawing is
1535complete, the <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> is drawn into the <a href='SkCanvas_Reference#Canvas'>Canvas</a>.
1536
1537<a href='SkCanvas_Reference#Layer'>Layer</a> is saved in a stack along with other saved state. When state with a <a href='SkCanvas_Reference#Layer'>Layer</a>
1538is restored, the <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> is drawn into the previous <a href='SkCanvas_Reference#Layer'>Layer</a>.
1539
1540<a href='SkCanvas_Reference#Layer'>Layer</a> may be initialized with the contents of the previous <a href='SkCanvas_Reference#Layer'>Layer</a>. When <a href='SkCanvas_Reference#Layer'>Layer</a> is
1541restored, its <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> can be modified by <a href='SkPaint_Reference#Paint'>Paint</a> passed to <a href='SkCanvas_Reference#Layer'>Layer</a> to apply
1542<a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>, and <a href='#Blend_Mode'>Blend_Mode</a>.
1543
1544<a name='SkCanvas_saveLayer'></a>
1545
1546---
1547
1548<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1549int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
1550</pre>
1551
1552Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and allocates a <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> for subsequent drawing.
1553Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and draws the <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>.
1554
1555<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>,
1556<a href='#SkCanvas_setMatrix'>setMatrix</a>(), and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(),
1557<a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
1558
1559<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_saveLayer_bounds'>bounds</a> suggests but does not define the <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> <a href='undocumented#Size'>size</a>. To clip drawing to
1560a specific rectangle, use <a href='#SkCanvas_clipRect'>clipRect</a>().
1561
1562Optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_saveLayer_paint'>paint</a> applies <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and
1563<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> when <a href='#SkCanvas_restore'>restore()</a> is called.
1564
1565Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with returned value to restore this and subsequent saves.
1566
1567### Parameters
1568
1569<table>  <tr>    <td><a name='SkCanvas_saveLayer_bounds'><code><strong>bounds</strong></code></a></td>
1570    <td>hint to limit the <a href='undocumented#Size'>size</a> of the <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1571  </tr>
1572  <tr>    <td><a name='SkCanvas_saveLayer_paint'><code><strong>paint</strong></code></a></td>
1573    <td>graphics state for <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1574  </tr>
1575</table>
1576
1577### Return Value
1578
1579depth of saved stack
1580
1581### Example
1582
1583<div><fiddle-embed name="42318b18d403e17e07a541652da91ee2"><div>Rectangles are blurred by <a href='#Image_Filter'>Image_Filter</a> when <a href='#SkCanvas_restore'>restore()</a> draws <a href='SkCanvas_Reference#Layer'>Layer</a> to main
1584<a href='SkCanvas_Reference#Canvas'>Canvas</a>.
1585</div></fiddle-embed></div>
1586
1587### See Also
1588
1589<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1590
1591<a name='SkCanvas_saveLayer_2'></a>
1592
1593---
1594
1595<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1596int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
1597</pre>
1598
1599Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and allocates a <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> for subsequent drawing.
1600Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and draws the <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>.
1601
1602<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>,
1603<a href='#SkCanvas_setMatrix'>setMatrix</a>(), and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(),
1604<a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
1605
1606<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_saveLayer_2_bounds'>bounds</a> suggests but does not define the <a href='SkCanvas_Reference#Layer'>layer</a> <a href='undocumented#Size'>size</a>. To clip drawing to
1607a specific rectangle, use <a href='#SkCanvas_clipRect'>clipRect</a>().
1608
1609Optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_saveLayer_2_paint'>paint</a> applies <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and
1610<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> when <a href='#SkCanvas_restore'>restore()</a> is called.
1611
1612Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with returned value to restore this and subsequent saves.
1613
1614### Parameters
1615
1616<table>  <tr>    <td><a name='SkCanvas_saveLayer_2_bounds'><code><strong>bounds</strong></code></a></td>
1617    <td>hint to limit the <a href='undocumented#Size'>size</a> of <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1618  </tr>
1619  <tr>    <td><a name='SkCanvas_saveLayer_2_paint'><code><strong>paint</strong></code></a></td>
1620    <td>graphics state for <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1621  </tr>
1622</table>
1623
1624### Return Value
1625
1626depth of saved stack
1627
1628### Example
1629
1630<div><fiddle-embed name="a17aec3aa4909527be039e26a7eda694"><div>Rectangles are blurred by <a href='#Image_Filter'>Image_Filter</a> when <a href='#SkCanvas_restore'>restore()</a> draws <a href='SkCanvas_Reference#Layer'>Layer</a> to main <a href='SkCanvas_Reference#Canvas'>Canvas</a>.
1631The red rectangle is clipped; it does not fully fit on <a href='SkCanvas_Reference#Layer'>Layer</a>.
1632<a href='#Image_Filter'>Image_Filter</a> blurs past edge of <a href='SkCanvas_Reference#Layer'>Layer</a> so red rectangle is blurred on all sides.
1633</div></fiddle-embed></div>
1634
1635### See Also
1636
1637<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1638
1639<a name='SkCanvas_saveLayerPreserveLCDTextRequests'></a>
1640
1641---
1642
1643<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1644int <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
1645</pre>
1646
1647Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and allocates a <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> for subsequent drawing.
1648LCD <a href='undocumented#Text'>text</a> is preserved when the <a href='SkCanvas_Reference#Layer'>layer</a> is drawn to the prior <a href='SkCanvas_Reference#Layer'>layer</a>.
1649
1650Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and draws <a href='SkCanvas_Reference#Layer'>layer</a>.
1651
1652<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>,
1653<a href='#SkCanvas_setMatrix'>setMatrix</a>(), and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(),
1654<a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
1655
1656<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests_bounds'>bounds</a> suggests but does not define the <a href='SkCanvas_Reference#Layer'>layer</a> <a href='undocumented#Size'>size</a>. To clip drawing to
1657a specific rectangle, use <a href='#SkCanvas_clipRect'>clipRect</a>().
1658
1659Optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests_paint'>paint</a> applies <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and
1660<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> when <a href='#SkCanvas_restore'>restore()</a> is called.
1661
1662Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with returned value to restore this and subsequent saves.
1663
1664Draw <a href='undocumented#Text'>text</a> on an opaque background so that LCD <a href='undocumented#Text'>text</a> blends correctly with the
1665prior <a href='SkCanvas_Reference#Layer'>layer</a>. LCD <a href='undocumented#Text'>text</a> drawn on a background with transparency may result in
1666incorrect blending.
1667
1668### Parameters
1669
1670<table>  <tr>    <td><a name='SkCanvas_saveLayerPreserveLCDTextRequests_bounds'><code><strong>bounds</strong></code></a></td>
1671    <td>hint to limit the <a href='undocumented#Size'>size</a> of <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1672  </tr>
1673  <tr>    <td><a name='SkCanvas_saveLayerPreserveLCDTextRequests_paint'><code><strong>paint</strong></code></a></td>
1674    <td>graphics state for <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1675  </tr>
1676</table>
1677
1678### Return Value
1679
1680depth of saved stack
1681
1682### Example
1683
1684<div><fiddle-embed name="8460bf8b013f46c67e0bd96e13451aff"></fiddle-embed></div>
1685
1686### See Also
1687
1688<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1689
1690<a name='SkCanvas_saveLayerAlpha'></a>
1691
1692---
1693
1694<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1695int <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, <a href='undocumented#U8CPU'>U8CPU</a> <a href='SkColor_Reference#Alpha'>alpha</a>)
1696</pre>
1697
1698Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and allocates <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> for subsequent drawing.
1699
1700Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip,
1701and blends <a href='SkCanvas_Reference#Layer'>layer</a> with <a href='#SkCanvas_saveLayerAlpha_alpha'>alpha</a> opacity onto prior <a href='SkCanvas_Reference#Layer'>layer</a>.
1702
1703<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>,
1704<a href='#SkCanvas_setMatrix'>setMatrix</a>(), and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(),
1705<a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
1706
1707<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_saveLayerAlpha_bounds'>bounds</a> suggests but does not define <a href='SkCanvas_Reference#Layer'>layer</a> <a href='undocumented#Size'>size</a>. To clip drawing to
1708a specific rectangle, use <a href='#SkCanvas_clipRect'>clipRect</a>().
1709
1710<a href='#SkCanvas_saveLayerAlpha_alpha'>alpha</a> of zero is fully transparent, 255 is fully opaque.
1711
1712Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with returned value to restore this and subsequent saves.
1713
1714### Parameters
1715
1716<table>  <tr>    <td><a name='SkCanvas_saveLayerAlpha_bounds'><code><strong>bounds</strong></code></a></td>
1717    <td>hint to limit the <a href='undocumented#Size'>size</a> of <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1718  </tr>
1719  <tr>    <td><a name='SkCanvas_saveLayerAlpha_alpha'><code><strong>alpha</strong></code></a></td>
1720    <td>opacity of <a href='SkCanvas_Reference#Layer'>layer</a></td>
1721  </tr>
1722</table>
1723
1724### Return Value
1725
1726depth of saved stack
1727
1728### Example
1729
1730<div><fiddle-embed name="8ab88d86fb438856cc48d6e2f08a6e24"></fiddle-embed></div>
1731
1732### See Also
1733
1734<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1735
1736<a name='SkCanvas_SaveLayerFlagsSet'></a>
1737
1738---
1739
1740<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
1741    enum <a href='#SkCanvas_SaveLayerFlagsSet'>SaveLayerFlagsSet</a> {
1742        <a href='#SkCanvas_kPreserveLCDText_SaveLayerFlag'>kPreserveLCDText_SaveLayerFlag</a> = 1 << 1,
1743        <a href='#SkCanvas_kInitWithPrevious_SaveLayerFlag'>kInitWithPrevious_SaveLayerFlag</a> = 1 << 2,
1744    };
1745
1746</pre>
1747
1748<a name='SkCanvas_SaveLayerFlags'></a>
1749
1750---
1751
1752<a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> provides options that may be used in any combination in <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>,
1753defining how <a href='SkCanvas_Reference#Layer'>Layer</a> allocated by <a href='#SkCanvas_saveLayer'>saveLayer</a> operates. It may be set to zero,
1754<a href='#SkCanvas_kPreserveLCDText_SaveLayerFlag'>kPreserveLCDText_SaveLayerFlag</a>, <a href='#SkCanvas_kInitWithPrevious_SaveLayerFlag'>kInitWithPrevious_SaveLayerFlag</a>, or both flags.
1755
1756### Constants
1757
1758<table style='border-collapse: collapse; width: 62.5em'>
1759  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
1760<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
1761<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
1762  <tr style='background-color: #f0f0f0; '>
1763    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kPreserveLCDText_SaveLayerFlag'><code>SkCanvas::kPreserveLCDText_SaveLayerFlag</code></a></td>
1764    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
1765    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1766Creates <a href='SkCanvas_Reference#Layer'>Layer</a> for LCD <a href='undocumented#Text'>text</a>. Flag is ignored if <a href='SkCanvas_Reference#Layer'>Layer</a> <a href='SkPaint_Reference#Paint'>Paint</a> contains
1767<a href='#Image_Filter'>Image_Filter</a> or <a href='#Color_Filter'>Color_Filter</a>.
1768</td>
1769  </tr>
1770  <tr>
1771    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kInitWithPrevious_SaveLayerFlag'><code>SkCanvas::kInitWithPrevious_SaveLayerFlag</code></a></td>
1772    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>4</td>
1773    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1774Initializes <a href='SkCanvas_Reference#Layer'>Layer</a> with the contents of the previous <a href='SkCanvas_Reference#Layer'>Layer</a>.
1775</td>
1776  </tr>
1777</table>
1778
1779### Example
1780
1781<div><fiddle-embed name="05db6a937225e8e31ae3481173d25dae"><div><a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='SkCanvas_Reference#Layer'>Layer</a> captures red and blue <a href='undocumented#Circle'>circles</a> scaled up by four.
1782scalePaint blends <a href='SkCanvas_Reference#Layer'>Layer</a> back with transparency.
1783</div></fiddle-embed></div>
1784
1785### See Also
1786
1787<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a> <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1788
1789<a name='Layer_SaveLayerRec'></a>
1790
1791<a name='SkCanvas_SaveLayerRec'></a>
1792
1793---
1794
1795<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
1796    struct <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> {
1797
1798        <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec()</a>;
1799        <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags = 0);
1800        <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
1801                     <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags);
1802
1803        const <a href='SkRect_Reference#SkRect'>SkRect</a>* <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a> = nullptr;
1804        const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a> = nullptr;
1805        const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> = nullptr;
1806        const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a> = nullptr;
1807        const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='#SkCanvas_SaveLayerRec_fClipMatrix'>fClipMatrix</a> = nullptr;
1808        <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a> = 0;
1809    };
1810
1811</pre>
1812
1813<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> contains the state used to create the <a href='SkCanvas_Reference#Layer'>Layer</a>.<table style='border-collapse: collapse; width: 62.5em'>
1814
1815  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Type</th>
1816<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Member</th>
1817<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
1818  <tr style='background-color: #f0f0f0; '>
1819    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkRect*</td>
1820    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fBounds'><code>fBounds</code></a></td>
1821    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1822<a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a> is used as a hint to limit the <a href='undocumented#Size'>size</a> of <a href='SkCanvas_Reference#Layer'>Layer</a>; may be nullptr.
1823<a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a> suggests but does not define <a href='SkCanvas_Reference#Layer'>Layer</a> <a href='undocumented#Size'>size</a>. To clip drawing to
1824a specific rectangle, use <a href='#SkCanvas_clipRect'>clipRect</a>.
1825</td>
1826  </tr>
1827  <tr>
1828    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkPaint*</td>
1829    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fPaint'><code>fPaint</code></a></td>
1830    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1831<a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a> modifies how <a href='SkCanvas_Reference#Layer'>Layer</a> overlays the prior <a href='SkCanvas_Reference#Layer'>Layer</a>; may be nullptr.
1832<a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Draw_Looper'>Draw_Looper</a>, <a href='#Image_Filter'>Image_Filter</a>, and
1833<a href='#Mask_Filter'>Mask_Filter</a> affect <a href='SkCanvas_Reference#Layer'>Layer</a> draw.
1834</td>
1835  </tr>
1836  <tr style='background-color: #f0f0f0; '>
1837    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkImageFilter*</td>
1838    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fBackdrop'><code>fBackdrop</code></a></td>
1839    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1840<a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> applies <a href='#Image_Filter'>Image_Filter</a> to the prior <a href='SkCanvas_Reference#Layer'>Layer</a> when copying to the <a href='SkCanvas_Reference#Layer'>Layer</a>;
1841may be nullptr. Use <a href='#SkCanvas_kInitWithPrevious_SaveLayerFlag'>kInitWithPrevious_SaveLayerFlag</a> to copy the
1842prior <a href='SkCanvas_Reference#Layer'>Layer</a> without an <a href='#Image_Filter'>Image_Filter</a>.
1843</td>
1844  </tr>
1845  <tr>
1846    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkImage*</td>
1847    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fClipMask'><code>fClipMask</code></a></td>
1848    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1849<a href='#SkCanvas_restore'>restore()</a> clips <a href='SkCanvas_Reference#Layer'>Layer</a> by the <a href='#Color_Alpha'>Color_Alpha</a> channel of <a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a> when
1850<a href='SkCanvas_Reference#Layer'>Layer</a> is copied to <a href='undocumented#Device'>Device</a>. <a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a> may be nullptr.    .
1851</td>
1852  </tr>
1853  <tr style='background-color: #f0f0f0; '>
1854    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkMatrix*</td>
1855    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fClipMatrix'><code>fClipMatrix</code></a></td>
1856    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1857<a href='#SkCanvas_SaveLayerRec_fClipMatrix'>fClipMatrix</a> transforms <a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a> before it clips <a href='SkCanvas_Reference#Layer'>Layer</a>. If
1858<a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a> describes a translucent gradient, it may be scaled and rotated
1859without introducing artifacts. <a href='#SkCanvas_SaveLayerRec_fClipMatrix'>fClipMatrix</a> may be nullptr.
1860</td>
1861  </tr>
1862  <tr>
1863    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>SaveLayerFlags</td>
1864    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_SaveLayerRec_fSaveLayerFlags'><code>fSaveLayerFlags</code></a></td>
1865    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
1866<a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a> are used to create <a href='SkCanvas_Reference#Layer'>Layer</a> without transparency,
1867create <a href='SkCanvas_Reference#Layer'>Layer</a> for LCD <a href='undocumented#Text'>text</a>, and to create <a href='SkCanvas_Reference#Layer'>Layer</a> with the
1868contents of the previous <a href='SkCanvas_Reference#Layer'>Layer</a>.
1869</td>
1870  </tr>
1871</table>
1872
1873### Example
1874
1875<div><fiddle-embed name="ee8c0b120234e27364f8c9a786cf8f89"><div><a href='SkCanvas_Reference#Canvas'>Canvas</a> <a href='SkCanvas_Reference#Layer'>Layer</a> captures a red <a href='#Paint_Anti_Alias'>Anti_Aliased</a> <a href='undocumented#Circle'>circle</a> and a blue <a href='undocumented#Alias'>Aliased</a> <a href='undocumented#Circle'>circle</a> scaled
1876up by four. After drawing another red <a href='undocumented#Circle'>circle</a> without scaling on top, the <a href='SkCanvas_Reference#Layer'>Layer</a> is
1877transferred to the main <a href='SkCanvas_Reference#Canvas'>canvas</a>.
1878</div></fiddle-embed></div>
1879
1880<a name='Layer_SaveLayerRec_Constructors'></a>
1881
1882<a name='SkCanvas_SaveLayerRec_SaveLayerRec'></a>
1883
1884---
1885
1886<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1887<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec()</a>
1888</pre>
1889
1890Sets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, and <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> to nullptr. Clears <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>.
1891
1892### Return Value
1893
1894empty <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>
1895
1896### Example
1897
1898<div><fiddle-embed name="b5cea1eed80a0eb04ddbab3f36dff73f">
1899
1900#### Example Output
1901
1902~~~~
1903rec1 == rec2
1904~~~~
1905
1906</fiddle-embed></div>
1907
1908### See Also
1909
1910<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>
1911
1912<a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star'></a>
1913
1914---
1915
1916<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1917<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags = 0)
1918</pre>
1919
1920Sets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, and <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>; sets <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> to nullptr.
1921
1922### Parameters
1923
1924<table>  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_bounds'><code><strong>bounds</strong></code></a></td>
1925    <td><a href='SkCanvas_Reference#Layer'>layer</a> dimensions; may be nullptr</td>
1926  </tr>
1927  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_paint'><code><strong>paint</strong></code></a></td>
1928    <td>applied to <a href='SkCanvas_Reference#Layer'>layer</a> when overlaying prior <a href='SkCanvas_Reference#Layer'>layer</a>; may be nullptr</td>
1929  </tr>
1930  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
1931    <td><a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> options to modify <a href='SkCanvas_Reference#Layer'>layer</a></td>
1932  </tr>
1933</table>
1934
1935### Return Value
1936
1937<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> with empty <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a>
1938
1939### Example
1940
1941<div><fiddle-embed name="027f920259888fc19591ea9a90d92873">
1942
1943#### Example Output
1944
1945~~~~
1946rec1 == rec2
1947~~~~
1948
1949</fiddle-embed></div>
1950
1951### See Also
1952
1953<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>
1954
1955<a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star'></a>
1956
1957---
1958
1959<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
1960<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
1961             <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags)
1962</pre>
1963
1964Sets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a>, and <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>.
1965
1966### Parameters
1967
1968<table>  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_bounds'><code><strong>bounds</strong></code></a></td>
1969    <td><a href='SkCanvas_Reference#Layer'>layer</a> dimensions; may be nullptr</td>
1970  </tr>
1971  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_paint'><code><strong>paint</strong></code></a></td>
1972    <td>applied to <a href='SkCanvas_Reference#Layer'>layer</a> when overlaying prior <a href='SkCanvas_Reference#Layer'>layer</a>;</td>
1973  </tr>
1974</table>
1975
1976may be nullptr
1977
1978### Parameters
1979
1980<table>  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_backdrop'><code><strong>backdrop</strong></code></a></td>
1981    <td>prior <a href='SkCanvas_Reference#Layer'>layer</a> copied with <a href='undocumented#SkImageFilter'>SkImageFilter</a>; may be nullptr</td>
1982  </tr>
1983  <tr>    <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
1984    <td><a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> options to modify <a href='SkCanvas_Reference#Layer'>layer</a></td>
1985  </tr>
1986</table>
1987
1988### Return Value
1989
1990<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> fully specified
1991
1992### Example
1993
1994<div><fiddle-embed name="9b7fa2fe855642ffff6538829db15328">
1995
1996#### Example Output
1997
1998~~~~
1999rec1 == rec2
2000~~~~
2001
2002</fiddle-embed></div>
2003
2004### See Also
2005
2006<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>
2007
2008<a name='SkCanvas_saveLayer_3'></a>
2009
2010---
2011
2012<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2013int <a href='#SkCanvas_saveLayer'>saveLayer</a>(const <a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a>& layerRec)
2014</pre>
2015
2016Saves <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip, and allocates <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> for subsequent drawing.
2017
2018Calling <a href='#SkCanvas_restore'>restore()</a> discards changes to <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and clip,
2019and blends <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> with <a href='SkColor_Reference#Alpha'>alpha</a> opacity onto the prior <a href='SkCanvas_Reference#Layer'>layer</a>.
2020
2021<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> may be changed by <a href='#SkCanvas_translate'>translate()</a>, <a href='#SkCanvas_scale'>scale()</a>, <a href='#SkCanvas_rotate'>rotate()</a>, <a href='#SkCanvas_skew'>skew()</a>, <a href='#SkCanvas_concat'>concat()</a>,
2022<a href='#SkCanvas_setMatrix'>setMatrix</a>(), and <a href='#SkCanvas_resetMatrix'>resetMatrix</a>(). Clip may be changed by <a href='#SkCanvas_clipRect'>clipRect</a>(), <a href='#SkCanvas_clipRRect'>clipRRect</a>(),
2023<a href='#SkCanvas_clipPath'>clipPath</a>(), <a href='#SkCanvas_clipRegion'>clipRegion</a>().
2024
2025<a href='#SkCanvas_SaveLayerRec'>SaveLayerRec</a> contains the state used to create the <a href='SkCanvas_Reference#Layer'>layer</a>.
2026
2027Call <a href='#SkCanvas_restoreToCount'>restoreToCount</a>() with returned value to restore this and subsequent saves.
2028
2029### Parameters
2030
2031<table>  <tr>    <td><a name='SkCanvas_saveLayer_3_layerRec'><code><strong>layerRec</strong></code></a></td>
2032    <td><a href='SkCanvas_Reference#Layer'>layer</a> state</td>
2033  </tr>
2034</table>
2035
2036### Return Value
2037
2038depth of save  <a href='#State_Stack'>state stack</a> before this call was made.
2039
2040### Example
2041
2042<div><fiddle-embed name="7d3751e82d1b6ec328ffa3d6f48ca831"><div>The example draws an <a href='SkImage_Reference#Image'>image</a>, and saves it into a <a href='SkCanvas_Reference#Layer'>Layer</a> with <a href='#SkCanvas_kInitWithPrevious_SaveLayerFlag'>kInitWithPrevious_SaveLayerFlag</a>.
2043Next it punches a hole in <a href='SkCanvas_Reference#Layer'>Layer</a> and restore with <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>::<a href='#SkBlendMode_kPlus'>kPlus</a>.
2044Where <a href='SkCanvas_Reference#Layer'>Layer</a> was cleared, the original <a href='SkImage_Reference#Image'>image</a> will draw unchanged.
2045Outside of the <a href='undocumented#Circle'>circle</a> the mandrill is brightened.
2046</div></fiddle-embed></div>
2047
2048### See Also
2049
2050<a href='#SkCanvas_save'>save</a> <a href='#SkCanvas_restore'>restore</a> <a href='#SkCanvas_saveLayer'>saveLayer</a> <a href='#SkCanvas_saveLayerPreserveLCDTextRequests'>saveLayerPreserveLCDTextRequests</a> <a href='#SkCanvas_saveLayerAlpha'>saveLayerAlpha</a>
2051
2052<a name='Matrix'></a>
2053
2054<a name='SkCanvas_translate'></a>
2055
2056---
2057
2058<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2059void translate(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy)
2060</pre>
2061
2062Translates <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> by <a href='#SkCanvas_translate_dx'>dx</a> along the x-axis and <a href='#SkCanvas_translate_dy'>dy</a> along the y-axis.
2063
2064Mathematically, replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with a translation <a href='SkMatrix_Reference#Matrix'>matrix</a>
2065<a href='undocumented#Premultiply'>premultiplied</a> with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2066
2067This has the effect of moving the drawing by (<a href='#SkCanvas_translate_dx'>dx</a>, <a href='#SkCanvas_translate_dy'>dy</a>) before transforming
2068the result with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2069
2070### Parameters
2071
2072<table>  <tr>    <td><a name='SkCanvas_translate_dx'><code><strong>dx</strong></code></a></td>
2073    <td>distance to translate on x-axis</td>
2074  </tr>
2075  <tr>    <td><a name='SkCanvas_translate_dy'><code><strong>dy</strong></code></a></td>
2076    <td>distance to translate on y-axis</td>
2077  </tr>
2078</table>
2079
2080### Example
2081
2082<div><fiddle-embed name="eb93d5fa66a5f7a10f4f9210494d7222"><div><a href='#SkCanvas_scale'>scale()</a> followed by <a href='#SkCanvas_translate'>translate()</a> produces different results from <a href='#SkCanvas_translate'>translate()</a> followed
2083by <a href='#SkCanvas_scale'>scale()</a>.
2084
2085The blue stroke follows translate of (50, 50); a black
2086fill follows scale of (2, 1/2.f). After restoring the clip, which resets
2087<a href='SkMatrix_Reference#Matrix'>Matrix</a>, a red frame follows the same scale of (2, 1/2.f); a gray fill
2088follows translate of (50, 50).
2089</div></fiddle-embed></div>
2090
2091### See Also
2092
2093<a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_skew'>skew()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2094
2095<a name='SkCanvas_scale'></a>
2096
2097---
2098
2099<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2100void scale(<a href='undocumented#SkScalar'>SkScalar</a> sx, <a href='undocumented#SkScalar'>SkScalar</a> sy)
2101</pre>
2102
2103Scales <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> by <a href='#SkCanvas_scale_sx'>sx</a> on the x-axis and <a href='#SkCanvas_scale_sy'>sy</a> on the y-axis.
2104
2105Mathematically, replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with a scale <a href='SkMatrix_Reference#Matrix'>matrix</a>
2106<a href='undocumented#Premultiply'>premultiplied</a> with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2107
2108This has the effect of scaling the drawing by (<a href='#SkCanvas_scale_sx'>sx</a>, <a href='#SkCanvas_scale_sy'>sy</a>) before transforming
2109the result with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2110
2111### Parameters
2112
2113<table>  <tr>    <td><a name='SkCanvas_scale_sx'><code><strong>sx</strong></code></a></td>
2114    <td>amount to scale on x-axis</td>
2115  </tr>
2116  <tr>    <td><a name='SkCanvas_scale_sy'><code><strong>sy</strong></code></a></td>
2117    <td>amount to scale on y-axis</td>
2118  </tr>
2119</table>
2120
2121### Example
2122
2123<div><fiddle-embed name="7d0d801ef13c6c6da51e840c22ac15b0"></fiddle-embed></div>
2124
2125### See Also
2126
2127<a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_skew'>skew()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2128
2129<a name='SkCanvas_rotate'></a>
2130
2131---
2132
2133<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2134void rotate(<a href='undocumented#SkScalar'>SkScalar</a> degrees)
2135</pre>
2136
2137Rotates <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> by <a href='#SkCanvas_rotate_degrees'>degrees</a>. Positive <a href='#SkCanvas_rotate_degrees'>degrees</a> rotates clockwise.
2138
2139Mathematically, replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with a rotation <a href='SkMatrix_Reference#Matrix'>matrix</a>
2140<a href='undocumented#Premultiply'>premultiplied</a> with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2141
2142This has the effect of rotating the drawing by <a href='#SkCanvas_rotate_degrees'>degrees</a> before transforming
2143the result with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2144
2145### Parameters
2146
2147<table>  <tr>    <td><a name='SkCanvas_rotate_degrees'><code><strong>degrees</strong></code></a></td>
2148    <td>amount to rotate, in <a href='#SkCanvas_rotate_degrees'>degrees</a></td>
2149  </tr>
2150</table>
2151
2152### Example
2153
2154<div><fiddle-embed name="963789ac8498d4e505748ab3b15cdaa5"><div>Draw clock hands at time 5:10. The hour hand and minute hand <a href='SkPoint_Reference#Point'>point</a> up and
2155are rotated clockwise.
2156</div></fiddle-embed></div>
2157
2158### See Also
2159
2160<a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_skew'>skew()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2161
2162<a name='SkCanvas_rotate_2'></a>
2163
2164---
2165
2166<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2167void rotate(<a href='undocumented#SkScalar'>SkScalar</a> degrees, <a href='undocumented#SkScalar'>SkScalar</a> px, <a href='undocumented#SkScalar'>SkScalar</a> py)
2168</pre>
2169
2170Rotates <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> by <a href='#SkCanvas_rotate_2_degrees'>degrees</a> about a <a href='SkPoint_Reference#Point'>point</a> at (<a href='#SkCanvas_rotate_2_px'>px</a>, <a href='#SkCanvas_rotate_2_py'>py</a>). Positive <a href='#SkCanvas_rotate_2_degrees'>degrees</a> rotates
2171clockwise.
2172
2173Mathematically, constructs a rotation <a href='SkMatrix_Reference#Matrix'>matrix</a>; <a href='undocumented#Premultiply'>premultiplies</a> the rotation <a href='SkMatrix_Reference#Matrix'>matrix</a> by
2174a translation <a href='SkMatrix_Reference#Matrix'>matrix</a>; then replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with the resulting <a href='SkMatrix_Reference#Matrix'>matrix</a>
2175<a href='undocumented#Premultiply'>premultiplied</a> with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2176
2177This has the effect of rotating the drawing about a given <a href='SkPoint_Reference#Point'>point</a> before
2178transforming the result with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2179
2180### Parameters
2181
2182<table>  <tr>    <td><a name='SkCanvas_rotate_2_degrees'><code><strong>degrees</strong></code></a></td>
2183    <td>amount to rotate, in <a href='#SkCanvas_rotate_2_degrees'>degrees</a></td>
2184  </tr>
2185  <tr>    <td><a name='SkCanvas_rotate_2_px'><code><strong>px</strong></code></a></td>
2186    <td>x-axis value of the <a href='SkPoint_Reference#Point'>point</a> to rotate about</td>
2187  </tr>
2188  <tr>    <td><a name='SkCanvas_rotate_2_py'><code><strong>py</strong></code></a></td>
2189    <td>y-axis value of the <a href='SkPoint_Reference#Point'>point</a> to rotate about</td>
2190  </tr>
2191</table>
2192
2193### Example
2194
2195<div><fiddle-embed name="bcf5baea1c66a957d5ffd7b54bbbfeff"></fiddle-embed></div>
2196
2197### See Also
2198
2199<a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_skew'>skew()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2200
2201<a name='SkCanvas_skew'></a>
2202
2203---
2204
2205<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2206void skew(<a href='undocumented#SkScalar'>SkScalar</a> sx, <a href='undocumented#SkScalar'>SkScalar</a> sy)
2207</pre>
2208
2209Skews <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> by <a href='#SkCanvas_skew_sx'>sx</a> on the x-axis and <a href='#SkCanvas_skew_sy'>sy</a> on the y-axis. A positive value of <a href='#SkCanvas_skew_sx'>sx</a>
2210skews the drawing right as y-axis values increase; a positive value of <a href='#SkCanvas_skew_sy'>sy</a> skews
2211the drawing down as x-axis values increase.
2212
2213Mathematically, replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with a skew <a href='SkMatrix_Reference#Matrix'>matrix</a> <a href='undocumented#Premultiply'>premultiplied</a> with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2214
2215This has the effect of skewing the drawing by (<a href='#SkCanvas_skew_sx'>sx</a>, <a href='#SkCanvas_skew_sy'>sy</a>) before transforming
2216the result with <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2217
2218### Parameters
2219
2220<table>  <tr>    <td><a name='SkCanvas_skew_sx'><code><strong>sx</strong></code></a></td>
2221    <td>amount to skew on x-axis</td>
2222  </tr>
2223  <tr>    <td><a name='SkCanvas_skew_sy'><code><strong>sy</strong></code></a></td>
2224    <td>amount to skew on y-axis</td>
2225  </tr>
2226</table>
2227
2228### Example
2229
2230<div><fiddle-embed name="2e2acc21d7774df7e0940a30ad2ca99e"><div>Black <a href='undocumented#Text'>text</a> mimics an oblique <a href='undocumented#Text'>text</a> style by using a negative skew on x-axis
2231that shifts the geometry to the right as the y-axis values decrease.
2232Red <a href='undocumented#Text'>text</a> uses a positive skew on y-axis to shift the geometry down
2233as the x-axis values increase.
2234Blue <a href='undocumented#Text'>text</a> combines <a href='#SkCanvas_skew_sx'>sx</a> and <a href='#SkCanvas_skew_sy'>sy</a> skew to rotate and scale.
2235</div></fiddle-embed></div>
2236
2237### See Also
2238
2239<a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2240
2241<a name='SkCanvas_concat'></a>
2242
2243---
2244
2245<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2246void <a href='#SkCanvas_concat'>concat</a>(const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='SkMatrix_Reference#Matrix'>matrix</a>)
2247</pre>
2248
2249Replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with <a href='#SkCanvas_concat_matrix'>matrix</a> <a href='undocumented#Premultiply'>premultiplied</a> with existing <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2250
2251This has the effect of transforming the drawn geometry by <a href='#SkCanvas_concat_matrix'>matrix</a>, before
2252transforming the result with existing <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2253
2254### Parameters
2255
2256<table>  <tr>    <td><a name='SkCanvas_concat_matrix'><code><strong>matrix</strong></code></a></td>
2257    <td><a href='#SkCanvas_concat_matrix'>matrix</a> to <a href='undocumented#Premultiply'>premultiply</a> with existing <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a></td>
2258  </tr>
2259</table>
2260
2261### Example
2262
2263<div><fiddle-embed name="8f6818b25a92a88638ad99b2dd293f61"></fiddle-embed></div>
2264
2265### See Also
2266
2267<a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_skew'>skew()</a> <a href='#SkCanvas_setMatrix'>setMatrix</a>
2268
2269<a name='SkCanvas_setMatrix'></a>
2270
2271---
2272
2273<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2274void <a href='#SkCanvas_setMatrix'>setMatrix</a>(const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='SkMatrix_Reference#Matrix'>matrix</a>)
2275</pre>
2276
2277Replaces <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> with <a href='#SkCanvas_setMatrix_matrix'>matrix</a>.
2278Unlike <a href='#SkCanvas_concat'>concat()</a>, any prior <a href='#SkCanvas_setMatrix_matrix'>matrix</a> state is overwritten.
2279
2280### Parameters
2281
2282<table>  <tr>    <td><a name='SkCanvas_setMatrix_matrix'><code><strong>matrix</strong></code></a></td>
2283    <td><a href='#SkCanvas_setMatrix_matrix'>matrix</a> to copy, replacing existing <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a></td>
2284  </tr>
2285</table>
2286
2287### Example
2288
2289<div><fiddle-embed name="24b9cf7e6f9a08394e1e07413bd8733a"></fiddle-embed></div>
2290
2291### See Also
2292
2293<a href='#SkCanvas_resetMatrix'>resetMatrix</a> <a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_skew'>skew()</a>
2294
2295<a name='SkCanvas_resetMatrix'></a>
2296
2297---
2298
2299<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2300void <a href='#SkCanvas_resetMatrix'>resetMatrix</a>()
2301</pre>
2302
2303Sets <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> to the identity <a href='SkMatrix_Reference#Matrix'>matrix</a>.
2304Any prior <a href='SkMatrix_Reference#Matrix'>matrix</a> state is overwritten.
2305
2306### Example
2307
2308<div><fiddle-embed name="412afffdf4682baa503a4e2e99201967"></fiddle-embed></div>
2309
2310### See Also
2311
2312<a href='#SkCanvas_setMatrix'>setMatrix</a> <a href='#SkCanvas_concat'>concat()</a> <a href='#SkCanvas_translate'>translate()</a> <a href='#SkCanvas_rotate'>rotate()</a> <a href='#SkCanvas_scale'>scale()</a> <a href='#SkCanvas_skew'>skew()</a>
2313
2314<a name='SkCanvas_getTotalMatrix'></a>
2315
2316---
2317
2318<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2319const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& <a href='#SkCanvas_getTotalMatrix'>getTotalMatrix</a>()const
2320</pre>
2321
2322Returns <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2323This does not account for translation by <a href='undocumented#SkBaseDevice'>SkBaseDevice</a> or <a href='SkSurface_Reference#SkSurface'>SkSurface</a>.
2324
2325### Return Value
2326
2327<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> in <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>
2328
2329### Example
2330
2331<div><fiddle-embed name="c0d5fa544759704768f47cac91ae3832">
2332
2333#### Example Output
2334
2335~~~~
2336isIdentity true
2337~~~~
2338
2339</fiddle-embed></div>
2340
2341### See Also
2342
2343<a href='#SkCanvas_setMatrix'>setMatrix</a> <a href='#SkCanvas_resetMatrix'>resetMatrix</a> <a href='#SkCanvas_concat'>concat()</a>
2344
2345<a name='Clip'></a>
2346
2347---
2348
2349Clip is built from a stack of clipping <a href='SkPath_Reference#Path'>paths</a>. Each <a href='SkPath_Reference#Path'>Path</a> in the
2350stack can be constructed from one or more <a href='#Path_Overview_Contour'>Path_Contour</a> elements. The
2351<a href='#Path_Overview_Contour'>Path_Contour</a> may be composed of any number of <a href='#Path_Verb'>Path_Verb</a> segments. Each
2352<a href='#Path_Overview_Contour'>Path_Contour</a> forms a closed area; <a href='#Path_Fill_Type'>Path_Fill_Type</a> defines the area enclosed
2353by <a href='#Path_Overview_Contour'>Path_Contour</a>.
2354
2355Clip stack of <a href='SkPath_Reference#Path'>Path</a> elements successfully restrict the <a href='SkPath_Reference#Path'>Path</a> area. Each
2356<a href='SkPath_Reference#Path'>Path</a> is transformed by <a href='SkMatrix_Reference#Matrix'>Matrix</a>, then intersected with or subtracted from the
2357prior Clip to form the replacement Clip. Use <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kDifference'>kDifference</a>
2358to subtract <a href='SkPath_Reference#Path'>Path</a> from Clip; use <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kIntersect'>kIntersect</a> to intersect <a href='SkPath_Reference#Path'>Path</a>
2359with Clip.
2360
2361A clipping <a href='SkPath_Reference#Path'>Path</a> may be <a href='#Paint_Anti_Alias'>Anti_Aliased</a>; if <a href='SkPath_Reference#Path'>Path</a>, after transformation, is
2362composed of horizontal and vertical <a href='undocumented#Line'>lines</a>, clearing <a href='#Paint_Anti_Alias'>Anti_Alias</a> allows whole pixels
2363to either be inside or outside the clip. The fastest drawing has a <a href='undocumented#Alias'>Aliased</a>,
2364rectangular clip.
2365
2366If clipping <a href='SkPath_Reference#Path'>Path</a> has <a href='#Paint_Anti_Alias'>Anti_Alias</a> set, clip may partially clip a <a href='undocumented#Pixel'>pixel</a>, requiring
2367that drawing blend partially with the destination along the edge. A rotated
2368rectangular <a href='#Paint_Anti_Alias'>Anti_Aliased</a> clip looks smoother but draws slower.
2369
2370Clip can combine with <a href='SkRect_Reference#Rect'>Rect</a> and <a href='#RRect'>Round_Rect</a> primitives; like
2371<a href='SkPath_Reference#Path'>Path</a>, these are transformed by <a href='SkMatrix_Reference#Matrix'>Matrix</a> before they are combined with Clip.
2372
2373Clip can combine with <a href='SkRegion_Reference#Region'>Region</a>. <a href='SkRegion_Reference#Region'>Region</a> is assumed to be in <a href='undocumented#Device'>Device</a> coordinates
2374and is unaffected by <a href='SkMatrix_Reference#Matrix'>Matrix</a>.
2375
2376### Example
2377
2378<div><fiddle-embed name="862cc026601a41a58df49c0b9f0d7777"><div>Draw a red <a href='undocumented#Circle'>circle</a> with an <a href='undocumented#Alias'>Aliased</a> clip and an <a href='#Paint_Anti_Alias'>Anti_Aliased</a> clip.
2379Use an  <a href='SkImage_Reference#Image'>image filter</a> to zoom into the pixels drawn.
2380The edge of the <a href='undocumented#Alias'>Aliased</a> clip fully draws pixels in the red <a href='undocumented#Circle'>circle</a>.
2381The edge of the <a href='#Paint_Anti_Alias'>Anti_Aliased</a> clip partially draws pixels in the red <a href='undocumented#Circle'>circle</a>.
2382</div></fiddle-embed></div>
2383
2384<a name='SkCanvas_clipRect'></a>
2385
2386---
2387
2388<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2389void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias)
2390</pre>
2391
2392Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipRect_rect'>rect</a>,
2393with an <a href='undocumented#Alias'>aliased</a> or <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a> clip edge. <a href='#SkCanvas_clipRect_rect'>rect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>
2394before it is combined with clip.
2395
2396### Parameters
2397
2398<table>  <tr>    <td><a name='SkCanvas_clipRect_rect'><code><strong>rect</strong></code></a></td>
2399    <td><a href='SkRect_Reference#SkRect'>SkRect</a> to combine with clip</td>
2400  </tr>
2401  <tr>    <td><a name='SkCanvas_clipRect_op'><code><strong>op</strong></code></a></td>
2402    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2403  </tr>
2404  <tr>    <td><a name='SkCanvas_clipRect_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2405    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2406  </tr>
2407</table>
2408
2409### Example
2410
2411<div><fiddle-embed name="6a614faa0fbcf19958b5559c19b02d0f"></fiddle-embed></div>
2412
2413### See Also
2414
2415<a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2416
2417<a name='SkCanvas_clipRect_2'></a>
2418
2419---
2420
2421<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2422void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op)
2423</pre>
2424
2425Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipRect_2_rect'>rect</a>.
2426Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2427<a href='#SkCanvas_clipRect_2_rect'>rect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> before it is combined with clip.
2428
2429### Parameters
2430
2431<table>  <tr>    <td><a name='SkCanvas_clipRect_2_rect'><code><strong>rect</strong></code></a></td>
2432    <td><a href='SkRect_Reference#SkRect'>SkRect</a> to combine with clip</td>
2433  </tr>
2434  <tr>    <td><a name='SkCanvas_clipRect_2_op'><code><strong>op</strong></code></a></td>
2435    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2436  </tr>
2437</table>
2438
2439### Example
2440
2441<div><fiddle-embed name="13bbc5fa5597a6cd4d704b419dbc66d9"></fiddle-embed></div>
2442
2443### See Also
2444
2445<a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2446
2447<a name='SkCanvas_clipRect_3'></a>
2448
2449---
2450
2451<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2452void <a href='#SkCanvas_clipRect'>clipRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, bool doAntiAlias = false)
2453</pre>
2454
2455Replaces clip with the intersection of clip and <a href='#SkCanvas_clipRect_3_rect'>rect</a>.
2456Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2457<a href='#SkCanvas_clipRect_3_rect'>rect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>
2458before it is combined with clip.
2459
2460### Parameters
2461
2462<table>  <tr>    <td><a name='SkCanvas_clipRect_3_rect'><code><strong>rect</strong></code></a></td>
2463    <td><a href='SkRect_Reference#SkRect'>SkRect</a> to combine with clip</td>
2464  </tr>
2465  <tr>    <td><a name='SkCanvas_clipRect_3_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2466    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2467  </tr>
2468</table>
2469
2470### Example
2471
2472<div><fiddle-embed name="1d4e0632c97e42692775d834fe10aa99"><div>A <a href='undocumented#Circle'>circle</a> drawn in pieces looks uniform when drawn <a href='undocumented#Alias'>Aliased</a>.
2473The same <a href='undocumented#Circle'>circle</a> pieces blend with pixels more than once when <a href='#Paint_Anti_Alias'>Anti_Aliased</a>,
2474visible as a thin pair of <a href='undocumented#Line'>lines</a> through the right <a href='undocumented#Circle'>circle</a>.
2475</div></fiddle-embed></div>
2476
2477### See Also
2478
2479<a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2480
2481<a name='SkCanvas_clipRRect'></a>
2482
2483---
2484
2485<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2486void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias)
2487</pre>
2488
2489Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipRRect_rrect'>rrect</a>,
2490with an <a href='undocumented#Alias'>aliased</a> or <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a> clip edge.
2491<a href='#SkCanvas_clipRRect_rrect'>rrect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>
2492before it is combined with clip.
2493
2494### Parameters
2495
2496<table>  <tr>    <td><a name='SkCanvas_clipRRect_rrect'><code><strong>rrect</strong></code></a></td>
2497    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> to combine with clip</td>
2498  </tr>
2499  <tr>    <td><a name='SkCanvas_clipRRect_op'><code><strong>op</strong></code></a></td>
2500    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2501  </tr>
2502  <tr>    <td><a name='SkCanvas_clipRRect_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2503    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2504  </tr>
2505</table>
2506
2507### Example
2508
2509<div><fiddle-embed name="182ef48ab5e04ba3578496fda8d9fa36"></fiddle-embed></div>
2510
2511### See Also
2512
2513<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2514
2515<a name='SkCanvas_clipRRect_2'></a>
2516
2517---
2518
2519<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2520void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, <a href='undocumented#SkClipOp'>SkClipOp</a> op)
2521</pre>
2522
2523Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipRRect_2_rrect'>rrect</a>.
2524Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2525<a href='#SkCanvas_clipRRect_2_rrect'>rrect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> before it is combined with clip.
2526
2527### Parameters
2528
2529<table>  <tr>    <td><a name='SkCanvas_clipRRect_2_rrect'><code><strong>rrect</strong></code></a></td>
2530    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> to combine with clip</td>
2531  </tr>
2532  <tr>    <td><a name='SkCanvas_clipRRect_2_op'><code><strong>op</strong></code></a></td>
2533    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2534  </tr>
2535</table>
2536
2537### Example
2538
2539<div><fiddle-embed name="ef6ae2eaae6761130ce38065d0364abd"></fiddle-embed></div>
2540
2541### See Also
2542
2543<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2544
2545<a name='SkCanvas_clipRRect_3'></a>
2546
2547---
2548
2549<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2550void <a href='#SkCanvas_clipRRect'>clipRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, bool doAntiAlias = false)
2551</pre>
2552
2553Replaces clip with the intersection of clip and <a href='#SkCanvas_clipRRect_3_rrect'>rrect</a>,
2554with an <a href='undocumented#Alias'>aliased</a> or <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a> clip edge.
2555<a href='#SkCanvas_clipRRect_3_rrect'>rrect</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> before it is combined with clip.
2556
2557### Parameters
2558
2559<table>  <tr>    <td><a name='SkCanvas_clipRRect_3_rrect'><code><strong>rrect</strong></code></a></td>
2560    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> to combine with clip</td>
2561  </tr>
2562  <tr>    <td><a name='SkCanvas_clipRRect_3_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2563    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2564  </tr>
2565</table>
2566
2567### Example
2568
2569<div><fiddle-embed name="f583114580b2176fe3e75b0994476a84"></fiddle-embed></div>
2570
2571### See Also
2572
2573<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipPath'>clipPath</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2574
2575<a name='SkCanvas_clipPath'></a>
2576
2577---
2578
2579<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2580void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op, bool doAntiAlias)
2581</pre>
2582
2583Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipPath_path'>path</a>,
2584with an <a href='undocumented#Alias'>aliased</a> or <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a> clip edge. <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_FillType'>FillType</a> determines if <a href='#SkCanvas_clipPath_path'>path</a>
2585describes the area inside or outside its <a href='SkPath_Overview#Contour'>contours</a>; and if  <a href='SkPath_Overview#Contour'>path contour</a> overlaps
2586itself or another  <a href='SkPath_Overview#Contour'>path contour</a>, whether the overlaps form part of the area.
2587<a href='#SkCanvas_clipPath_path'>path</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> before it is combined with clip.
2588
2589### Parameters
2590
2591<table>  <tr>    <td><a name='SkCanvas_clipPath_path'><code><strong>path</strong></code></a></td>
2592    <td><a href='SkPath_Reference#SkPath'>SkPath</a> to combine with clip</td>
2593  </tr>
2594  <tr>    <td><a name='SkCanvas_clipPath_op'><code><strong>op</strong></code></a></td>
2595    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2596  </tr>
2597  <tr>    <td><a name='SkCanvas_clipPath_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2598    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2599  </tr>
2600</table>
2601
2602### Example
2603
2604<div><fiddle-embed name="ee47ae6b813bfaa55e1a7b7c053ed60d"><div>Top figure uses <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kInverseWinding_FillType'>kInverseWinding_FillType</a> and <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kDifference'>kDifference</a>;
2605area outside clip is subtracted from <a href='undocumented#Circle'>circle</a>.
2606
2607Bottom figure uses <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kWinding_FillType'>kWinding_FillType</a> and <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kIntersect'>kIntersect</a>;
2608area inside clip is intersected with <a href='undocumented#Circle'>circle</a>.
2609</div></fiddle-embed></div>
2610
2611### See Also
2612
2613<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2614
2615<a name='SkCanvas_clipPath_2'></a>
2616
2617---
2618
2619<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2620void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, <a href='undocumented#SkClipOp'>SkClipOp</a> op)
2621</pre>
2622
2623Replaces clip with the intersection or difference of clip and <a href='#SkCanvas_clipPath_2_path'>path</a>.
2624Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2625<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_FillType'>FillType</a> determines if <a href='#SkCanvas_clipPath_2_path'>path</a>
2626describes the area inside or outside its <a href='SkPath_Overview#Contour'>contours</a>; and if  <a href='SkPath_Overview#Contour'>path contour</a> overlaps
2627itself or another  <a href='SkPath_Overview#Contour'>path contour</a>, whether the overlaps form part of the area.
2628<a href='#SkCanvas_clipPath_2_path'>path</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>
2629before it is combined with clip.
2630
2631### Parameters
2632
2633<table>  <tr>    <td><a name='SkCanvas_clipPath_2_path'><code><strong>path</strong></code></a></td>
2634    <td><a href='SkPath_Reference#SkPath'>SkPath</a> to combine with clip</td>
2635  </tr>
2636  <tr>    <td><a name='SkCanvas_clipPath_2_op'><code><strong>op</strong></code></a></td>
2637    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2638  </tr>
2639</table>
2640
2641### Example
2642
2643<div><fiddle-embed name="7856755c1bf8431c286c734b353345ad"><div>Overlapping <a href='SkRect_Reference#Rect'>Rects</a> form a clip. When clip <a href='#Path_Fill_Type'>Path_Fill_Type</a> is set to
2644<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kWinding_FillType'>kWinding_FillType</a>, the overlap is included. Set to
2645<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kEvenOdd_FillType'>kEvenOdd_FillType</a>, the overlap is excluded and forms a hole.
2646</div></fiddle-embed></div>
2647
2648### See Also
2649
2650<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2651
2652<a name='SkCanvas_clipPath_3'></a>
2653
2654---
2655
2656<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2657void <a href='#SkCanvas_clipPath'>clipPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, bool doAntiAlias = false)
2658</pre>
2659
2660Replaces clip with the intersection of clip and <a href='#SkCanvas_clipPath_3_path'>path</a>.
2661Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2662<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_FillType'>FillType</a> determines if <a href='#SkCanvas_clipPath_3_path'>path</a>
2663describes the area inside or outside its <a href='SkPath_Overview#Contour'>contours</a>; and if  <a href='SkPath_Overview#Contour'>path contour</a> overlaps
2664itself or another  <a href='SkPath_Overview#Contour'>path contour</a>, whether the overlaps form part of the area.
2665<a href='#SkCanvas_clipPath_3_path'>path</a> is transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> before it is combined with clip.
2666
2667### Parameters
2668
2669<table>  <tr>    <td><a name='SkCanvas_clipPath_3_path'><code><strong>path</strong></code></a></td>
2670    <td><a href='SkPath_Reference#SkPath'>SkPath</a> to combine with clip</td>
2671  </tr>
2672  <tr>    <td><a name='SkCanvas_clipPath_3_doAntiAlias'><code><strong>doAntiAlias</strong></code></a></td>
2673    <td>true if clip is to be <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a></td>
2674  </tr>
2675</table>
2676
2677### Example
2678
2679<div><fiddle-embed name="187a7ae77a8176e417181411988534b6"><div>Clip loops over itself covering its center twice. When clip <a href='#Path_Fill_Type'>Path_Fill_Type</a>
2680is set to <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kWinding_FillType'>kWinding_FillType</a>, the overlap is included. Set to
2681<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_kEvenOdd_FillType'>kEvenOdd_FillType</a>, the overlap is excluded and forms a hole.
2682</div></fiddle-embed></div>
2683
2684### See Also
2685
2686<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipRegion'>clipRegion</a>
2687
2688<a name='SkCanvas_clipRegion'></a>
2689
2690---
2691
2692<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2693void <a href='#SkCanvas_clipRegion'>clipRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& deviceRgn, <a href='undocumented#SkClipOp'>SkClipOp</a> op = <a href='undocumented#SkClipOp'>SkClipOp</a>::<a href='#SkClipOp_kIntersect'>kIntersect</a>)
2694</pre>
2695
2696Replaces clip with the intersection or difference of clip and <a href='SkRegion_Reference#SkRegion'>SkRegion</a> <a href='#SkCanvas_clipRegion_deviceRgn'>deviceRgn</a>.
2697Resulting clip is <a href='undocumented#Alias'>aliased</a>; pixels are fully contained by the clip.
2698<a href='#SkCanvas_clipRegion_deviceRgn'>deviceRgn</a> is unaffected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
2699
2700### Parameters
2701
2702<table>  <tr>    <td><a name='SkCanvas_clipRegion_deviceRgn'><code><strong>deviceRgn</strong></code></a></td>
2703    <td><a href='SkRegion_Reference#SkRegion'>SkRegion</a> to combine with clip</td>
2704  </tr>
2705  <tr>    <td><a name='SkCanvas_clipRegion_op'><code><strong>op</strong></code></a></td>
2706    <td><a href='undocumented#SkClipOp'>SkClipOp</a> to apply to clip</td>
2707  </tr>
2708</table>
2709
2710### Example
2711
2712<div><fiddle-embed name="7bb57c0e456c5fda2c2cca4abb68b19e"><div><a href='SkRegion_Reference#Region'>region</a> is unaffected by <a href='SkCanvas_Reference#Canvas'>canvas</a> rotation; iRect is affected by <a href='SkCanvas_Reference#Canvas'>canvas</a> rotation.
2713Both clips are <a href='undocumented#Alias'>Aliased</a>; this is not noticeable on <a href='SkRegion_Reference#Region'>Region</a> clip because it
2714aligns to <a href='undocumented#Pixel'>pixel</a> boundaries.
2715</div></fiddle-embed></div>
2716
2717### See Also
2718
2719<a href='#SkCanvas_clipRect'>clipRect</a> <a href='#SkCanvas_clipRRect'>clipRRect</a> <a href='#SkCanvas_clipPath'>clipPath</a>
2720
2721<a name='SkCanvas_quickReject'></a>
2722
2723---
2724
2725<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2726bool <a href='#SkCanvas_quickReject'>quickReject</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>)const
2727</pre>
2728
2729Returns true if <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_quickReject_rect'>rect</a>, transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, can be quickly determined to be
2730outside of clip. May return false even though <a href='#SkCanvas_quickReject_rect'>rect</a> is outside of clip.
2731
2732Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
2733
2734### Parameters
2735
2736<table>  <tr>    <td><a name='SkCanvas_quickReject_rect'><code><strong>rect</strong></code></a></td>
2737    <td><a href='SkRect_Reference#SkRect'>SkRect</a> to compare with clip</td>
2738  </tr>
2739</table>
2740
2741### Return Value
2742
2743true if <a href='#SkCanvas_quickReject_rect'>rect</a>, transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, does not intersect clip
2744
2745### Example
2746
2747<div><fiddle-embed name="cfe4016241074477809dd45435be9cf4">
2748
2749#### Example Output
2750
2751~~~~
2752quickReject true
2753quickReject false
2754~~~~
2755
2756</fiddle-embed></div>
2757
2758### See Also
2759
2760<a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getTotalMatrix'>getTotalMatrix</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_drawsNothing'>drawsNothing</a>
2761
2762<a name='SkCanvas_quickReject_2'></a>
2763
2764---
2765
2766<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2767bool <a href='#SkCanvas_quickReject'>quickReject</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>)const
2768</pre>
2769
2770Returns true if <a href='#SkCanvas_quickReject_2_path'>path</a>, transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, can be quickly determined to be
2771outside of clip. May return false even though <a href='#SkCanvas_quickReject_2_path'>path</a> is outside of clip.
2772
2773Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
2774
2775### Parameters
2776
2777<table>  <tr>    <td><a name='SkCanvas_quickReject_2_path'><code><strong>path</strong></code></a></td>
2778    <td><a href='SkPath_Reference#SkPath'>SkPath</a> to compare with clip</td>
2779  </tr>
2780</table>
2781
2782### Return Value
2783
2784true if <a href='#SkCanvas_quickReject_2_path'>path</a>, transformed by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, does not intersect clip
2785
2786### Example
2787
2788<div><fiddle-embed name="56dcd14f943aea6f7d7aafe0de7e6c25">
2789
2790#### Example Output
2791
2792~~~~
2793quickReject true
2794quickReject false
2795~~~~
2796
2797</fiddle-embed></div>
2798
2799### See Also
2800
2801<a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getTotalMatrix'>getTotalMatrix</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_drawsNothing'>drawsNothing</a>
2802
2803<a name='SkCanvas_getLocalClipBounds'></a>
2804
2805---
2806
2807<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2808<a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>()const
2809</pre>
2810
2811Returns bounds of clip, transformed by inverse of <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. If clip is empty,
2812return <a href='SkRect_Reference#SkRect'>SkRect</a>::<a href='#SkRect_MakeEmpty'>MakeEmpty</a>, where all <a href='SkRect_Reference#SkRect'>SkRect</a> sides equal zero.
2813
2814<a href='SkRect_Reference#SkRect'>SkRect</a> returned is outset by one to account for partial <a href='undocumented#Pixel'>pixel</a> coverage if clip
2815is <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a>.
2816
2817### Return Value
2818
2819bounds of clip in local coordinates
2820
2821### Example
2822
2823<div><fiddle-embed name="7f60cb030d3f9b2473adbe3e34b19d91"><div>Initial bounds is <a href='undocumented#Device'>device</a> bounds outset by 1 on all sides.
2824Clipped bounds is <a href='#SkCanvas_clipPath'>clipPath</a> bounds outset by 1 on all sides.
2825Scaling the <a href='SkCanvas_Reference#Canvas'>canvas</a> by two on both axes scales the local bounds by 1/2
2826on both axes.
2827</div>
2828
2829#### Example Output
2830
2831~~~~
2832left:-1  top:-1  right:257  bottom:257
2833left:29  top:129  right:121  bottom:231
2834left:14.5  top:64.5  right:60.5  bottom:115.5
2835~~~~
2836
2837</fiddle-embed></div>
2838
2839### See Also
2840
2841<a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a> <a href='#SkCanvas_quickReject'>quickReject</a>
2842
2843<a name='SkCanvas_getLocalClipBounds_2'></a>
2844
2845---
2846
2847<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2848bool <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>(<a href='SkRect_Reference#SkRect'>SkRect</a>* bounds)const
2849</pre>
2850
2851Returns <a href='#SkCanvas_getLocalClipBounds_2_bounds'>bounds</a> of clip, transformed by inverse of <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. If clip is empty,
2852return false, and set <a href='#SkCanvas_getLocalClipBounds_2_bounds'>bounds</a> to <a href='SkRect_Reference#SkRect'>SkRect</a>::<a href='#SkRect_MakeEmpty'>MakeEmpty</a>, where all <a href='SkRect_Reference#SkRect'>SkRect</a> sides equal zero.
2853
2854<a href='#SkCanvas_getLocalClipBounds_2_bounds'>bounds</a> is outset by one to account for partial <a href='undocumented#Pixel'>pixel</a> coverage if clip
2855is <a href='SkPaint_Reference#Anti_Alias'>anti-aliased</a>.
2856
2857### Parameters
2858
2859<table>  <tr>    <td><a name='SkCanvas_getLocalClipBounds_2_bounds'><code><strong>bounds</strong></code></a></td>
2860    <td><a href='SkRect_Reference#SkRect'>SkRect</a> of clip in local coordinates</td>
2861  </tr>
2862</table>
2863
2864### Return Value
2865
2866true if clip <a href='#SkCanvas_getLocalClipBounds_2_bounds'>bounds</a> is not empty
2867
2868### Example
2869
2870<div><fiddle-embed name="85496614e90c66b020f8a70db8d06f4a">
2871
2872#### Example Output
2873
2874~~~~
2875local bounds empty = false
2876local bounds empty = true
2877~~~~
2878
2879</fiddle-embed></div>
2880
2881### See Also
2882
2883<a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a> <a href='#SkCanvas_quickReject'>quickReject</a>
2884
2885<a name='SkCanvas_getDeviceClipBounds'></a>
2886
2887---
2888
2889<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2890<a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>()const
2891</pre>
2892
2893Returns <a href='SkIRect_Reference#SkIRect'>SkIRect</a> bounds of clip, unaffected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. If clip is empty,
2894return <a href='SkRect_Reference#SkRect'>SkRect</a>::<a href='#SkRect_MakeEmpty'>MakeEmpty</a>, where all <a href='SkRect_Reference#SkRect'>SkRect</a> sides equal zero.
2895
2896Unlike <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>(), returned <a href='SkIRect_Reference#SkIRect'>SkIRect</a> is not outset.
2897
2898### Return Value
2899
2900bounds of clip in <a href='undocumented#SkBaseDevice'>SkBaseDevice</a> coordinates
2901
2902### Example
2903
2904<div><fiddle-embed name="556832ac5711af662a98c21c547185e9"><div>Initial bounds is <a href='undocumented#Device'>device</a> bounds, not outset.
2905Clipped bounds is <a href='#SkCanvas_clipPath'>clipPath</a> bounds, not outset.
2906Scaling the <a href='SkCanvas_Reference#Canvas'>canvas</a> by 1/2 on both axes scales the <a href='undocumented#Device'>device</a> bounds by 1/2
2907on both axes.
2908</div>
2909
2910#### Example Output
2911
2912~~~~
2913left:0  top:0  right:256  bottom:256
2914left:30  top:130  right:120  bottom:230
2915left:15  top:65  right:60  bottom:115
2916~~~~
2917
2918</fiddle-embed></div>
2919
2920### See Also
2921
2922<a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a> <a href='#SkCanvas_quickReject'>quickReject</a>
2923
2924<a name='SkCanvas_getDeviceClipBounds_2'></a>
2925
2926---
2927
2928<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2929bool <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>(<a href='SkIRect_Reference#SkIRect'>SkIRect</a>* bounds)const
2930</pre>
2931
2932Returns <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_getDeviceClipBounds_2_bounds'>bounds</a> of clip, unaffected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. If clip is empty,
2933return false, and set <a href='#SkCanvas_getDeviceClipBounds_2_bounds'>bounds</a> to <a href='SkRect_Reference#SkRect'>SkRect</a>::<a href='#SkRect_MakeEmpty'>MakeEmpty</a>, where all <a href='SkRect_Reference#SkRect'>SkRect</a> sides equal zero.
2934
2935Unlike <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a>(), <a href='#SkCanvas_getDeviceClipBounds_2_bounds'>bounds</a> is not outset.
2936
2937### Parameters
2938
2939<table>  <tr>    <td><a name='SkCanvas_getDeviceClipBounds_2_bounds'><code><strong>bounds</strong></code></a></td>
2940    <td><a href='SkRect_Reference#SkRect'>SkRect</a> of clip in <a href='undocumented#Device'>device</a> coordinates</td>
2941  </tr>
2942</table>
2943
2944### Return Value
2945
2946true if clip <a href='#SkCanvas_getDeviceClipBounds_2_bounds'>bounds</a> is not empty
2947
2948### Example
2949
2950<div><fiddle-embed name="6abb99f849a1f0e33e1dedc00d1c4f7a">
2951
2952#### Example Output
2953
2954~~~~
2955device bounds empty = false
2956device bounds empty = true
2957~~~~
2958
2959</fiddle-embed></div>
2960
2961### See Also
2962
2963<a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getBaseLayerSize'>getBaseLayerSize</a> <a href='#SkCanvas_quickReject'>quickReject</a>
2964
2965<a name='Draw'></a>
2966
2967<a name='SkCanvas_drawColor'></a>
2968
2969---
2970
2971<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
2972void <a href='#SkCanvas_drawColor'>drawColor</a>(<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='SkColor_Reference#Color'>color</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode = <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>::<a href='#SkBlendMode_kSrcOver'>kSrcOver</a>)
2973</pre>
2974
2975Fills clip with  <a href='#SkCanvas_drawColor_color'>color color</a>.
2976<a href='#SkCanvas_drawColor_mode'>mode</a> determines how ARGB is combined with destination.
2977
2978### Parameters
2979
2980<table>  <tr>    <td><a name='SkCanvas_drawColor_color'><code><strong>color</strong></code></a></td>
2981    <td><a href='undocumented#Unpremultiply'>unpremultiplied</a> ARGB</td>
2982  </tr>
2983  <tr>    <td><a name='SkCanvas_drawColor_mode'><code><strong>mode</strong></code></a></td>
2984    <td><a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> used to combine source <a href='#SkCanvas_drawColor_color'>color</a> and destination</td>
2985  </tr>
2986</table>
2987
2988### Example
2989
2990<div><fiddle-embed name="9cf94fead1e6b17d836c704b4eac269a"></fiddle-embed></div>
2991
2992### See Also
2993
2994<a href='#SkCanvas_clear'>clear</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_erase'>erase</a> <a href='#SkCanvas_drawPaint'>drawPaint</a>
2995
2996<a name='SkCanvas_clear'></a>
2997
2998---
2999
3000<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3001void clear(<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='SkColor_Reference#Color'>color</a>)
3002</pre>
3003
3004Fills clip with  <a href='#SkCanvas_clear_color'>color color</a> using <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>::<a href='#SkBlendMode_kSrc'>kSrc</a>.
3005This has the effect of replacing all pixels contained by clip with <a href='#SkCanvas_clear_color'>color</a>.
3006
3007### Parameters
3008
3009<table>  <tr>    <td><a name='SkCanvas_clear_color'><code><strong>color</strong></code></a></td>
3010    <td><a href='undocumented#Unpremultiply'>unpremultiplied</a> ARGB</td>
3011  </tr>
3012</table>
3013
3014### Example
3015
3016<div><fiddle-embed name="8c4499e322f10153dcd9b0b9806233b9"></fiddle-embed></div>
3017
3018### See Also
3019
3020<a href='#SkCanvas_drawColor'>drawColor</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_erase'>erase</a> <a href='#SkCanvas_drawPaint'>drawPaint</a>
3021
3022<a name='SkCanvas_discard'></a>
3023
3024---
3025
3026<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3027void <a href='#SkCanvas_discard'>discard()</a>
3028</pre>
3029
3030Makes <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> contents undefined. Subsequent calls that read <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> pixels,
3031such as drawing with <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, return undefined results. <a href='#SkCanvas_discard'>discard()</a> does
3032not change clip or <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
3033
3034<a href='#SkCanvas_discard'>discard()</a> may do nothing, depending on the implementation of <a href='SkSurface_Reference#SkSurface'>SkSurface</a> or <a href='undocumented#SkBaseDevice'>SkBaseDevice</a>
3035that created <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>.
3036
3037<a href='#SkCanvas_discard'>discard()</a> allows optimized performance on subsequent draws by removing
3038cached <a href='undocumented#Data'>data</a> associated with <a href='SkSurface_Reference#SkSurface'>SkSurface</a> or <a href='undocumented#SkBaseDevice'>SkBaseDevice</a>.
3039It is not necessary to call <a href='#SkCanvas_discard'>discard()</a> once done with <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a>;
3040any cached <a href='undocumented#Data'>data</a> is deleted when owning <a href='SkSurface_Reference#SkSurface'>SkSurface</a> or <a href='undocumented#SkBaseDevice'>SkBaseDevice</a> is deleted.
3041
3042### See Also
3043
3044<a href='#SkCanvas_flush'>flush()</a> <a href='undocumented#GrContext'>GrContext</a>::<a href='#GrContext_abandonContext'>abandonContext</a>
3045
3046<a name='SkCanvas_drawPaint'></a>
3047
3048---
3049
3050<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3051void <a href='#SkCanvas_drawPaint'>drawPaint</a>(const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3052</pre>
3053
3054Fills clip with <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPaint_paint'>paint</a>. <a href='SkPaint_Reference#SkPaint'>SkPaint</a> components <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
3055<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> affect drawing;
3056<a href='undocumented#SkPathEffect'>SkPathEffect</a> in <a href='#SkCanvas_drawPaint_paint'>paint</a> is ignored.
3057
3058### Parameters
3059
3060<table>  <tr>    <td><a name='SkCanvas_drawPaint_paint'><code><strong>paint</strong></code></a></td>
3061    <td>graphics state used to fill <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a></td>
3062  </tr>
3063</table>
3064
3065### Example
3066
3067<div><fiddle-embed name="1cd076b9b1a7c976cdca72b93c4f42dd"></fiddle-embed></div>
3068
3069### See Also
3070
3071<a href='#SkCanvas_clear'>clear</a> <a href='#SkCanvas_drawColor'>drawColor</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_erase'>erase</a>
3072
3073<a name='SkCanvas_PointMode'></a>
3074
3075---
3076
3077<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
3078    enum <a href='#SkCanvas_PointMode'>PointMode</a> {
3079        <a href='#SkCanvas_kPoints_PointMode'>kPoints_PointMode</a>,
3080        <a href='#SkCanvas_kLines_PointMode'>kLines_PointMode</a>,
3081        <a href='#SkCanvas_kPolygon_PointMode'>kPolygon_PointMode</a>,
3082    };
3083
3084</pre>
3085
3086Selects if an array of <a href='SkPoint_Reference#Point'>points</a> are drawn as discrete <a href='SkPoint_Reference#Point'>points</a>, as <a href='undocumented#Line'>lines</a>, or as
3087an open polygon.
3088
3089### Constants
3090
3091<table style='border-collapse: collapse; width: 62.5em'>
3092  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
3093<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
3094<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
3095  <tr style='background-color: #f0f0f0; '>
3096    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kPoints_PointMode'><code>SkCanvas::kPoints_PointMode</code></a></td>
3097    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
3098    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
3099draw each point separately</td>
3100  </tr>
3101  <tr>
3102    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kLines_PointMode'><code>SkCanvas::kLines_PointMode</code></a></td>
3103    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
3104    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
3105draw each pair of points as a line segment</td>
3106  </tr>
3107  <tr style='background-color: #f0f0f0; '>
3108    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kPolygon_PointMode'><code>SkCanvas::kPolygon_PointMode</code></a></td>
3109    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
3110    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
3111draw the array of points as a open polygon</td>
3112  </tr>
3113</table>
3114
3115### Example
3116
3117<div><fiddle-embed name="292b4b2008961b6f612434d3121fc4ce"><div>The upper left corner shows three squares when drawn as <a href='SkPoint_Reference#Point'>points</a>.
3118The upper right corner shows one <a href='undocumented#Line'>line</a>; when drawn as <a href='undocumented#Line'>lines</a>, two <a href='SkPoint_Reference#Point'>points</a> are required per <a href='undocumented#Line'>line</a>.
3119The lower right corner shows two <a href='undocumented#Line'>lines</a>; when draw as polygon, no miter is drawn at the corner.
3120The lower left corner shows two <a href='undocumented#Line'>lines</a> with a miter when <a href='SkPath_Reference#Path'>path</a> contains polygon.
3121</div></fiddle-embed></div>
3122
3123### See Also
3124
3125<a href='#SkCanvas_drawLine'>drawLine</a> <a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3126
3127<a name='SkCanvas_drawPoints'></a>
3128
3129---
3130
3131<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3132void <a href='#SkCanvas_drawPoints'>drawPoints</a>(<a href='#SkCanvas_PointMode'>PointMode</a> mode, size_t count, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pts[], const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3133</pre>
3134
3135Draws <a href='#SkCanvas_drawPoints_pts'>pts</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPoints_paint'>paint</a>.
3136<a href='#SkCanvas_drawPoints_count'>count</a> is the number of <a href='SkPoint_Reference#Point'>points</a>; if <a href='#SkCanvas_drawPoints_count'>count</a> is less than one, has no effect.
3137<a href='#SkCanvas_drawPoints_mode'>mode</a> may be one of: <a href='#SkCanvas_kPoints_PointMode'>kPoints_PointMode</a>, <a href='#SkCanvas_kLines_PointMode'>kLines_PointMode</a>, or <a href='#SkCanvas_kPolygon_PointMode'>kPolygon_PointMode</a>.
3138
3139If <a href='#SkCanvas_drawPoints_mode'>mode</a> is <a href='#SkCanvas_kPoints_PointMode'>kPoints_PointMode</a>, the shape of <a href='SkPoint_Reference#Point'>point</a> drawn depends on <a href='#SkCanvas_drawPoints_paint'>paint</a>
3140<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a>. If <a href='#SkCanvas_drawPoints_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kRound_Cap'>kRound_Cap</a>, each <a href='SkPoint_Reference#Point'>point</a> draws a
3141<a href='undocumented#Circle'>circle</a> of diameter <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width. If <a href='#SkCanvas_drawPoints_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kSquare_Cap'>kSquare_Cap</a>
3142or <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kButt_Cap'>kButt_Cap</a>, each <a href='SkPoint_Reference#Point'>point</a> draws a square of width and height
3143<a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width.
3144
3145If <a href='#SkCanvas_drawPoints_mode'>mode</a> is <a href='#SkCanvas_kLines_PointMode'>kLines_PointMode</a>, each pair of <a href='SkPoint_Reference#Point'>points</a> draws a <a href='undocumented#Line'>line</a> segment.
3146One <a href='undocumented#Line'>line</a> is drawn for every two <a href='SkPoint_Reference#Point'>points</a>; each <a href='SkPoint_Reference#Point'>point</a> is used once. If <a href='#SkCanvas_drawPoints_count'>count</a> is odd,
3147the final <a href='SkPoint_Reference#Point'>point</a> is ignored.
3148
3149If <a href='#SkCanvas_drawPoints_mode'>mode</a> is <a href='#SkCanvas_kPolygon_PointMode'>kPolygon_PointMode</a>, each adjacent pair of <a href='SkPoint_Reference#Point'>points</a> draws a <a href='undocumented#Line'>line</a> segment.
3150<a href='#SkCanvas_drawPoints_count'>count</a> minus one <a href='undocumented#Line'>lines</a> are drawn; the first and last <a href='SkPoint_Reference#Point'>point</a> are used once.
3151
3152Each <a href='undocumented#Line'>line</a> segment respects <a href='#SkCanvas_drawPoints_paint'>paint</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width.
3153<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> is ignored, as if were set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>.
3154
3155Always draws each element one at a time; is not affected by
3156<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a>, and unlike <a href='#SkCanvas_drawPath'>drawPath</a>(), does not create a mask from all <a href='SkPoint_Reference#Point'>points</a>
3157and <a href='undocumented#Line'>lines</a> before drawing.
3158
3159### Parameters
3160
3161<table>  <tr>    <td><a name='SkCanvas_drawPoints_mode'><code><strong>mode</strong></code></a></td>
3162    <td>whether <a href='#SkCanvas_drawPoints_pts'>pts</a> draws <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Line'>lines</a></td>
3163  </tr>
3164  <tr>    <td><a name='SkCanvas_drawPoints_count'><code><strong>count</strong></code></a></td>
3165    <td>number of <a href='SkPoint_Reference#Point'>points</a> in the array</td>
3166  </tr>
3167  <tr>    <td><a name='SkCanvas_drawPoints_pts'><code><strong>pts</strong></code></a></td>
3168    <td>array of <a href='SkPoint_Reference#Point'>points</a> to draw</td>
3169  </tr>
3170  <tr>    <td><a name='SkCanvas_drawPoints_paint'><code><strong>paint</strong></code></a></td>
3171    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3172  </tr>
3173</table>
3174
3175### Example
3176
3177<div><fiddle-embed name="635d54b4716e226e93dfbc21ad40e77d"><div>
3178
3179<table>  <tr>
3180    <td>The first column draws <a href='SkPoint_Reference#Point'>points</a>.</td>
3181  </tr>  <tr>
3182    <td>The second column draws <a href='SkPoint_Reference#Point'>points</a> as <a href='undocumented#Line'>lines</a>.</td>
3183  </tr>  <tr>
3184    <td>The third column draws <a href='SkPoint_Reference#Point'>points</a> as a polygon.</td>
3185  </tr>  <tr>
3186    <td>The fourth column draws <a href='SkPoint_Reference#Point'>points</a> as a polygonal <a href='SkPath_Reference#Path'>path</a>.</td>
3187  </tr>  <tr>
3188    <td>The first row uses a round cap and round join.</td>
3189  </tr>  <tr>
3190    <td>The second row uses a square cap and a miter join.</td>
3191  </tr>  <tr>
3192    <td>The third row uses a butt cap and a bevel join.</td>
3193  </tr>
3194</table>
3195
3196The transparent <a href='SkColor_Reference#Color'>color</a> makes multiple <a href='undocumented#Line'>line</a> draws visible;
3197the <a href='SkPath_Reference#Path'>path</a> is drawn all at once.
3198</div></fiddle-embed></div>
3199
3200### See Also
3201
3202<a href='#SkCanvas_drawLine'>drawLine</a> <a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3203
3204<a name='SkCanvas_drawPoint'></a>
3205
3206---
3207
3208<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3209void <a href='#SkCanvas_drawPoint'>drawPoint</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3210</pre>
3211
3212Draws <a href='SkPoint_Reference#Point'>point</a> at (<a href='#SkCanvas_drawPoint_x'>x</a>, <a href='#SkCanvas_drawPoint_y'>y</a>) using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPoint_paint'>paint</a>.
3213
3214The shape of <a href='SkPoint_Reference#Point'>point</a> drawn depends on <a href='#SkCanvas_drawPoint_paint'>paint</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a>.
3215If <a href='#SkCanvas_drawPoint_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kRound_Cap'>kRound_Cap</a>, draw a <a href='undocumented#Circle'>circle</a> of diameter
3216<a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width. If <a href='#SkCanvas_drawPoint_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kSquare_Cap'>kSquare_Cap</a> or <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kButt_Cap'>kButt_Cap</a>,
3217draw a square of width and height <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width.
3218<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> is ignored, as if were set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>.
3219
3220### Parameters
3221
3222<table>  <tr>    <td><a name='SkCanvas_drawPoint_x'><code><strong>x</strong></code></a></td>
3223    <td>left edge of <a href='undocumented#Circle'>circle</a> or square</td>
3224  </tr>
3225  <tr>    <td><a name='SkCanvas_drawPoint_y'><code><strong>y</strong></code></a></td>
3226    <td>top edge of <a href='undocumented#Circle'>circle</a> or square</td>
3227  </tr>
3228  <tr>    <td><a name='SkCanvas_drawPoint_paint'><code><strong>paint</strong></code></a></td>
3229    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3230  </tr>
3231</table>
3232
3233### Example
3234
3235<div><fiddle-embed name="3476b553e7b547b604a3f6969f02d933"></fiddle-embed></div>
3236
3237### See Also
3238
3239<a href='#SkCanvas_drawPoints'>drawPoints</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawLine'>drawLine</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3240
3241<a name='SkCanvas_drawPoint_2'></a>
3242
3243---
3244
3245<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3246void <a href='#SkCanvas_drawPoint'>drawPoint</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> p, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3247</pre>
3248
3249Draws <a href='SkPoint_Reference#Point'>point</a> <a href='#SkCanvas_drawPoint_2_p'>p</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPoint_2_paint'>paint</a>.
3250
3251The shape of <a href='SkPoint_Reference#Point'>point</a> drawn depends on <a href='#SkCanvas_drawPoint_2_paint'>paint</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a>.
3252If <a href='#SkCanvas_drawPoint_2_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kRound_Cap'>kRound_Cap</a>, draw a <a href='undocumented#Circle'>circle</a> of diameter
3253<a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width. If <a href='#SkCanvas_drawPoint_2_paint'>paint</a> is set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kSquare_Cap'>kSquare_Cap</a> or <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kButt_Cap'>kButt_Cap</a>,
3254draw a square of width and height <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width.
3255<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> is ignored, as if were set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>.
3256
3257### Parameters
3258
3259<table>  <tr>    <td><a name='SkCanvas_drawPoint_2_p'><code><strong>p</strong></code></a></td>
3260    <td>top-left edge of <a href='undocumented#Circle'>circle</a> or square</td>
3261  </tr>
3262  <tr>    <td><a name='SkCanvas_drawPoint_2_paint'><code><strong>paint</strong></code></a></td>
3263    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3264  </tr>
3265</table>
3266
3267### Example
3268
3269<div><fiddle-embed name="1a0a839061c69d870acca2bcfbdf1a41"></fiddle-embed></div>
3270
3271### See Also
3272
3273<a href='#SkCanvas_drawPoints'>drawPoints</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawLine'>drawLine</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3274
3275<a name='SkCanvas_drawLine'></a>
3276
3277---
3278
3279<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3280void <a href='#SkCanvas_drawLine'>drawLine</a>(<a href='undocumented#SkScalar'>SkScalar</a> x0, <a href='undocumented#SkScalar'>SkScalar</a> y0, <a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3281</pre>
3282
3283Draws <a href='undocumented#Line'>line</a> segment from (<a href='#SkCanvas_drawLine_x0'>x0</a>, <a href='#SkCanvas_drawLine_y0'>y0</a>) to (<a href='#SkCanvas_drawLine_x1'>x1</a>, <a href='#SkCanvas_drawLine_y1'>y1</a>) using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawLine_paint'>paint</a>.
3284In <a href='#SkCanvas_drawLine_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness;
3285<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a> draws the end rounded or square;
3286<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> is ignored, as if were set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>.
3287
3288### Parameters
3289
3290<table>  <tr>    <td><a name='SkCanvas_drawLine_x0'><code><strong>x0</strong></code></a></td>
3291    <td>start of <a href='undocumented#Line'>line</a> segment on x-axis</td>
3292  </tr>
3293  <tr>    <td><a name='SkCanvas_drawLine_y0'><code><strong>y0</strong></code></a></td>
3294    <td>start of <a href='undocumented#Line'>line</a> segment on y-axis</td>
3295  </tr>
3296  <tr>    <td><a name='SkCanvas_drawLine_x1'><code><strong>x1</strong></code></a></td>
3297    <td>end of <a href='undocumented#Line'>line</a> segment on x-axis</td>
3298  </tr>
3299  <tr>    <td><a name='SkCanvas_drawLine_y1'><code><strong>y1</strong></code></a></td>
3300    <td>end of <a href='undocumented#Line'>line</a> segment on y-axis</td>
3301  </tr>
3302  <tr>    <td><a name='SkCanvas_drawLine_paint'><code><strong>paint</strong></code></a></td>
3303    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3304  </tr>
3305</table>
3306
3307### Example
3308
3309<div><fiddle-embed name="d10ee4a265f278d02afe11ad889b293b"></fiddle-embed></div>
3310
3311### See Also
3312
3313<a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3314
3315<a name='SkCanvas_drawLine_2'></a>
3316
3317---
3318
3319<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3320void <a href='#SkCanvas_drawLine'>drawLine</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> p0, <a href='SkPoint_Reference#SkPoint'>SkPoint</a> p1, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3321</pre>
3322
3323Draws <a href='undocumented#Line'>line</a> segment from <a href='#SkCanvas_drawLine_2_p0'>p0</a> to <a href='#SkCanvas_drawLine_2_p1'>p1</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawLine_2_paint'>paint</a>.
3324In <a href='#SkCanvas_drawLine_2_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness;
3325<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a> draws the end rounded or square;
3326<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> is ignored, as if were set to <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>.
3327
3328### Parameters
3329
3330<table>  <tr>    <td><a name='SkCanvas_drawLine_2_p0'><code><strong>p0</strong></code></a></td>
3331    <td>start of <a href='undocumented#Line'>line</a> segment</td>
3332  </tr>
3333  <tr>    <td><a name='SkCanvas_drawLine_2_p1'><code><strong>p1</strong></code></a></td>
3334    <td>end of <a href='undocumented#Line'>line</a> segment</td>
3335  </tr>
3336  <tr>    <td><a name='SkCanvas_drawLine_2_paint'><code><strong>paint</strong></code></a></td>
3337    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3338  </tr>
3339</table>
3340
3341### Example
3342
3343<div><fiddle-embed name="f8525816cb596dde1a3855446792c8e0"></fiddle-embed></div>
3344
3345### See Also
3346
3347<a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3348
3349<a name='SkCanvas_drawRect'></a>
3350
3351---
3352
3353<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3354void <a href='#SkCanvas_drawRect'>drawRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3355</pre>
3356
3357Draws <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawRect_rect'>rect</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawRect_paint'>paint</a>.
3358In <a href='#SkCanvas_drawRect_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if rectangle is stroked or filled;
3359if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness, and
3360<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a> draws the corners rounded or square.
3361
3362### Parameters
3363
3364<table>  <tr>    <td><a name='SkCanvas_drawRect_rect'><code><strong>rect</strong></code></a></td>
3365    <td>rectangle to draw</td>
3366  </tr>
3367  <tr>    <td><a name='SkCanvas_drawRect_paint'><code><strong>paint</strong></code></a></td>
3368    <td>stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3369  </tr>
3370</table>
3371
3372### Example
3373
3374<div><fiddle-embed name="871b0da9b4a23de11ae7a772ce14aed3"></fiddle-embed></div>
3375
3376### See Also
3377
3378<a href='#SkCanvas_drawIRect'>drawIRect</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawRegion'>drawRegion</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawLine'>drawLine</a>
3379
3380<a name='SkCanvas_drawIRect'></a>
3381
3382---
3383
3384<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3385void <a href='#SkCanvas_drawIRect'>drawIRect</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3386</pre>
3387
3388Draws <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_drawIRect_rect'>rect</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawIRect_paint'>paint</a>.
3389In <a href='#SkCanvas_drawIRect_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if rectangle is stroked or filled;
3390if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness, and
3391<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a> draws the corners rounded or square.
3392
3393### Parameters
3394
3395<table>  <tr>    <td><a name='SkCanvas_drawIRect_rect'><code><strong>rect</strong></code></a></td>
3396    <td>rectangle to draw</td>
3397  </tr>
3398  <tr>    <td><a name='SkCanvas_drawIRect_paint'><code><strong>paint</strong></code></a></td>
3399    <td>stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3400  </tr>
3401</table>
3402
3403### Example
3404
3405<div><fiddle-embed name="d3d8ca584134560750b1efa4a4c6e138"></fiddle-embed></div>
3406
3407### See Also
3408
3409<a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawRegion'>drawRegion</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawLine'>drawLine</a>
3410
3411<a name='SkCanvas_drawRegion'></a>
3412
3413---
3414
3415<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3416void <a href='#SkCanvas_drawRegion'>drawRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& <a href='SkRegion_Reference#Region'>region</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3417</pre>
3418
3419Draws <a href='SkRegion_Reference#SkRegion'>SkRegion</a> <a href='#SkCanvas_drawRegion_region'>region</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawRegion_paint'>paint</a>.
3420In <a href='#SkCanvas_drawRegion_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if rectangle is stroked or filled;
3421if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness, and
3422<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a> draws the corners rounded or square.
3423
3424### Parameters
3425
3426<table>  <tr>    <td><a name='SkCanvas_drawRegion_region'><code><strong>region</strong></code></a></td>
3427    <td><a href='#SkCanvas_drawRegion_region'>region</a> to draw</td>
3428  </tr>
3429  <tr>    <td><a name='SkCanvas_drawRegion_paint'><code><strong>paint</strong></code></a></td>
3430    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3431  </tr>
3432</table>
3433
3434### Example
3435
3436<div><fiddle-embed name="80309e0deca0f8add616cec7bec634ca"></fiddle-embed></div>
3437
3438### See Also
3439
3440<a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawIRect'>drawIRect</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3441
3442<a name='SkCanvas_drawOval'></a>
3443
3444---
3445
3446<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3447void <a href='#SkCanvas_drawOval'>drawOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='undocumented#Oval'>oval</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3448</pre>
3449
3450Draws <a href='#SkCanvas_drawOval_oval'>oval</a> <a href='#SkCanvas_drawOval_oval'>oval</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a>.
3451In <a href='#SkCanvas_drawOval_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='#SkCanvas_drawOval_oval'>oval</a> is stroked or filled;
3452if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3453
3454### Parameters
3455
3456<table>  <tr>    <td><a name='SkCanvas_drawOval_oval'><code><strong>oval</strong></code></a></td>
3457    <td><a href='SkRect_Reference#SkRect'>SkRect</a> bounds of <a href='#SkCanvas_drawOval_oval'>oval</a></td>
3458  </tr>
3459  <tr>    <td><a name='SkCanvas_drawOval_paint'><code><strong>paint</strong></code></a></td>
3460    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3461  </tr>
3462</table>
3463
3464### Example
3465
3466<div><fiddle-embed name="8b6b86f8a022811cd29a9c6ab771df12"></fiddle-embed></div>
3467
3468### See Also
3469
3470<a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a>
3471
3472<a name='SkCanvas_drawRRect'></a>
3473
3474---
3475
3476<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3477void <a href='#SkCanvas_drawRRect'>drawRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& rrect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3478</pre>
3479
3480Draws <a href='SkRRect_Reference#SkRRect'>SkRRect</a> <a href='#SkCanvas_drawRRect_rrect'>rrect</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawRRect_paint'>paint</a>.
3481In <a href='#SkCanvas_drawRRect_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='#SkCanvas_drawRRect_rrect'>rrect</a> is stroked or filled;
3482if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3483
3484<a href='#SkCanvas_drawRRect_rrect'>rrect</a> may represent a rectangle, <a href='undocumented#Circle'>circle</a>, <a href='undocumented#Oval'>oval</a>, uniformly rounded rectangle, or
3485may have any combination of positive non-square radii for the four corners.
3486
3487### Parameters
3488
3489<table>  <tr>    <td><a name='SkCanvas_drawRRect_rrect'><code><strong>rrect</strong></code></a></td>
3490    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> with up to eight corner radii to draw</td>
3491  </tr>
3492  <tr>    <td><a name='SkCanvas_drawRRect_paint'><code><strong>paint</strong></code></a></td>
3493    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3494  </tr>
3495</table>
3496
3497### Example
3498
3499<div><fiddle-embed name="90fed1bb11efb43aada94113338c63d8"></fiddle-embed></div>
3500
3501### See Also
3502
3503<a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawDRRect'>drawDRRect</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3504
3505<a name='SkCanvas_drawDRRect'></a>
3506
3507---
3508
3509<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3510void <a href='#SkCanvas_drawDRRect'>drawDRRect</a>(const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& outer, const <a href='SkRRect_Reference#SkRRect'>SkRRect</a>& inner, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3511</pre>
3512
3513Draws <a href='SkRRect_Reference#SkRRect'>SkRRect</a> <a href='#SkCanvas_drawDRRect_outer'>outer</a> and <a href='#SkCanvas_drawDRRect_inner'>inner</a>
3514using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawDRRect_paint'>paint</a>.
3515<a href='#SkCanvas_drawDRRect_outer'>outer</a> must contain <a href='#SkCanvas_drawDRRect_inner'>inner</a> or the drawing is undefined.
3516In <a href='#SkCanvas_drawDRRect_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='SkRRect_Reference#SkRRect'>SkRRect</a> is stroked or filled;
3517if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3518If stroked and <a href='SkRRect_Reference#SkRRect'>SkRRect</a> corner has  zero length radii, <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a> can
3519draw corners rounded or square.
3520
3521GPU-backed platforms optimize drawing when both <a href='#SkCanvas_drawDRRect_outer'>outer</a> and <a href='#SkCanvas_drawDRRect_inner'>inner</a> are
3522concave and <a href='#SkCanvas_drawDRRect_outer'>outer</a> contains <a href='#SkCanvas_drawDRRect_inner'>inner</a>. These platforms may not be able to draw
3523<a href='SkPath_Reference#SkPath'>SkPath</a> built with identical <a href='undocumented#Data'>data</a> as fast.
3524
3525### Parameters
3526
3527<table>  <tr>    <td><a name='SkCanvas_drawDRRect_outer'><code><strong>outer</strong></code></a></td>
3528    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> <a href='#SkCanvas_drawDRRect_outer'>outer</a> bounds to draw</td>
3529  </tr>
3530  <tr>    <td><a name='SkCanvas_drawDRRect_inner'><code><strong>inner</strong></code></a></td>
3531    <td><a href='SkRRect_Reference#SkRRect'>SkRRect</a> <a href='#SkCanvas_drawDRRect_inner'>inner</a> bounds to draw</td>
3532  </tr>
3533  <tr>    <td><a name='SkCanvas_drawDRRect_paint'><code><strong>paint</strong></code></a></td>
3534    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3535  </tr>
3536</table>
3537
3538### Example
3539
3540<div><fiddle-embed name="02e33141f13da2f19aef7feb7117b541"></fiddle-embed></div>
3541
3542### Example
3543
3544<div><fiddle-embed name="30823cb4edf884d330285ea161664931"><div>Outer <a href='SkRect_Reference#Rect'>Rect</a> has no corner radii, but stroke join is rounded.
3545Inner <a href='#RRect'>Round_Rect</a> has corner radii; outset stroke increases radii of corners.
3546Stroke join does not affect <a href='#SkCanvas_drawDRRect_inner'>inner</a> <a href='#RRect'>Round_Rect</a> since it has no sharp corners.
3547</div></fiddle-embed></div>
3548
3549### See Also
3550
3551<a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3552
3553<a name='SkCanvas_drawCircle'></a>
3554
3555---
3556
3557<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3558void <a href='#SkCanvas_drawCircle'>drawCircle</a>(<a href='undocumented#SkScalar'>SkScalar</a> cx, <a href='undocumented#SkScalar'>SkScalar</a> cy, <a href='undocumented#SkScalar'>SkScalar</a> radius, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3559</pre>
3560
3561Draws <a href='undocumented#Circle'>circle</a> at (<a href='#SkCanvas_drawCircle_cx'>cx</a>, <a href='#SkCanvas_drawCircle_cy'>cy</a>) with <a href='#SkCanvas_drawCircle_radius'>radius</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawCircle_paint'>paint</a>.
3562If <a href='#SkCanvas_drawCircle_radius'>radius</a> is zero or less, nothing is drawn.
3563In <a href='#SkCanvas_drawCircle_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='undocumented#Circle'>circle</a> is stroked or filled;
3564if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3565
3566### Parameters
3567
3568<table>  <tr>    <td><a name='SkCanvas_drawCircle_cx'><code><strong>cx</strong></code></a></td>
3569    <td><a href='undocumented#Circle'>circle</a> center on the x-axis</td>
3570  </tr>
3571  <tr>    <td><a name='SkCanvas_drawCircle_cy'><code><strong>cy</strong></code></a></td>
3572    <td><a href='undocumented#Circle'>circle</a> center on the y-axis</td>
3573  </tr>
3574  <tr>    <td><a name='SkCanvas_drawCircle_radius'><code><strong>radius</strong></code></a></td>
3575    <td>half the diameter of <a href='undocumented#Circle'>circle</a></td>
3576  </tr>
3577  <tr>    <td><a name='SkCanvas_drawCircle_paint'><code><strong>paint</strong></code></a></td>
3578    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3579  </tr>
3580</table>
3581
3582### Example
3583
3584<div><fiddle-embed name="841229e25ca9dfb68bd0dc4dfff356eb"></fiddle-embed></div>
3585
3586### See Also
3587
3588<a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawArc'>drawArc</a> <a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawLine'>drawLine</a>
3589
3590<a name='SkCanvas_drawCircle_2'></a>
3591
3592---
3593
3594<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3595void <a href='#SkCanvas_drawCircle'>drawCircle</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> center, <a href='undocumented#SkScalar'>SkScalar</a> radius, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3596</pre>
3597
3598Draws <a href='undocumented#Circle'>circle</a> at <a href='#SkCanvas_drawCircle_2_center'>center</a> with <a href='#SkCanvas_drawCircle_2_radius'>radius</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawCircle_2_paint'>paint</a>.
3599If <a href='#SkCanvas_drawCircle_2_radius'>radius</a> is zero or less, nothing is drawn.
3600In <a href='#SkCanvas_drawCircle_2_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='undocumented#Circle'>circle</a> is stroked or filled;
3601if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3602
3603### Parameters
3604
3605<table>  <tr>    <td><a name='SkCanvas_drawCircle_2_center'><code><strong>center</strong></code></a></td>
3606    <td><a href='undocumented#Circle'>circle</a> <a href='#SkCanvas_drawCircle_2_center'>center</a></td>
3607  </tr>
3608  <tr>    <td><a name='SkCanvas_drawCircle_2_radius'><code><strong>radius</strong></code></a></td>
3609    <td>half the diameter of <a href='undocumented#Circle'>circle</a></td>
3610  </tr>
3611  <tr>    <td><a name='SkCanvas_drawCircle_2_paint'><code><strong>paint</strong></code></a></td>
3612    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3613  </tr>
3614</table>
3615
3616### Example
3617
3618<div><fiddle-embed name="9303ffae45ddd0b0a1f93d816a1762f4"></fiddle-embed></div>
3619
3620### See Also
3621
3622<a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawArc'>drawArc</a> <a href='#SkCanvas_drawPoint'>drawPoint</a> <a href='#SkCanvas_drawLine'>drawLine</a>
3623
3624<a name='SkCanvas_drawArc'></a>
3625
3626---
3627
3628<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3629void <a href='#SkCanvas_drawArc'>drawArc</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='undocumented#Oval'>oval</a>, <a href='undocumented#SkScalar'>SkScalar</a> startAngle, <a href='undocumented#SkScalar'>SkScalar</a> sweepAngle, bool useCenter,
3630             const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3631</pre>
3632
3633Draws <a href='undocumented#Arc'>arc</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawArc_paint'>paint</a>.
3634
3635<a href='undocumented#Arc'>Arc</a> is part of <a href='#SkCanvas_drawArc_oval'>oval</a> bounded by <a href='#SkCanvas_drawArc_oval'>oval</a>, sweeping from <a href='#SkCanvas_drawArc_startAngle'>startAngle</a> to <a href='#SkCanvas_drawArc_startAngle'>startAngle</a> plus
3636<a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a>. <a href='#SkCanvas_drawArc_startAngle'>startAngle</a> and <a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a> are in degrees.
3637
3638<a href='#SkCanvas_drawArc_startAngle'>startAngle</a> of zero places start <a href='SkPoint_Reference#Point'>point</a> at the right middle edge of <a href='#SkCanvas_drawArc_oval'>oval</a>.
3639A positive <a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a> places <a href='undocumented#Arc'>arc</a> end <a href='SkPoint_Reference#Point'>point</a> clockwise from start <a href='SkPoint_Reference#Point'>point</a>;
3640a negative <a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a> places <a href='undocumented#Arc'>arc</a> end <a href='SkPoint_Reference#Point'>point</a> counterclockwise from start <a href='SkPoint_Reference#Point'>point</a>.
3641<a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a> may exceed 360 degrees, a full <a href='undocumented#Circle'>circle</a>.
3642If <a href='#SkCanvas_drawArc_useCenter'>useCenter</a> is true, draw a wedge that includes <a href='undocumented#Line'>lines</a> from <a href='#SkCanvas_drawArc_oval'>oval</a>
3643center to <a href='undocumented#Arc'>arc</a> end <a href='SkPoint_Reference#Point'>points</a>. If <a href='#SkCanvas_drawArc_useCenter'>useCenter</a> is false, draw <a href='undocumented#Arc'>arc</a> between end <a href='SkPoint_Reference#Point'>points</a>.
3644
3645If <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawArc_oval'>oval</a> is empty or <a href='#SkCanvas_drawArc_sweepAngle'>sweepAngle</a> is zero, nothing is drawn.
3646
3647### Parameters
3648
3649<table>  <tr>    <td><a name='SkCanvas_drawArc_oval'><code><strong>oval</strong></code></a></td>
3650    <td><a href='SkRect_Reference#SkRect'>SkRect</a> bounds of <a href='#SkCanvas_drawArc_oval'>oval</a> containing <a href='undocumented#Arc'>arc</a> to draw</td>
3651  </tr>
3652  <tr>    <td><a name='SkCanvas_drawArc_startAngle'><code><strong>startAngle</strong></code></a></td>
3653    <td>angle in degrees where <a href='undocumented#Arc'>arc</a> begins</td>
3654  </tr>
3655  <tr>    <td><a name='SkCanvas_drawArc_sweepAngle'><code><strong>sweepAngle</strong></code></a></td>
3656    <td>sweep angle in degrees; positive is clockwise</td>
3657  </tr>
3658  <tr>    <td><a name='SkCanvas_drawArc_useCenter'><code><strong>useCenter</strong></code></a></td>
3659    <td>if true, include the center of the <a href='#SkCanvas_drawArc_oval'>oval</a></td>
3660  </tr>
3661  <tr>    <td><a name='SkCanvas_drawArc_paint'><code><strong>paint</strong></code></a></td>
3662    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke or fill, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3663  </tr>
3664</table>
3665
3666### Example
3667
3668<div><fiddle-embed name="11f0fbe7b30d776913c2e7c92c02ff57"></fiddle-embed></div>
3669
3670### Example
3671
3672<div><fiddle-embed name="e91dbe45974489b8962c815017b7914f"></fiddle-embed></div>
3673
3674### See Also
3675
3676<a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_arcTo'>arcTo</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawPath'>drawPath</a>
3677
3678<a name='SkCanvas_drawRoundRect'></a>
3679
3680---
3681
3682<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3683void <a href='#SkCanvas_drawRoundRect'>drawRoundRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, <a href='undocumented#SkScalar'>SkScalar</a> rx, <a href='undocumented#SkScalar'>SkScalar</a> ry, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3684</pre>
3685
3686Draws <a href='SkRRect_Reference#SkRRect'>SkRRect</a> bounded by <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawRoundRect_rect'>rect</a>, with corner radii (<a href='#SkCanvas_drawRoundRect_rx'>rx</a>, <a href='#SkCanvas_drawRoundRect_ry'>ry</a>) using clip,
3687<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawRoundRect_paint'>paint</a>.
3688
3689In <a href='#SkCanvas_drawRoundRect_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='SkRRect_Reference#SkRRect'>SkRRect</a> is stroked or filled;
3690if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness.
3691If <a href='#SkCanvas_drawRoundRect_rx'>rx</a> or <a href='#SkCanvas_drawRoundRect_ry'>ry</a> are less than zero, they are treated as if they are zero.
3692If <a href='#SkCanvas_drawRoundRect_rx'>rx</a> plus <a href='#SkCanvas_drawRoundRect_ry'>ry</a> exceeds <a href='#SkCanvas_drawRoundRect_rect'>rect</a> width or <a href='#SkCanvas_drawRoundRect_rect'>rect</a> height, radii are scaled down to fit.
3693If <a href='#SkCanvas_drawRoundRect_rx'>rx</a> and <a href='#SkCanvas_drawRoundRect_ry'>ry</a> are zero, <a href='SkRRect_Reference#SkRRect'>SkRRect</a> is drawn as <a href='SkRect_Reference#SkRect'>SkRect</a> and if stroked is affected by
3694<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a>.
3695
3696### Parameters
3697
3698<table>  <tr>    <td><a name='SkCanvas_drawRoundRect_rect'><code><strong>rect</strong></code></a></td>
3699    <td><a href='SkRect_Reference#SkRect'>SkRect</a> bounds of <a href='SkRRect_Reference#SkRRect'>SkRRect</a> to draw</td>
3700  </tr>
3701  <tr>    <td><a name='SkCanvas_drawRoundRect_rx'><code><strong>rx</strong></code></a></td>
3702    <td>axis length on x-axis of <a href='undocumented#Oval'>oval</a> describing rounded corners</td>
3703  </tr>
3704  <tr>    <td><a name='SkCanvas_drawRoundRect_ry'><code><strong>ry</strong></code></a></td>
3705    <td>axis length on y-axis of <a href='undocumented#Oval'>oval</a> describing rounded corners</td>
3706  </tr>
3707  <tr>    <td><a name='SkCanvas_drawRoundRect_paint'><code><strong>paint</strong></code></a></td>
3708    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3709  </tr>
3710</table>
3711
3712### Example
3713
3714<div><fiddle-embed name="199fe818c09026c114e165bff166a39f"><div>Top row has a zero radius a generates a rectangle.
3715Second row radii sum to less than sides.
3716Third row radii sum equals sides.
3717Fourth row radii sum exceeds sides; radii are scaled to fit.
3718</div></fiddle-embed></div>
3719
3720### See Also
3721
3722<a href='#SkCanvas_drawRRect'>drawRRect</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawDRRect'>drawDRRect</a> <a href='#SkCanvas_drawPath'>drawPath</a> <a href='#SkCanvas_drawCircle'>drawCircle</a> <a href='#SkCanvas_drawOval'>drawOval</a> <a href='#SkCanvas_drawPoint'>drawPoint</a>
3723
3724<a name='SkCanvas_drawPath'></a>
3725
3726---
3727
3728<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3729void <a href='#SkCanvas_drawPath'>drawPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& <a href='SkPath_Reference#Path'>path</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
3730</pre>
3731
3732Draws <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='#SkCanvas_drawPath_path'>path</a> using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPath_paint'>paint</a>.
3733<a href='SkPath_Reference#SkPath'>SkPath</a> contains an array of  <a href='SkPath_Overview#Contour'>path contour</a>, each of which may be open or closed.
3734
3735In <a href='#SkCanvas_drawPath_paint'>paint</a>: <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Style'>Style</a> determines if <a href='SkRRect_Reference#SkRRect'>SkRRect</a> is stroked or filled:
3736if filled, <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_FillType'>FillType</a> determines whether  <a href='SkPath_Overview#Contour'>path contour</a> describes inside or
3737outside of fill; if stroked, <a href='SkPaint_Reference#SkPaint'>SkPaint</a> stroke width describes the <a href='undocumented#Line'>line</a> thickness,
3738<a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Cap'>Cap</a> describes <a href='undocumented#Line'>line</a> ends, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_Join'>Join</a> describes how
3739corners are drawn.
3740
3741### Parameters
3742
3743<table>  <tr>    <td><a name='SkCanvas_drawPath_path'><code><strong>path</strong></code></a></td>
3744    <td><a href='SkPath_Reference#SkPath'>SkPath</a> to draw</td>
3745  </tr>
3746  <tr>    <td><a name='SkCanvas_drawPath_paint'><code><strong>paint</strong></code></a></td>
3747    <td>stroke, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
3748  </tr>
3749</table>
3750
3751### Example
3752
3753<div><fiddle-embed name="fe2294131f422b8d6752f6a880f98ad9"><div>Top rows draw stroked <a href='#SkCanvas_drawPath_path'>path</a> with combinations of joins and caps. The open <a href='SkPath_Overview#Contour'>contour</a>
3754is affected by caps; the closed <a href='SkPath_Overview#Contour'>contour</a> is affected by joins.
3755Bottom row draws fill the same for open and closed <a href='SkPath_Overview#Contour'>contour</a>.
3756First bottom column shows winding fills overlap.
3757Second bottom column shows even odd fills exclude overlap.
3758Third bottom column shows inverse winding fills area outside both <a href='SkPath_Overview#Contour'>contours</a>.
3759</div></fiddle-embed></div>
3760
3761### See Also
3762
3763<a href='SkPath_Reference#SkPath'>SkPath</a> <a href='#SkCanvas_drawLine'>drawLine</a> <a href='#SkCanvas_drawArc'>drawArc</a> <a href='#SkCanvas_drawRect'>drawRect</a> <a href='#SkCanvas_drawPoints'>drawPoints</a>
3764
3765<a name='Draw_Image'></a>
3766
3767<a href='#SkCanvas_drawImage'>drawImage</a>, <a href='#SkCanvas_drawImageRect'>drawImageRect</a>, and <a href='#SkCanvas_drawImageNine'>drawImageNine</a> can be called with a bare pointer or
3768a  <a href='undocumented#Smart_Pointer'>smart pointer</a> as a convenience. The pairs of calls are otherwise identical.
3769
3770<a name='SkCanvas_drawImage'></a>
3771
3772---
3773
3774<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3775void <a href='#SkCanvas_drawImage'>drawImage</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
3776</pre>
3777
3778Draws <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImage_image'>image</a>, with its top-left corner at (<a href='#SkCanvas_drawImage_left'>left</a>, <a href='#SkCanvas_drawImage_top'>top</a>),
3779using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImage_paint'>paint</a>.
3780
3781If <a href='#SkCanvas_drawImage_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>,
3782and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImage_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
3783If <a href='#SkCanvas_drawImage_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImage_image'>image</a> bounds. If generated
3784mask extends beyond <a href='#SkCanvas_drawImage_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImage_image'>image</a> edge colors, just as <a href='undocumented#SkShader'>SkShader</a>
3785made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the
3786<a href='#SkCanvas_drawImage_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
3787
3788### Parameters
3789
3790<table>  <tr>    <td><a name='SkCanvas_drawImage_image'><code><strong>image</strong></code></a></td>
3791    <td>uncompressed rectangular map of pixels</td>
3792  </tr>
3793  <tr>    <td><a name='SkCanvas_drawImage_left'><code><strong>left</strong></code></a></td>
3794    <td><a href='#SkCanvas_drawImage_left'>left side</a> of <a href='#SkCanvas_drawImage_image'>image</a></td>
3795  </tr>
3796  <tr>    <td><a name='SkCanvas_drawImage_top'><code><strong>top</strong></code></a></td>
3797    <td><a href='#SkCanvas_drawImage_top'>top</a> side of <a href='#SkCanvas_drawImage_image'>image</a></td>
3798  </tr>
3799  <tr>    <td><a name='SkCanvas_drawImage_paint'><code><strong>paint</strong></code></a></td>
3800    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
3801  </tr>
3802</table>
3803
3804and so on; or nullptr
3805
3806### Example
3807
3808<div><fiddle-embed name="185746dc0faa6f1df30c4afe098646ff"></fiddle-embed></div>
3809
3810### See Also
3811
3812<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a> <a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_setImageFilter'>setImageFilter</a>
3813
3814<a name='SkCanvas_drawImage_2'></a>
3815
3816---
3817
3818<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3819void <a href='#SkCanvas_drawImage'>drawImage</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& <a href='SkImage_Reference#Image'>image</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top,
3820               const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
3821</pre>
3822
3823Draws <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImage_2_image'>image</a>, with its top-left corner at (<a href='#SkCanvas_drawImage_2_left'>left</a>, <a href='#SkCanvas_drawImage_2_top'>top</a>),
3824using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImage_2_paint'>paint</a>.
3825
3826If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImage_2_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
3827<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImage_2_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
3828If <a href='#SkCanvas_drawImage_2_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImage_2_image'>image</a> bounds. If generated
3829mask extends beyond <a href='#SkCanvas_drawImage_2_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImage_2_image'>image</a> edge colors, just as <a href='undocumented#SkShader'>SkShader</a>
3830made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the
3831<a href='#SkCanvas_drawImage_2_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
3832
3833### Parameters
3834
3835<table>  <tr>    <td><a name='SkCanvas_drawImage_2_image'><code><strong>image</strong></code></a></td>
3836    <td>uncompressed rectangular map of pixels</td>
3837  </tr>
3838  <tr>    <td><a name='SkCanvas_drawImage_2_left'><code><strong>left</strong></code></a></td>
3839    <td><a href='#SkCanvas_drawImage_2_left'>left side</a> of <a href='#SkCanvas_drawImage_2_image'>image</a></td>
3840  </tr>
3841  <tr>    <td><a name='SkCanvas_drawImage_2_top'><code><strong>top</strong></code></a></td>
3842    <td>pop side of <a href='#SkCanvas_drawImage_2_image'>image</a></td>
3843  </tr>
3844  <tr>    <td><a name='SkCanvas_drawImage_2_paint'><code><strong>paint</strong></code></a></td>
3845    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
3846  </tr>
3847</table>
3848
3849and so on; or nullptr
3850
3851### Example
3852
3853<div><fiddle-embed name="a4e877e891b1be5faa2b7fd07f673a10"></fiddle-embed></div>
3854
3855### See Also
3856
3857<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a> <a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_setImageFilter'>setImageFilter</a>
3858
3859<a name='SkCanvas_SrcRectConstraint'></a>
3860
3861---
3862
3863<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
3864    enum <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> {
3865        <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>,
3866        <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a>,
3867    };
3868
3869</pre>
3870
3871<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> controls the behavior at the edge of source <a href='SkRect_Reference#Rect'>Rect</a>,
3872provided to <a href='#SkCanvas_drawImageRect'>drawImageRect</a>, trading off speed for precision.
3873
3874<a href='#Image_Filter'>Image_Filter</a> in <a href='SkPaint_Reference#Paint'>Paint</a> may sample multiple pixels in the <a href='SkImage_Reference#Image'>image</a>. Source <a href='SkRect_Reference#Rect'>Rect</a>
3875restricts the bounds of pixels that may be read. <a href='#Image_Filter'>Image_Filter</a> may slow down if
3876it cannot read outside the bounds, when sampling near the edge of source <a href='SkRect_Reference#Rect'>Rect</a>.
3877<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> specifies whether an <a href='#Image_Filter'>Image_Filter</a> is allowed to read pixels
3878outside source <a href='SkRect_Reference#Rect'>Rect</a>.
3879
3880### Constants
3881
3882<table style='border-collapse: collapse; width: 62.5em'>
3883  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
3884<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
3885<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
3886  <tr style='background-color: #f0f0f0; '>
3887    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kStrict_SrcRectConstraint'><code>SkCanvas::kStrict_SrcRectConstraint</code></a></td>
3888    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
3889    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
3890Requires <a href='#Image_Filter'>Image_Filter</a> to respect source <a href='SkRect_Reference#Rect'>Rect</a>,
3891sampling only inside of its bounds, possibly with a performance penalty.
3892</td>
3893  </tr>
3894  <tr>
3895    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_kFast_SrcRectConstraint'><code>SkCanvas::kFast_SrcRectConstraint</code></a></td>
3896    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
3897    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
3898Permits <a href='#Image_Filter'>Image_Filter</a> to sample outside of source <a href='SkRect_Reference#Rect'>Rect</a>
3899by half the width of <a href='#Image_Filter'>Image_Filter</a>, permitting it to run faster but with
3900error at the <a href='SkImage_Reference#Image'>image</a> edges.
3901</td>
3902  </tr>
3903</table>
3904
3905### Example
3906
3907<div><fiddle-embed name="5df49d1f4da37275a1f10ef7f1a749f0"><div>redBorder contains a black and white checkerboard bordered by red.
3908redBorder is drawn scaled by 16 on the left.
3909The middle and right <a href='SkBitmap_Reference#Bitmap'>bitmaps</a> are filtered checkerboards.
3910Drawing the checkerboard with <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> shows only a blur of black and white.
3911Drawing the checkerboard with <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows red to bleed in the corners.
3912</div></fiddle-embed></div>
3913
3914### See Also
3915
3916<a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_setImageFilter'>setImageFilter</a>
3917
3918<a name='SkCanvas_drawImageRect'></a>
3919
3920---
3921
3922<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3923void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
3924                   <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
3925</pre>
3926
3927Draws <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_src'>src</a> of <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_dst'>dst</a>.
3928Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_paint'>paint</a>.
3929
3930If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
3931<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
3932If <a href='#SkCanvas_drawImageRect_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_image'>image</a> bounds.
3933
3934If generated mask extends beyond <a href='#SkCanvas_drawImageRect_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_image'>image</a> edge colors, just
3935as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
3936replicates the <a href='#SkCanvas_drawImageRect_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
3937
3938<a href='#SkCanvas_drawImageRect_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
3939sample within <a href='#SkCanvas_drawImageRect_src'>src</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
3940improve performance.
3941
3942### Parameters
3943
3944<table>  <tr>    <td><a name='SkCanvas_drawImageRect_image'><code><strong>image</strong></code></a></td>
3945    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
3946  </tr>
3947  <tr>    <td><a name='SkCanvas_drawImageRect_src'><code><strong>src</strong></code></a></td>
3948    <td>source <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_image'>image</a> to draw from</td>
3949  </tr>
3950  <tr>    <td><a name='SkCanvas_drawImageRect_dst'><code><strong>dst</strong></code></a></td>
3951    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_image'>image</a> to draw to</td>
3952  </tr>
3953  <tr>    <td><a name='SkCanvas_drawImageRect_paint'><code><strong>paint</strong></code></a></td>
3954    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
3955  </tr>
3956</table>
3957
3958and so on; or nullptr
3959
3960### Parameters
3961
3962<table>  <tr>    <td><a name='SkCanvas_drawImageRect_constraint'><code><strong>constraint</strong></code></a></td>
3963    <td>filter strictly within <a href='#SkCanvas_drawImageRect_src'>src</a> or draw faster</td>
3964  </tr>
3965</table>
3966
3967### Example
3968
3969<div><fiddle-embed name="bfd18e9cac896cdf94c9f154ccf94be8"><div>The left <a href='SkBitmap_Reference#Bitmap'>bitmap</a> draws with <a href='SkPaint_Reference#Paint'>Paint</a> default <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, and stays within
3970its bounds; there is no bleeding with <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a>.
3971the middle and right <a href='SkBitmap_Reference#Bitmap'>bitmaps</a> draw with <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a>; with
3972<a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>, the filter remains within the checkerboard, and
3973with <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> red bleeds on the edges.
3974</div></fiddle-embed></div>
3975
3976### See Also
3977
3978<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
3979
3980<a name='SkCanvas_drawImageRect_2'></a>
3981
3982---
3983
3984<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
3985void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
3986                   <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
3987</pre>
3988
3989Draws <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_drawImageRect_2_isrc'>isrc</a> of <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_2_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_2_dst'>dst</a>.
3990Note that <a href='#SkCanvas_drawImageRect_2_isrc'>isrc</a> is on integer <a href='undocumented#Pixel'>pixel</a> boundaries; <a href='#SkCanvas_drawImageRect_2_dst'>dst</a> may include fractional
3991boundaries. Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a>
3992<a href='#SkCanvas_drawImageRect_2_paint'>paint</a>.
3993
3994If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_2_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
3995<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_2_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
3996If <a href='#SkCanvas_drawImageRect_2_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_2_image'>image</a> bounds.
3997
3998If generated mask extends beyond <a href='#SkCanvas_drawImageRect_2_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_2_image'>image</a> edge colors, just
3999as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4000replicates the <a href='#SkCanvas_drawImageRect_2_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4001
4002<a href='#SkCanvas_drawImageRect_2_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4003sample within <a href='#SkCanvas_drawImageRect_2_isrc'>isrc</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4004improve performance.
4005
4006### Parameters
4007
4008<table>  <tr>    <td><a name='SkCanvas_drawImageRect_2_image'><code><strong>image</strong></code></a></td>
4009    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
4010  </tr>
4011  <tr>    <td><a name='SkCanvas_drawImageRect_2_isrc'><code><strong>isrc</strong></code></a></td>
4012    <td>source <a href='SkIRect_Reference#SkIRect'>SkIRect</a> of <a href='#SkCanvas_drawImageRect_2_image'>image</a> to draw from</td>
4013  </tr>
4014  <tr>    <td><a name='SkCanvas_drawImageRect_2_dst'><code><strong>dst</strong></code></a></td>
4015    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_2_image'>image</a> to draw to</td>
4016  </tr>
4017  <tr>    <td><a name='SkCanvas_drawImageRect_2_paint'><code><strong>paint</strong></code></a></td>
4018    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4019  </tr>
4020</table>
4021
4022and so on; or nullptr
4023
4024### Parameters
4025
4026<table>  <tr>    <td><a name='SkCanvas_drawImageRect_2_constraint'><code><strong>constraint</strong></code></a></td>
4027    <td>filter strictly within <a href='#SkCanvas_drawImageRect_2_isrc'>isrc</a> or draw faster</td>
4028  </tr>
4029</table>
4030
4031### Example
4032
4033<div><fiddle-embed name="7f92cd5c9b9f4b1ac3cd933b08037bfe"></fiddle-embed></div>
4034
4035### See Also
4036
4037<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
4038
4039<a name='SkCanvas_drawImageRect_3'></a>
4040
4041---
4042
4043<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4044void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
4045</pre>
4046
4047Draws <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_3_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_3_dst'>dst</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>,
4048and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_3_paint'>paint</a>.
4049
4050If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_3_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4051<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_3_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4052If <a href='#SkCanvas_drawImageRect_3_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_3_image'>image</a> bounds.
4053
4054If generated mask extends beyond <a href='#SkCanvas_drawImageRect_3_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_3_image'>image</a> edge colors, just
4055as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4056replicates the <a href='#SkCanvas_drawImageRect_3_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4057
4058### Parameters
4059
4060<table>  <tr>    <td><a name='SkCanvas_drawImageRect_3_image'><code><strong>image</strong></code></a></td>
4061    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
4062  </tr>
4063  <tr>    <td><a name='SkCanvas_drawImageRect_3_dst'><code><strong>dst</strong></code></a></td>
4064    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_3_image'>image</a> to draw to</td>
4065  </tr>
4066  <tr>    <td><a name='SkCanvas_drawImageRect_3_paint'><code><strong>paint</strong></code></a></td>
4067    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4068  </tr>
4069</table>
4070
4071and so on; or nullptr
4072
4073### Example
4074
4075<div><fiddle-embed name="3cf8fb639fef99993cafc064d550c739"></fiddle-embed></div>
4076
4077### See Also
4078
4079<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
4080
4081<a name='SkCanvas_drawImageRect_4'></a>
4082
4083---
4084
4085<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4086void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4087                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
4088</pre>
4089
4090Draws <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_4_src'>src</a> of <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_4_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_4_dst'>dst</a>.
4091Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_4_paint'>paint</a>.
4092
4093If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_4_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4094<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_4_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4095If <a href='#SkCanvas_drawImageRect_4_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_4_image'>image</a> bounds.
4096
4097If generated mask extends beyond <a href='#SkCanvas_drawImageRect_4_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_4_image'>image</a> edge colors, just
4098as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4099replicates the <a href='#SkCanvas_drawImageRect_4_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4100
4101### Parameters
4102
4103<table>  <tr>    <td><a name='SkCanvas_drawImageRect_4_image'><code><strong>image</strong></code></a></td>
4104    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
4105  </tr>
4106  <tr>    <td><a name='SkCanvas_drawImageRect_4_src'><code><strong>src</strong></code></a></td>
4107    <td>source <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_4_image'>image</a> to draw from</td>
4108  </tr>
4109  <tr>    <td><a name='SkCanvas_drawImageRect_4_dst'><code><strong>dst</strong></code></a></td>
4110    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_4_image'>image</a> to draw to</td>
4111  </tr>
4112  <tr>    <td><a name='SkCanvas_drawImageRect_4_paint'><code><strong>paint</strong></code></a></td>
4113    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4114  </tr>
4115</table>
4116
4117and so on; or nullptr
4118
4119### Parameters
4120
4121<table>  <tr>    <td><a name='SkCanvas_drawImageRect_4_constraint'><code><strong>constraint</strong></code></a></td>
4122    <td>filter strictly within <a href='#SkCanvas_drawImageRect_4_src'>src</a> or draw faster</td>
4123  </tr>
4124</table>
4125
4126### Example
4127
4128<div><fiddle-embed name="d4b35a9d24c32c042bd1f529b8de3c0d"><div><a href='SkCanvas_Reference#Canvas'>Canvas</a> scales and translates; transformation from <a href='#SkCanvas_drawImageRect_4_src'>src</a> to <a href='#SkCanvas_drawImageRect_4_dst'>dst</a> also scales.
4129The two <a href='SkMatrix_Reference#Matrix'>matrices</a> are concatenated to create the final transformation.
4130</div></fiddle-embed></div>
4131
4132### See Also
4133
4134<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
4135
4136<a name='SkCanvas_drawImageRect_5'></a>
4137
4138---
4139
4140<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4141void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4142                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
4143</pre>
4144
4145Draws <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_drawImageRect_5_isrc'>isrc</a> of <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_5_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_5_dst'>dst</a>.
4146<a href='#SkCanvas_drawImageRect_5_isrc'>isrc</a> is on integer <a href='undocumented#Pixel'>pixel</a> boundaries; <a href='#SkCanvas_drawImageRect_5_dst'>dst</a> may include fractional boundaries.
4147Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_5_paint'>paint</a>.
4148
4149If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_5_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4150<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_5_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4151If <a href='#SkCanvas_drawImageRect_5_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_5_image'>image</a> bounds.
4152
4153If generated mask extends beyond <a href='#SkCanvas_drawImageRect_5_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_5_image'>image</a> edge colors, just
4154as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4155replicates the <a href='#SkCanvas_drawImageRect_5_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4156
4157<a href='#SkCanvas_drawImageRect_5_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4158sample within <a href='#SkCanvas_drawImageRect_5_image'>image</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4159improve performance.
4160
4161### Parameters
4162
4163<table>  <tr>    <td><a name='SkCanvas_drawImageRect_5_image'><code><strong>image</strong></code></a></td>
4164    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
4165  </tr>
4166  <tr>    <td><a name='SkCanvas_drawImageRect_5_isrc'><code><strong>isrc</strong></code></a></td>
4167    <td>source <a href='SkIRect_Reference#SkIRect'>SkIRect</a> of <a href='#SkCanvas_drawImageRect_5_image'>image</a> to draw from</td>
4168  </tr>
4169  <tr>    <td><a name='SkCanvas_drawImageRect_5_dst'><code><strong>dst</strong></code></a></td>
4170    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_5_image'>image</a> to draw to</td>
4171  </tr>
4172  <tr>    <td><a name='SkCanvas_drawImageRect_5_paint'><code><strong>paint</strong></code></a></td>
4173    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4174  </tr>
4175</table>
4176
4177and so on; or nullptr
4178
4179### Parameters
4180
4181<table>  <tr>    <td><a name='SkCanvas_drawImageRect_5_constraint'><code><strong>constraint</strong></code></a></td>
4182    <td>filter strictly within <a href='#SkCanvas_drawImageRect_5_image'>image</a> or draw faster</td>
4183  </tr>
4184</table>
4185
4186### Example
4187
4188<div><fiddle-embed name="d307e7e1237f39fb54d80723e5449857"></fiddle-embed></div>
4189
4190### See Also
4191
4192<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
4193
4194<a name='SkCanvas_drawImageRect_6'></a>
4195
4196---
4197
4198<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4199void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
4200</pre>
4201
4202Draws <a href='SkImage_Reference#SkImage'>SkImage</a> <a href='#SkCanvas_drawImageRect_6_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawImageRect_6_dst'>dst</a>,
4203using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_6_paint'>paint</a>.
4204
4205If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawImageRect_6_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4206<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawImageRect_6_image'>image</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4207If <a href='#SkCanvas_drawImageRect_6_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawImageRect_6_image'>image</a> bounds.
4208
4209If generated mask extends beyond <a href='#SkCanvas_drawImageRect_6_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageRect_6_image'>image</a> edge colors, just
4210as <a href='undocumented#SkShader'>SkShader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4211replicates the <a href='#SkCanvas_drawImageRect_6_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4212
4213constraint set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4214sample within <a href='#SkCanvas_drawImageRect_6_image'>image</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4215improve performance.
4216
4217### Parameters
4218
4219<table>  <tr>    <td><a name='SkCanvas_drawImageRect_6_image'><code><strong>image</strong></code></a></td>
4220    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing pixels, dimensions, and format</td>
4221  </tr>
4222  <tr>    <td><a name='SkCanvas_drawImageRect_6_dst'><code><strong>dst</strong></code></a></td>
4223    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='#SkCanvas_drawImageRect_6_image'>image</a> to draw to</td>
4224  </tr>
4225  <tr>    <td><a name='SkCanvas_drawImageRect_6_paint'><code><strong>paint</strong></code></a></td>
4226    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4227  </tr>
4228</table>
4229
4230and so on; or nullptr
4231
4232### Example
4233
4234<div><fiddle-embed name="3a47ef94cb70144455f80333d8653e6c"></fiddle-embed></div>
4235
4236### See Also
4237
4238<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a>
4239
4240<a name='SkCanvas_drawImageNine'></a>
4241
4242---
4243
4244<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4245void <a href='#SkCanvas_drawImageNine'>drawImageNine</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4246                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4247</pre>
4248
4249Draws <a href='SkImage_Reference#Image'>Image</a> <a href='#SkCanvas_drawImageNine_image'>image</a> stretched proportionally to fit into <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawImageNine_dst'>dst</a>.
4250<a href='SkIRect_Reference#IRect'>IRect</a> <a href='#SkCanvas_drawImageNine_center'>center</a> divides the <a href='#SkCanvas_drawImageNine_image'>image</a> into nine sections: four sides, four corners, and
4251the <a href='#SkCanvas_drawImageNine_center'>center</a>. Corners are unmodified or scaled down proportionately if their sides
4252are larger than <a href='#SkCanvas_drawImageNine_dst'>dst</a>; <a href='#SkCanvas_drawImageNine_center'>center</a> and four sides are scaled to fit remaining space, if any.
4253
4254Additionally transform draw using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and optional <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageNine_paint'>paint</a>.
4255If <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageNine_paint'>paint</a> is supplied, apply <a href='#Color_Filter'>Color_Filter</a>, <a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Image_Filter'>Image_Filter</a>,
4256<a href='#Blend_Mode'>Blend_Mode</a>, and <a href='#Draw_Looper'>Draw_Looper</a>. If image is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#Shader'>Shader</a>.
4257If <a href='#SkCanvas_drawImageNine_paint'>paint</a> contains <a href='#Mask_Filter'>Mask_Filter</a>, generate mask from image bounds. If <a href='#SkCanvas_drawImageNine_paint'>paint</a>
4258<a href='#Filter_Quality'>Filter_Quality</a> set to <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, disable <a href='undocumented#Pixel'>pixel</a> filtering. For all
4259other values of <a href='#SkCanvas_drawImageNine_paint'>paint</a> <a href='#Filter_Quality'>Filter_Quality</a>, use <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a> to filter pixels.
4260Any <a href='undocumented#SkMaskFilter'>SkMaskFilter</a> on <a href='#SkCanvas_drawImageNine_paint'>paint</a> is ignored as is <a href='#SkCanvas_drawImageNine_paint'>paint</a> <a href='#Paint_Anti_Alias'>Anti_Aliasing</a> state.
4261If generated mask extends beyond <a href='#SkCanvas_drawImageNine_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageNine_image'>image</a> edge colors, just
4262as <a href='undocumented#Shader'>Shader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4263replicates the <a href='#SkCanvas_drawImageNine_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4264
4265### Parameters
4266
4267<table>  <tr>    <td><a name='SkCanvas_drawImageNine_image'><code><strong>image</strong></code></a></td>
4268    <td><a href='SkImage_Reference#Image'>Image</a> containing pixels, dimensions, and format</td>
4269  </tr>
4270  <tr>    <td><a name='SkCanvas_drawImageNine_center'><code><strong>center</strong></code></a></td>
4271    <td><a href='SkIRect_Reference#IRect'>IRect</a> edge of <a href='#SkCanvas_drawImageNine_image'>image</a> corners and sides</td>
4272  </tr>
4273  <tr>    <td><a name='SkCanvas_drawImageNine_dst'><code><strong>dst</strong></code></a></td>
4274    <td>destination <a href='SkRect_Reference#Rect'>Rect</a> of <a href='#SkCanvas_drawImageNine_image'>image</a> to draw to</td>
4275  </tr>
4276  <tr>    <td><a name='SkCanvas_drawImageNine_paint'><code><strong>paint</strong></code></a></td>
4277    <td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>,
4278and so on; or nullptr
4279</td>
4280  </tr>
4281</table>
4282
4283### Example
4284
4285<div><fiddle-embed name="4f153cf1d0dbe1a95acf5badeec14dae"><div>The leftmost <a href='#SkCanvas_drawImageNine_image'>image</a> is smaller than <a href='#SkCanvas_drawImageNine_center'>center</a>; only corners are drawn, all scaled to fit.
4286The second <a href='#SkCanvas_drawImageNine_image'>image</a> equals the <a href='undocumented#Size'>size</a> of <a href='#SkCanvas_drawImageNine_center'>center</a>; only corners are drawn without scaling.
4287The remaining images are larger than <a href='#SkCanvas_drawImageNine_center'>center</a>. All corners draw without scaling.
4288The sides and <a href='#SkCanvas_drawImageNine_center'>center</a> are scaled if needed to take up the remaining space.
4289</div></fiddle-embed></div>
4290
4291### See Also
4292
4293<a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageRect'>drawImageRect</a>
4294
4295<a name='SkCanvas_drawImageNine_2'></a>
4296
4297---
4298
4299<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4300void <a href='#SkCanvas_drawImageNine'>drawImageNine</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& <a href='SkImage_Reference#Image'>image</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4301                   const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4302</pre>
4303
4304Draws <a href='SkImage_Reference#Image'>Image</a> <a href='#SkCanvas_drawImageNine_2_image'>image</a> stretched proportionally to fit into <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawImageNine_2_dst'>dst</a>.
4305<a href='SkIRect_Reference#IRect'>IRect</a> <a href='#SkCanvas_drawImageNine_2_center'>center</a> divides the <a href='#SkCanvas_drawImageNine_2_image'>image</a> into nine sections: four sides, four corners, and
4306the <a href='#SkCanvas_drawImageNine_2_center'>center</a>. Corners are not scaled, or scaled down proportionately if their sides
4307are larger than <a href='#SkCanvas_drawImageNine_2_dst'>dst</a>; <a href='#SkCanvas_drawImageNine_2_center'>center</a> and four sides are scaled to fit remaining space, if any.
4308
4309Additionally transform draw using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and optional <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageNine_2_paint'>paint</a>.
4310If <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageNine_2_paint'>paint</a> is supplied, apply <a href='#Color_Filter'>Color_Filter</a>, <a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Image_Filter'>Image_Filter</a>,
4311<a href='#Blend_Mode'>Blend_Mode</a>, and <a href='#Draw_Looper'>Draw_Looper</a>. If image is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#Shader'>Shader</a>.
4312If <a href='#SkCanvas_drawImageNine_2_paint'>paint</a> contains <a href='#Mask_Filter'>Mask_Filter</a>, generate mask from image bounds. If <a href='#SkCanvas_drawImageNine_2_paint'>paint</a>
4313<a href='#Filter_Quality'>Filter_Quality</a> set to <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, disable <a href='undocumented#Pixel'>pixel</a> filtering. For all
4314other values of <a href='#SkCanvas_drawImageNine_2_paint'>paint</a> <a href='#Filter_Quality'>Filter_Quality</a>, use <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a> to filter pixels.
4315Any <a href='undocumented#SkMaskFilter'>SkMaskFilter</a> on <a href='#SkCanvas_drawImageNine_2_paint'>paint</a> is ignored as is <a href='#SkCanvas_drawImageNine_2_paint'>paint</a> <a href='#Paint_Anti_Alias'>Anti_Aliasing</a> state.
4316If generated mask extends beyond <a href='#SkCanvas_drawImageNine_2_image'>image</a> bounds, replicate <a href='#SkCanvas_drawImageNine_2_image'>image</a> edge colors, just
4317as <a href='undocumented#Shader'>Shader</a> made from <a href='SkImage_Reference#SkImage'>SkImage</a>::<a href='#SkImage_makeShader'>makeShader</a> with <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set
4318replicates the <a href='#SkCanvas_drawImageNine_2_image'>image</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples outside of its bounds.
4319
4320### Parameters
4321
4322<table>  <tr>    <td><a name='SkCanvas_drawImageNine_2_image'><code><strong>image</strong></code></a></td>
4323    <td><a href='SkImage_Reference#Image'>Image</a> containing pixels, dimensions, and format</td>
4324  </tr>
4325  <tr>    <td><a name='SkCanvas_drawImageNine_2_center'><code><strong>center</strong></code></a></td>
4326    <td><a href='SkIRect_Reference#IRect'>IRect</a> edge of <a href='#SkCanvas_drawImageNine_2_image'>image</a> corners and sides</td>
4327  </tr>
4328  <tr>    <td><a name='SkCanvas_drawImageNine_2_dst'><code><strong>dst</strong></code></a></td>
4329    <td>destination <a href='SkRect_Reference#Rect'>Rect</a> of <a href='#SkCanvas_drawImageNine_2_image'>image</a> to draw to</td>
4330  </tr>
4331  <tr>    <td><a name='SkCanvas_drawImageNine_2_paint'><code><strong>paint</strong></code></a></td>
4332    <td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>,
4333and so on; or nullptr
4334</td>
4335  </tr>
4336</table>
4337
4338### Example
4339
4340<div><fiddle-embed name="d597d9af8d17fd93e634dd12017058e2"><div>The two leftmost images has four corners and sides to the left and right of <a href='#SkCanvas_drawImageNine_2_center'>center</a>.
4341The leftmost <a href='#SkCanvas_drawImageNine_2_image'>image</a> scales the width of corners proportionately to fit.
4342The third and fourth <a href='#SkCanvas_drawImageNine_2_image'>image</a> corners are not scaled; the sides and <a href='#SkCanvas_drawImageNine_2_center'>center</a> are scaled to
4343fill the remaining space.
4344The rightmost <a href='#SkCanvas_drawImageNine_2_image'>image</a> has four corners scaled vertically to fit, and uses sides above
4345and below <a href='#SkCanvas_drawImageNine_2_center'>center</a> to fill the remaining space.
4346</div></fiddle-embed></div>
4347
4348### See Also
4349
4350<a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a> <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawImageRect'>drawImageRect</a>
4351
4352<a name='SkCanvas_drawBitmap'></a>
4353
4354---
4355
4356<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4357void <a href='#SkCanvas_drawBitmap'>drawBitmap</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, <a href='undocumented#SkScalar'>SkScalar</a> left, <a href='undocumented#SkScalar'>SkScalar</a> top, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4358</pre>
4359
4360Draws <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a>, with its top-left corner at (<a href='#SkCanvas_drawBitmap_left'>left</a>, <a href='#SkCanvas_drawBitmap_top'>top</a>),
4361using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmap_paint'>paint</a>.
4362
4363If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmap_paint'>paint</a> is not nullptr, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4364<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4365If <a href='#SkCanvas_drawBitmap_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a> bounds.
4366
4367If generated mask extends beyond <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a> edge colors,
4368just as <a href='undocumented#SkShader'>SkShader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4369<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4370outside of its bounds.
4371
4372### Parameters
4373
4374<table>  <tr>    <td><a name='SkCanvas_drawBitmap_bitmap'><code><strong>bitmap</strong></code></a></td>
4375    <td><a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing pixels, dimensions, and format</td>
4376  </tr>
4377  <tr>    <td><a name='SkCanvas_drawBitmap_left'><code><strong>left</strong></code></a></td>
4378    <td><a href='#SkCanvas_drawBitmap_left'>left side</a> of <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a></td>
4379  </tr>
4380  <tr>    <td><a name='SkCanvas_drawBitmap_top'><code><strong>top</strong></code></a></td>
4381    <td><a href='#SkCanvas_drawBitmap_top'>top</a> side of <a href='#SkCanvas_drawBitmap_bitmap'>bitmap</a></td>
4382  </tr>
4383  <tr>    <td><a name='SkCanvas_drawBitmap_paint'><code><strong>paint</strong></code></a></td>
4384    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4385  </tr>
4386</table>
4387
4388and so on; or nullptr
4389
4390### Example
4391
4392<div><fiddle-embed name="4a521be1f850058541e136a808c65e78"></fiddle-embed></div>
4393
4394### See Also
4395
4396<a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a> <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_readPixels'>readPixels</a> <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>::<a href='#SkBitmap_writePixels'>writePixels</a>
4397
4398<a name='SkCanvas_drawBitmapRect'></a>
4399
4400---
4401
4402<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4403void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4404                    const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
4405</pre>
4406
4407Draws <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawBitmapRect_src'>src</a> of <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawBitmapRect_dst'>dst</a>.
4408Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_paint'>paint</a>.
4409
4410If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4411<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4412If <a href='#SkCanvas_drawBitmapRect_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a> bounds.
4413
4414If generated mask extends beyond <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a> edge colors,
4415just as <a href='undocumented#SkShader'>SkShader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4416<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmapRect_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4417outside of its bounds.
4418
4419<a href='#SkCanvas_drawBitmapRect_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4420sample within <a href='#SkCanvas_drawBitmapRect_src'>src</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4421improve performance.
4422
4423### Parameters
4424
4425<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_bitmap'><code><strong>bitmap</strong></code></a></td>
4426    <td><a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing pixels, dimensions, and format</td>
4427  </tr>
4428  <tr>    <td><a name='SkCanvas_drawBitmapRect_src'><code><strong>src</strong></code></a></td>
4429    <td>source <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='SkImage_Reference#Image'>image</a> to draw from</td>
4430  </tr>
4431  <tr>    <td><a name='SkCanvas_drawBitmapRect_dst'><code><strong>dst</strong></code></a></td>
4432    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='SkImage_Reference#Image'>image</a> to draw to</td>
4433  </tr>
4434  <tr>    <td><a name='SkCanvas_drawBitmapRect_paint'><code><strong>paint</strong></code></a></td>
4435    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4436  </tr>
4437</table>
4438
4439and so on; or nullptr
4440
4441### Parameters
4442
4443<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_constraint'><code><strong>constraint</strong></code></a></td>
4444    <td>filter strictly within <a href='#SkCanvas_drawBitmapRect_src'>src</a> or draw faster</td>
4445  </tr>
4446</table>
4447
4448### Example
4449
4450<div><fiddle-embed name="7d04932f2a259cc70d6e45cd25a6feb6"></fiddle-embed></div>
4451
4452### See Also
4453
4454<a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>
4455
4456<a name='SkCanvas_drawBitmapRect_2'></a>
4457
4458---
4459
4460<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4461void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4462                    const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>, <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
4463</pre>
4464
4465Draws <a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkCanvas_drawBitmapRect_2_isrc'>isrc</a> of <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawBitmapRect_2_dst'>dst</a>.
4466<a href='#SkCanvas_drawBitmapRect_2_isrc'>isrc</a> is on integer <a href='undocumented#Pixel'>pixel</a> boundaries; <a href='#SkCanvas_drawBitmapRect_2_dst'>dst</a> may include fractional boundaries.
4467Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_2_paint'>paint</a>.
4468
4469If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_2_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4470<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4471If <a href='#SkCanvas_drawBitmapRect_2_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a> bounds.
4472
4473If generated mask extends beyond <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a> edge colors,
4474just as <a href='undocumented#SkShader'>SkShader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4475<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmapRect_2_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4476outside of its bounds.
4477
4478<a href='#SkCanvas_drawBitmapRect_2_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4479sample within <a href='#SkCanvas_drawBitmapRect_2_isrc'>isrc</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4480improve performance.
4481
4482### Parameters
4483
4484<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_2_bitmap'><code><strong>bitmap</strong></code></a></td>
4485    <td><a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing pixels, dimensions, and format</td>
4486  </tr>
4487  <tr>    <td><a name='SkCanvas_drawBitmapRect_2_isrc'><code><strong>isrc</strong></code></a></td>
4488    <td>source <a href='SkIRect_Reference#SkIRect'>SkIRect</a> of <a href='SkImage_Reference#Image'>image</a> to draw from</td>
4489  </tr>
4490  <tr>    <td><a name='SkCanvas_drawBitmapRect_2_dst'><code><strong>dst</strong></code></a></td>
4491    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='SkImage_Reference#Image'>image</a> to draw to</td>
4492  </tr>
4493  <tr>    <td><a name='SkCanvas_drawBitmapRect_2_paint'><code><strong>paint</strong></code></a></td>
4494    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4495  </tr>
4496</table>
4497
4498and so on; or nullptr
4499
4500### Parameters
4501
4502<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_2_constraint'><code><strong>constraint</strong></code></a></td>
4503    <td>sample strictly within <a href='#SkCanvas_drawBitmapRect_2_isrc'>isrc</a>, or draw faster</td>
4504  </tr>
4505</table>
4506
4507### Example
4508
4509<div><fiddle-embed name="0a3c6d2459566e58cee7d4910655ee21"></fiddle-embed></div>
4510
4511### See Also
4512
4513<a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>
4514
4515<a name='SkCanvas_drawBitmapRect_3'></a>
4516
4517---
4518
4519<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4520void <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>,
4521                    <a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>)
4522</pre>
4523
4524Draws <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a>, scaled and translated to fill <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawBitmapRect_3_dst'>dst</a>.
4525<a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> bounds is on integer <a href='undocumented#Pixel'>pixel</a> boundaries; <a href='#SkCanvas_drawBitmapRect_3_dst'>dst</a> may include fractional boundaries.
4526Additionally transform draw using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_3_paint'>paint</a>.
4527
4528If <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawBitmapRect_3_paint'>paint</a> is supplied, apply <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,
4529<a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>. If <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#SkShader'>SkShader</a>.
4530If <a href='#SkCanvas_drawBitmapRect_3_paint'>paint</a> contains <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, generate mask from <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> bounds.
4531
4532If generated mask extends beyond <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> edge colors,
4533just as <a href='undocumented#SkShader'>SkShader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4534<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4535outside of its bounds.
4536
4537<a href='#SkCanvas_drawBitmapRect_3_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a> limits <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#SkFilterQuality'>SkFilterQuality</a> to
4538sample within <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast_SrcRectConstraint</a> allows sampling outside to
4539improve performance.
4540
4541### Parameters
4542
4543<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_3_bitmap'><code><strong>bitmap</strong></code></a></td>
4544    <td><a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a> containing pixels, dimensions, and format</td>
4545  </tr>
4546  <tr>    <td><a name='SkCanvas_drawBitmapRect_3_dst'><code><strong>dst</strong></code></a></td>
4547    <td>destination <a href='SkRect_Reference#SkRect'>SkRect</a> of <a href='SkImage_Reference#Image'>image</a> to draw to</td>
4548  </tr>
4549  <tr>    <td><a name='SkCanvas_drawBitmapRect_3_paint'><code><strong>paint</strong></code></a></td>
4550    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> containing <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>,</td>
4551  </tr>
4552</table>
4553
4554and so on; or nullptr
4555
4556### Parameters
4557
4558<table>  <tr>    <td><a name='SkCanvas_drawBitmapRect_3_constraint'><code><strong>constraint</strong></code></a></td>
4559    <td>filter strictly within <a href='#SkCanvas_drawBitmapRect_3_bitmap'>bitmap</a> or draw faster</td>
4560  </tr>
4561</table>
4562
4563### Example
4564
4565<div><fiddle-embed name="bdbeac3c97f60a63987b1cc8e1f1e91e"></fiddle-embed></div>
4566
4567### See Also
4568
4569<a href='#SkCanvas_drawImageRect'>drawImageRect</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>
4570
4571<a name='SkCanvas_drawBitmapNine'></a>
4572
4573---
4574
4575<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4576void <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4577                    const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4578</pre>
4579
4580Draws <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> stretched proportionally to fit into <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawBitmapNine_dst'>dst</a>.
4581<a href='SkIRect_Reference#IRect'>IRect</a> <a href='#SkCanvas_drawBitmapNine_center'>center</a> divides the <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> into nine sections: four sides, four corners,
4582and the <a href='#SkCanvas_drawBitmapNine_center'>center</a>. Corners are not scaled, or scaled down proportionately if their
4583sides are larger than <a href='#SkCanvas_drawBitmapNine_dst'>dst</a>; <a href='#SkCanvas_drawBitmapNine_center'>center</a> and four sides are scaled to fit remaining
4584space, if any.
4585
4586Additionally transform draw using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and optional <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawBitmapNine_paint'>paint</a>.
4587If <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawBitmapNine_paint'>paint</a> is supplied, apply <a href='#Color_Filter'>Color_Filter</a>, <a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Image_Filter'>Image_Filter</a>,
4588<a href='#Blend_Mode'>Blend_Mode</a>, and <a href='#Draw_Looper'>Draw_Looper</a>. If bitmap is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#Shader'>Shader</a>.
4589If <a href='#SkCanvas_drawBitmapNine_paint'>paint</a> contains <a href='#Mask_Filter'>Mask_Filter</a>, generate mask from bitmap bounds. If <a href='#SkCanvas_drawBitmapNine_paint'>paint</a>
4590<a href='#Filter_Quality'>Filter_Quality</a> set to <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, disable <a href='undocumented#Pixel'>pixel</a> filtering. For all
4591other values of <a href='#SkCanvas_drawBitmapNine_paint'>paint</a> <a href='#Filter_Quality'>Filter_Quality</a>, use <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a> to filter pixels.
4592Any <a href='undocumented#SkMaskFilter'>SkMaskFilter</a> on <a href='#SkCanvas_drawBitmapNine_paint'>paint</a> is ignored as is <a href='#SkCanvas_drawBitmapNine_paint'>paint</a> <a href='#Paint_Anti_Alias'>Anti_Aliasing</a> state.
4593If generated mask extends beyond <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> edge colors,
4594just as <a href='undocumented#Shader'>Shader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4595<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4596outside of its bounds.
4597
4598### Parameters
4599
4600<table>  <tr>    <td><a name='SkCanvas_drawBitmapNine_bitmap'><code><strong>bitmap</strong></code></a></td>
4601    <td><a href='SkBitmap_Reference#Bitmap'>Bitmap</a> containing pixels, dimensions, and format</td>
4602  </tr>
4603  <tr>    <td><a name='SkCanvas_drawBitmapNine_center'><code><strong>center</strong></code></a></td>
4604    <td><a href='SkIRect_Reference#IRect'>IRect</a> edge of <a href='SkImage_Reference#Image'>image</a> corners and sides</td>
4605  </tr>
4606  <tr>    <td><a name='SkCanvas_drawBitmapNine_dst'><code><strong>dst</strong></code></a></td>
4607    <td>destination <a href='SkRect_Reference#Rect'>Rect</a> of <a href='SkImage_Reference#Image'>image</a> to draw to</td>
4608  </tr>
4609  <tr>    <td><a name='SkCanvas_drawBitmapNine_paint'><code><strong>paint</strong></code></a></td>
4610    <td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>,
4611and so on; or nullptr
4612</td>
4613  </tr>
4614</table>
4615
4616### Example
4617
4618<div><fiddle-embed name="e99e7be0d8f67dfacbecf85df585433d"><div>The two leftmost <a href='#SkCanvas_drawBitmapNine_bitmap'>bitmap</a> draws has four corners and sides to the left and right of <a href='#SkCanvas_drawBitmapNine_center'>center</a>.
4619The leftmost  <a href='SkBitmap_Reference#Bitmap_Draw'>bitmap draw</a> scales the width of corners proportionately to fit.
4620The third and fourth draw corners are not scaled; the sides and <a href='#SkCanvas_drawBitmapNine_center'>center</a> are scaled to
4621fill the remaining space.
4622The rightmost  <a href='SkBitmap_Reference#Bitmap_Draw'>bitmap draw</a> has four corners scaled vertically to fit, and uses sides above
4623and below <a href='#SkCanvas_drawBitmapNine_center'>center</a> to fill the remaining space.
4624</div></fiddle-embed></div>
4625
4626### See Also
4627
4628<a href='#SkCanvas_drawImageNine'>drawImageNine</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawBitmapRect'>drawBitmapRect</a>
4629
4630<a name='Draw_Image_Lattice'></a>
4631
4632<a name='SkCanvas_Lattice'></a>
4633
4634---
4635
4636<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
4637    struct <a href='#SkCanvas_Lattice'>Lattice</a> {
4638
4639        enum <a href='#SkCanvas_Lattice_RectType'>RectType</a> : uint8_t {
4640            <a href='#SkCanvas_Lattice_kDefault'>kDefault</a> = 0,
4641            <a href='#SkCanvas_Lattice_kTransparent'>kTransparent</a>,
4642            <a href='#SkCanvas_Lattice_kFixedColor'>kFixedColor</a>,
4643        };
4644
4645        const int* <a href='#SkCanvas_Lattice_fXDivs'>fXDivs</a>;
4646        const int* <a href='#SkCanvas_Lattice_fYDivs'>fYDivs</a>;
4647        const <a href='#SkCanvas_Lattice_RectType'>RectType</a>* <a href='#SkCanvas_Lattice_fRectTypes'>fRectTypes</a>;
4648        int <a href='#SkCanvas_Lattice_fXCount'>fXCount</a>;
4649        int <a href='#SkCanvas_Lattice_fYCount'>fYCount</a>;
4650        const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>* <a href='#SkCanvas_Lattice_fBounds'>fBounds</a>;
4651        const <a href='SkColor_Reference#SkColor'>SkColor</a>* <a href='#SkCanvas_Lattice_fColors'>fColors</a>;
4652    };
4653
4654</pre>
4655
4656<a href='#SkCanvas_Lattice'>Lattice</a> divides <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> or <a href='SkImage_Reference#Image'>Image</a> into a rectangular grid.
4657Grid entries on even columns and even rows are fixed; these entries are
4658always drawn at their original <a href='undocumented#Size'>size</a> if the destination is large enough.
4659If the destination side is too small to hold the fixed entries, all fixed
4660entries are proportionately scaled down to fit.
4661The grid entries not on even columns and rows are scaled to fit the
4662remaining space, if any.
4663
4664<a name='SkCanvas_Lattice_RectType'></a>
4665
4666---
4667
4668<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
4669        enum <a href='#SkCanvas_Lattice_RectType'>RectType</a> : uint8_t {
4670            <a href='#SkCanvas_Lattice_kDefault'>kDefault</a> = 0,
4671            <a href='#SkCanvas_Lattice_kTransparent'>kTransparent</a>,
4672            <a href='#SkCanvas_Lattice_kFixedColor'>kFixedColor</a>,
4673        };
4674
4675</pre>
4676
4677Optional setting per rectangular grid entry to make it transparent,
4678or to fill the grid entry with a <a href='SkColor_Reference#Color'>color</a>.
4679
4680### Constants
4681
4682<table style='border-collapse: collapse; width: 62.5em'>
4683  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
4684<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
4685<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
4686  <tr style='background-color: #f0f0f0; '>
4687    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_kDefault'><code>SkCanvas::Lattice::kDefault</code></a></td>
4688    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
4689    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4690draws Bitmap into lattice rectangle</td>
4691  </tr>
4692  <tr>
4693    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_kTransparent'><code>SkCanvas::Lattice::kTransparent</code></a></td>
4694    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
4695    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4696skips lattice rectangle by making it transparent</td>
4697  </tr>
4698  <tr style='background-color: #f0f0f0; '>
4699    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_kFixedColor'><code>SkCanvas::Lattice::kFixedColor</code></a></td>
4700    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
4701    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4702draws one of fColors into lattice rectangle</td>
4703  </tr>
4704</table>
4705
4706<a name='Draw_Image_Lattice_Members'></a><table style='border-collapse: collapse; width: 62.5em'>
4707
4708  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Type</th>
4709<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Member</th>
4710<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
4711  <tr style='background-color: #f0f0f0; '>
4712    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;int*</td>
4713    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fXDivs'><code>fXDivs</code></a></td>
4714    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4715Array of x-axis values that divide the <a href='SkBitmap_Reference#Bitmap'>bitmap</a> vertically.
4716Array entries must be unique, increasing, greater than or equal to
4717<a href='#SkCanvas_Lattice_fBounds'>fBounds</a> left edge, and less than <a href='#SkCanvas_Lattice_fBounds'>fBounds</a> right edge.
4718Set the first element to <a href='#SkCanvas_Lattice_fBounds'>fBounds</a> left to collapse the left column of
4719fixed grid entries.
4720</td>
4721  </tr>
4722  <tr>
4723    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;int*</td>
4724    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fYDivs'><code>fYDivs</code></a></td>
4725    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4726Array of y-axis values that divide the <a href='SkBitmap_Reference#Bitmap'>bitmap</a> horizontally.
4727Array entries must be unique, increasing, greater than or equal to
4728<a href='#SkCanvas_Lattice_fBounds'>fBounds</a> top edge, and less than <a href='#SkCanvas_Lattice_fBounds'>fBounds</a> bottom edge.
4729Set the first element to <a href='#SkCanvas_Lattice_fBounds'>fBounds</a> top to collapse the top row of fixed
4730grid entries.
4731</td>
4732  </tr>
4733  <tr style='background-color: #f0f0f0; '>
4734    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;RectType*</td>
4735    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fRectTypes'><code>fRectTypes</code></a></td>
4736    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4737Optional array of fill types, one per rectangular grid entry:
4738array length must be <code>(<a href='#SkCanvas_Lattice_fXCount'>fXCount</a> + 1) * (<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> + 1)</code>.
4739
4740Each <a href='#SkCanvas_Lattice_RectType'>RectType</a> is one of: <a href='#SkCanvas_Lattice_kDefault'>kDefault</a>, <a href='#SkCanvas_Lattice_kTransparent'>kTransparent</a>, <a href='#SkCanvas_Lattice_kFixedColor'>kFixedColor</a>.
4741
4742Array entries correspond to the rectangular grid entries, ascending
4743left to right and then top to bottom.
4744</td>
4745  </tr>
4746  <tr>
4747    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>int</td>
4748    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fXCount'><code>fXCount</code></a></td>
4749    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4750Number of entries in <a href='#SkCanvas_Lattice_fXDivs'>fXDivs</a> array; one less than the number of
4751horizontal divisions.
4752</td>
4753  </tr>
4754  <tr style='background-color: #f0f0f0; '>
4755    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>int</td>
4756    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fYCount'><code>fYCount</code></a></td>
4757    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4758Number of entries in <a href='#SkCanvas_Lattice_fYDivs'>fYDivs</a> array; one less than the number of vertical
4759divisions.
4760</td>
4761  </tr>
4762  <tr>
4763    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkIRect*</td>
4764    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fBounds'><code>fBounds</code></a></td>
4765    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4766Optional subset <a href='SkIRect_Reference#IRect'>IRect</a> source to draw from.
4767If nullptr, source bounds is dimensions of <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> or <a href='SkImage_Reference#Image'>Image</a>.
4768</td>
4769  </tr>
4770  <tr style='background-color: #f0f0f0; '>
4771    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>const&nbsp;SkColor*</td>
4772    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fColors'><code>fColors</code></a></td>
4773    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
4774Optional array of colors, one per rectangular grid entry.
4775Array length must be <code>(<a href='#SkCanvas_Lattice_fXCount'>fXCount</a> + 1) * (<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> + 1)</code>.
4776
4777Array entries correspond to the rectangular grid entries, ascending
4778left to right, then top to bottom.
4779</td>
4780  </tr>
4781</table>
4782
4783<a name='SkCanvas_drawBitmapLattice'></a>
4784
4785---
4786
4787<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4788void <a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a>(const <a href='SkBitmap_Reference#SkBitmap'>SkBitmap</a>& <a href='SkBitmap_Reference#Bitmap'>bitmap</a>, const <a href='#SkCanvas_Lattice'>Lattice</a>& lattice, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4789                       const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4790</pre>
4791
4792Draws <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> stretched proportionally to fit into <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawBitmapLattice_dst'>dst</a>.
4793
4794<a href='#SkCanvas_Lattice'>Lattice</a> <a href='#SkCanvas_drawBitmapLattice_lattice'>lattice</a> divides <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> into a rectangular grid.
4795Each intersection of an even-numbered row and column is fixed; like the corners
4796of <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>, fixed <a href='#SkCanvas_drawBitmapLattice_lattice'>lattice</a> elements never scale larger than their initial
4797<a href='undocumented#Size'>size</a> and shrink proportionately when all fixed elements exceed the <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a>
4798dimension. All other grid elements scale to fill the available space, if any.
4799
4800Additionally transform draw using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and optional <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a>.
4801If <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a> is supplied, apply <a href='#Color_Filter'>Color_Filter</a>, <a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Image_Filter'>Image_Filter</a>,
4802<a href='#Blend_Mode'>Blend_Mode</a>, and <a href='#Draw_Looper'>Draw_Looper</a>. If bitmap is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#Shader'>Shader</a>.
4803If <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a> contains <a href='#Mask_Filter'>Mask_Filter</a>, generate mask from bitmap bounds. If <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a>
4804<a href='#Filter_Quality'>Filter_Quality</a> set to <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, disable <a href='undocumented#Pixel'>pixel</a> filtering. For all
4805other values of <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a> <a href='#Filter_Quality'>Filter_Quality</a>, use <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a> to filter pixels.
4806Any <a href='undocumented#SkMaskFilter'>SkMaskFilter</a> on <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a> is ignored as is <a href='#SkCanvas_drawBitmapLattice_paint'>paint</a> <a href='#Paint_Anti_Alias'>Anti_Aliasing</a> state.
4807If generated mask extends beyond <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> bounds, replicate <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> edge colors,
4808just as <a href='undocumented#Shader'>Shader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4809<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4810outside of its bounds.
4811
4812### Parameters
4813
4814<table>  <tr>    <td><a name='SkCanvas_drawBitmapLattice_bitmap'><code><strong>bitmap</strong></code></a></td>
4815    <td><a href='SkBitmap_Reference#Bitmap'>Bitmap</a> containing pixels, dimensions, and format</td>
4816  </tr>
4817  <tr>    <td><a name='SkCanvas_drawBitmapLattice_lattice'><code><strong>lattice</strong></code></a></td>
4818    <td>division of <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> into fixed and variable rectangles</td>
4819  </tr>
4820  <tr>    <td><a name='SkCanvas_drawBitmapLattice_dst'><code><strong>dst</strong></code></a></td>
4821    <td>destination <a href='SkRect_Reference#Rect'>Rect</a> of <a href='SkImage_Reference#Image'>image</a> to draw to</td>
4822  </tr>
4823  <tr>    <td><a name='SkCanvas_drawBitmapLattice_paint'><code><strong>paint</strong></code></a></td>
4824    <td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>,
4825and so on; or nullptr
4826</td>
4827  </tr>
4828</table>
4829
4830### Example
4831
4832<div><fiddle-embed name="c5bfa944e17ba4a4400dc799f032069c"><div>The two leftmost <a href='#SkCanvas_drawBitmapLattice_bitmap'>bitmap</a> draws has four corners and sides to the left and right of center.
4833The leftmost  <a href='SkBitmap_Reference#Bitmap_Draw'>bitmap draw</a> scales the width of corners proportionately to fit.
4834The third and fourth draw corners are not scaled; the sides are scaled to
4835fill the remaining space; the center is transparent.
4836The rightmost  <a href='SkBitmap_Reference#Bitmap_Draw'>bitmap draw</a> has four corners scaled vertically to fit, and uses sides above
4837and below center to fill the remaining space.
4838</div></fiddle-embed></div>
4839
4840### See Also
4841
4842<a href='#SkCanvas_drawImageLattice'>drawImageLattice</a> <a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a> <a href='#SkCanvas_Lattice'>Lattice</a>
4843
4844<a name='SkCanvas_drawImageLattice'></a>
4845
4846---
4847
4848<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4849void <a href='#SkCanvas_drawImageLattice'>drawImageLattice</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* <a href='SkImage_Reference#Image'>image</a>, const <a href='#SkCanvas_Lattice'>Lattice</a>& lattice, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
4850                      const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a> = nullptr)
4851</pre>
4852
4853Draws <a href='SkImage_Reference#Image'>Image</a> <a href='#SkCanvas_drawImageLattice_image'>image</a> stretched proportionally to fit into <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawImageLattice_dst'>dst</a>.
4854
4855<a href='#SkCanvas_Lattice'>Lattice</a> <a href='#SkCanvas_drawImageLattice_lattice'>lattice</a> divides <a href='#SkCanvas_drawImageLattice_image'>image</a> into a rectangular grid.
4856Each intersection of an even-numbered row and column is fixed; like the corners
4857of <a href='#SkCanvas_drawBitmapNine'>drawBitmapNine</a>, fixed <a href='#SkCanvas_drawImageLattice_lattice'>lattice</a> elements never scale larger than their initial
4858<a href='undocumented#Size'>size</a> and shrink proportionately when all fixed elements exceed the <a href='SkBitmap_Reference#Bitmap'>bitmap</a>
4859dimension. All other grid elements scale to fill the available space, if any.
4860
4861Additionally transform draw using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and optional <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageLattice_paint'>paint</a>.
4862If <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawImageLattice_paint'>paint</a> is supplied, apply <a href='#Color_Filter'>Color_Filter</a>, <a href='#Color_Alpha'>Color_Alpha</a>, <a href='#Image_Filter'>Image_Filter</a>,
4863<a href='#Blend_Mode'>Blend_Mode</a>, and <a href='#Draw_Looper'>Draw_Looper</a>. If image is <a href='SkImageInfo_Reference#kAlpha_8_SkColorType'>kAlpha_8_SkColorType</a>, apply <a href='undocumented#Shader'>Shader</a>.
4864If <a href='#SkCanvas_drawImageLattice_paint'>paint</a> contains <a href='#Mask_Filter'>Mask_Filter</a>, generate mask from image bounds. If <a href='#SkCanvas_drawImageLattice_paint'>paint</a>
4865<a href='#Filter_Quality'>Filter_Quality</a> set to <a href='undocumented#kNone_SkFilterQuality'>kNone_SkFilterQuality</a>, disable <a href='undocumented#Pixel'>pixel</a> filtering. For all
4866other values of <a href='#SkCanvas_drawImageLattice_paint'>paint</a> <a href='#Filter_Quality'>Filter_Quality</a>, use <a href='undocumented#kLow_SkFilterQuality'>kLow_SkFilterQuality</a> to filter pixels.
4867Any <a href='undocumented#SkMaskFilter'>SkMaskFilter</a> on <a href='#SkCanvas_drawImageLattice_paint'>paint</a> is ignored as is <a href='#SkCanvas_drawImageLattice_paint'>paint</a> <a href='#Paint_Anti_Alias'>Anti_Aliasing</a> state.
4868If generated mask extends beyond <a href='SkBitmap_Reference#Bitmap'>bitmap</a> bounds, replicate <a href='SkBitmap_Reference#Bitmap'>bitmap</a> edge colors,
4869just as <a href='undocumented#Shader'>Shader</a> made from <a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_MakeBitmapShader'>MakeBitmapShader</a> with
4870<a href='undocumented#SkShader'>SkShader</a>::<a href='#SkShader_kClamp_TileMode'>kClamp_TileMode</a> set replicates the <a href='SkBitmap_Reference#Bitmap'>bitmap</a> edge <a href='SkColor_Reference#Color'>color</a> when it samples
4871outside of its bounds.
4872
4873### Parameters
4874
4875<table>  <tr>    <td><a name='SkCanvas_drawImageLattice_image'><code><strong>image</strong></code></a></td>
4876    <td><a href='SkImage_Reference#Image'>Image</a> containing pixels, dimensions, and format</td>
4877  </tr>
4878  <tr>    <td><a name='SkCanvas_drawImageLattice_lattice'><code><strong>lattice</strong></code></a></td>
4879    <td>division of <a href='SkBitmap_Reference#Bitmap'>bitmap</a> into fixed and variable rectangles</td>
4880  </tr>
4881  <tr>    <td><a name='SkCanvas_drawImageLattice_dst'><code><strong>dst</strong></code></a></td>
4882    <td>destination <a href='SkRect_Reference#Rect'>Rect</a> of <a href='#SkCanvas_drawImageLattice_image'>image</a> to draw to</td>
4883  </tr>
4884  <tr>    <td><a name='SkCanvas_drawImageLattice_paint'><code><strong>paint</strong></code></a></td>
4885    <td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='#Blend_Mode'>Blend_Mode</a>, <a href='#Color_Filter'>Color_Filter</a>, <a href='#Image_Filter'>Image_Filter</a>,
4886and so on; or nullptr
4887</td>
4888  </tr>
4889</table>
4890
4891### Example
4892
4893<div><fiddle-embed name="4f153cf1d0dbe1a95acf5badeec14dae"><div>The leftmost <a href='#SkCanvas_drawImageLattice_image'>image</a> is smaller than center; only corners are drawn, all scaled to fit.
4894The second <a href='#SkCanvas_drawImageLattice_image'>image</a> equals the <a href='undocumented#Size'>size</a> of center; only corners are drawn without scaling.
4895The remaining images are larger than center. All corners draw without scaling. The sides
4896are scaled if needed to take up the remaining space; the center is transparent.
4897</div></fiddle-embed></div>
4898
4899### See Also
4900
4901<a href='#SkCanvas_drawBitmapLattice'>drawBitmapLattice</a> <a href='#SkCanvas_drawImage'>drawImage</a> <a href='#SkCanvas_drawImageNine'>drawImageNine</a> <a href='#SkCanvas_Lattice'>Lattice</a>
4902
4903<a name='Draw_Text'></a>
4904
4905<a name='SkCanvas_drawText'></a>
4906
4907---
4908
4909<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4910void <a href='#SkCanvas_drawText'>drawText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
4911</pre>
4912
4913Draws <a href='#SkCanvas_drawText_text'>text</a>, with origin at (<a href='#SkCanvas_drawText_x'>x</a>, <a href='#SkCanvas_drawText_y'>y</a>), using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawText_paint'>paint</a>.
4914
4915<a href='#SkCanvas_drawText_text'>text</a> meaning depends on <a href='undocumented#SkTextEncoding'>SkTextEncoding</a>; by default, <a href='#SkCanvas_drawText_text'>text</a> is encoded as
4916UTF-8.
4917
4918<a href='#SkCanvas_drawText_x'>x</a> and <a href='#SkCanvas_drawText_y'>y</a> meaning depends on <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::Align and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> vertical <a href='#SkCanvas_drawText_text'>text</a>; by default
4919<a href='#SkCanvas_drawText_text'>text</a> draws left to right, positioning the first <a href='undocumented#Glyph'>glyph</a>   <a href='undocumented#Left_Side_Bearing'>left side bearing</a> at <a href='#SkCanvas_drawText_x'>x</a>
4920and its baseline at <a href='#SkCanvas_drawText_y'>y</a>. <a href='undocumented#Text'>Text</a> <a href='undocumented#Size'>size</a> is affected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawText_text'>text</a> <a href='undocumented#Size'>size</a>.
4921
4922All elements of <a href='#SkCanvas_drawText_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
4923<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='#SkCanvas_drawText_text'>text</a>. By default, draws
4924filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
4925
4926### Parameters
4927
4928<table>  <tr>    <td><a name='SkCanvas_drawText_text'><code><strong>text</strong></code></a></td>
4929    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn</td>
4930  </tr>
4931  <tr>    <td><a name='SkCanvas_drawText_byteLength'><code><strong>byteLength</strong></code></a></td>
4932    <td>byte length of <a href='#SkCanvas_drawText_text'>text</a> array</td>
4933  </tr>
4934  <tr>    <td><a name='SkCanvas_drawText_x'><code><strong>x</strong></code></a></td>
4935    <td>start of <a href='#SkCanvas_drawText_text'>text</a> on x-axis</td>
4936  </tr>
4937  <tr>    <td><a name='SkCanvas_drawText_y'><code><strong>y</strong></code></a></td>
4938    <td>start of <a href='#SkCanvas_drawText_text'>text</a> on y-axis</td>
4939  </tr>
4940  <tr>    <td><a name='SkCanvas_drawText_paint'><code><strong>paint</strong></code></a></td>
4941    <td><a href='#SkCanvas_drawText_text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
4942  </tr>
4943</table>
4944
4945### Example
4946
4947<div><fiddle-embed name="55f5e59350622c5e2834d1c85789f732"><div>The same <a href='#SkCanvas_drawText_text'>text</a> is drawn varying <a href='#Paint_Text_Size'>Paint_Text_Size</a> and varying
4948<a href='SkMatrix_Reference#Matrix'>Matrix</a>.
4949</div></fiddle-embed></div>
4950
4951### See Also
4952
4953<a href='#SkCanvas_drawString'>drawString</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a> <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>
4954
4955<a name='SkCanvas_drawString'></a>
4956
4957---
4958
4959<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
4960void <a href='#SkCanvas_drawString'>drawString</a>(const char* <a href='undocumented#String'>string</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
4961</pre>
4962
4963Draws null terminated <a href='#SkCanvas_drawString_string'>string</a>, with origin at (<a href='#SkCanvas_drawString_x'>x</a>, <a href='#SkCanvas_drawString_y'>y</a>), using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and
4964<a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawString_paint'>paint</a>.
4965
4966<a href='#SkCanvas_drawString_string'>string</a> meaning depends on <a href='undocumented#SkTextEncoding'>SkTextEncoding</a>; by default, strings are encoded
4967as UTF-8. Other values of <a href='undocumented#SkTextEncoding'>SkTextEncoding</a> are unlikely to produce the desired
4968results, since zero bytes may be embedded in the <a href='#SkCanvas_drawString_string'>string</a>.
4969
4970<a href='#SkCanvas_drawString_x'>x</a> and <a href='#SkCanvas_drawString_y'>y</a> meaning depends on <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::Align and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> vertical <a href='undocumented#Text'>text</a>; by default
4971<a href='#SkCanvas_drawString_string'>string</a> draws left to right, positioning the first <a href='undocumented#Glyph'>glyph</a>   <a href='undocumented#Left_Side_Bearing'>left side bearing</a> at <a href='#SkCanvas_drawString_x'>x</a>
4972and its baseline at <a href='#SkCanvas_drawString_y'>y</a>. <a href='undocumented#Text'>Text</a> <a href='undocumented#Size'>size</a> is affected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>.
4973
4974All elements of <a href='#SkCanvas_drawString_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
4975<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='undocumented#Text'>text</a>. By default, draws
4976filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
4977
4978### Parameters
4979
4980<table>  <tr>    <td><a name='SkCanvas_drawString_string'><code><strong>string</strong></code></a></td>
4981    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn,</td>
4982  </tr>
4983</table>
4984
4985ending with a char value of zero
4986
4987### Parameters
4988
4989<table>  <tr>    <td><a name='SkCanvas_drawString_x'><code><strong>x</strong></code></a></td>
4990    <td>start of <a href='#SkCanvas_drawString_string'>string</a> on x-axis</td>
4991  </tr>
4992  <tr>    <td><a name='SkCanvas_drawString_y'><code><strong>y</strong></code></a></td>
4993    <td>start of <a href='#SkCanvas_drawString_string'>string</a> on y-axis</td>
4994  </tr>
4995  <tr>    <td><a name='SkCanvas_drawString_paint'><code><strong>paint</strong></code></a></td>
4996    <td><a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
4997  </tr>
4998</table>
4999
5000### Example
5001
5002<div><fiddle-embed name="85442cf8d0bce6b5a777853bc36a4dc4"></fiddle-embed></div>
5003
5004### See Also
5005
5006<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a> <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>
5007
5008<a name='SkCanvas_drawString_2'></a>
5009
5010---
5011
5012<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5013void <a href='#SkCanvas_drawString'>drawString</a>(const <a href='undocumented#SkString'>SkString</a>& <a href='undocumented#String'>string</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5014</pre>
5015
5016Draws null terminated <a href='#SkCanvas_drawString_2_string'>string</a>, with origin at (<a href='#SkCanvas_drawString_2_x'>x</a>, <a href='#SkCanvas_drawString_2_y'>y</a>), using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and
5017<a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawString_2_paint'>paint</a>.
5018
5019<a href='#SkCanvas_drawString_2_string'>string</a> meaning depends on <a href='undocumented#SkTextEncoding'>SkTextEncoding</a>; by default, strings are encoded
5020as UTF-8. Other values of <a href='undocumented#SkTextEncoding'>SkTextEncoding</a> are unlikely to produce the desired
5021results, since zero bytes may be embedded in the <a href='#SkCanvas_drawString_2_string'>string</a>.
5022
5023<a href='#SkCanvas_drawString_2_x'>x</a> and <a href='#SkCanvas_drawString_2_y'>y</a> meaning depends on <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::Align and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> vertical <a href='undocumented#Text'>text</a>; by default
5024<a href='#SkCanvas_drawString_2_string'>string</a> draws left to right, positioning the first <a href='undocumented#Glyph'>glyph</a>   <a href='undocumented#Left_Side_Bearing'>left side bearing</a> at <a href='#SkCanvas_drawString_2_x'>x</a>
5025and its baseline at <a href='#SkCanvas_drawString_2_y'>y</a>. <a href='undocumented#Text'>Text</a> <a href='undocumented#Size'>size</a> is affected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>.
5026
5027All elements of <a href='#SkCanvas_drawString_2_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
5028<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='undocumented#Text'>text</a>. By default, draws
5029filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
5030
5031### Parameters
5032
5033<table>  <tr>    <td><a name='SkCanvas_drawString_2_string'><code><strong>string</strong></code></a></td>
5034    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn,</td>
5035  </tr>
5036</table>
5037
5038ending with a char value of zero
5039
5040### Parameters
5041
5042<table>  <tr>    <td><a name='SkCanvas_drawString_2_x'><code><strong>x</strong></code></a></td>
5043    <td>start of <a href='#SkCanvas_drawString_2_string'>string</a> on x-axis</td>
5044  </tr>
5045  <tr>    <td><a name='SkCanvas_drawString_2_y'><code><strong>y</strong></code></a></td>
5046    <td>start of <a href='#SkCanvas_drawString_2_string'>string</a> on y-axis</td>
5047  </tr>
5048  <tr>    <td><a name='SkCanvas_drawString_2_paint'><code><strong>paint</strong></code></a></td>
5049    <td><a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
5050  </tr>
5051</table>
5052
5053### Example
5054
5055<div><fiddle-embed name="435178c09feb3bfec5e35d983609a013"></fiddle-embed></div>
5056
5057### See Also
5058
5059<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a> <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>
5060
5061<a name='SkCanvas_drawPosText'></a>
5062
5063---
5064
5065<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5066void <a href='#SkCanvas_drawPosText'>drawPosText</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> pos[], const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5067</pre>
5068
5069Draws each <a href='undocumented#Glyph'>glyph</a> in <a href='#SkCanvas_drawPosText_text'>text</a> with the origin in <a href='#SkCanvas_drawPosText_pos'>pos</a> array, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and
5070<a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPosText_paint'>paint</a>. The number of entries in <a href='#SkCanvas_drawPosText_pos'>pos</a> array must match the number of <a href='undocumented#Glyph'>glyphs</a>
5071described by <a href='#SkCanvas_drawPosText_byteLength'>byteLength</a> of <a href='#SkCanvas_drawPosText_text'>text</a>.
5072
5073<a href='#SkCanvas_drawPosText_text'>text</a> meaning depends on <a href='undocumented#SkTextEncoding'>SkTextEncoding</a>; by default, <a href='#SkCanvas_drawPosText_text'>text</a> is encoded as
5074UTF-8. <a href='#SkCanvas_drawPosText_pos'>pos</a> elements meaning depends on <a href='SkPaint_Reference#SkPaint'>SkPaint</a> vertical <a href='#SkCanvas_drawPosText_text'>text</a>; by default
5075<a href='undocumented#Glyph'>glyph</a>   <a href='undocumented#Left_Side_Bearing'>left side bearing</a> and baseline are relative to <a href='SkPoint_Reference#SkPoint'>SkPoint</a> in <a href='#SkCanvas_drawPosText_pos'>pos</a> array.
5076<a href='undocumented#Text'>Text</a> <a href='undocumented#Size'>size</a> is affected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPosText_text'>text</a> <a href='undocumented#Size'>size</a>.
5077
5078All elements of <a href='#SkCanvas_drawPosText_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
5079<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='#SkCanvas_drawPosText_text'>text</a>. By default, draws
5080filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
5081
5082Layout engines such as Harfbuzz typically position each <a href='undocumented#Glyph'>glyph</a>
5083rather than using the  <a href='SkFont_Reference#Font_Advance'>font advance</a> widths.
5084
5085### Parameters
5086
5087<table>  <tr>    <td><a name='SkCanvas_drawPosText_text'><code><strong>text</strong></code></a></td>
5088    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn</td>
5089  </tr>
5090  <tr>    <td><a name='SkCanvas_drawPosText_byteLength'><code><strong>byteLength</strong></code></a></td>
5091    <td>byte length of <a href='#SkCanvas_drawPosText_text'>text</a> array</td>
5092  </tr>
5093  <tr>    <td><a name='SkCanvas_drawPosText_pos'><code><strong>pos</strong></code></a></td>
5094    <td>array of <a href='undocumented#Glyph'>glyph</a> origins</td>
5095  </tr>
5096  <tr>    <td><a name='SkCanvas_drawPosText_paint'><code><strong>paint</strong></code></a></td>
5097    <td><a href='#SkCanvas_drawPosText_text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
5098  </tr>
5099</table>
5100
5101### Example
5102
5103<div><fiddle-embed name="bf0b2402533a23b6392e0676b7a8414c"></fiddle-embed></div>
5104
5105### See Also
5106
5107<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a> <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>
5108
5109<a name='SkCanvas_drawPosTextH'></a>
5110
5111---
5112
5113<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5114void <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='undocumented#SkScalar'>SkScalar</a> xpos[], <a href='undocumented#SkScalar'>SkScalar</a> constY,
5115                  const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5116</pre>
5117
5118Draws each <a href='undocumented#Glyph'>glyph</a> in <a href='#SkCanvas_drawPosTextH_text'>text</a> with its origin composed from <a href='#SkCanvas_drawPosTextH_xpos'>xpos</a> array and
5119<a href='#SkCanvas_drawPosTextH_constY'>constY</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPosTextH_paint'>paint</a>. The number of entries in <a href='#SkCanvas_drawPosTextH_xpos'>xpos</a> array
5120must match the number of <a href='undocumented#Glyph'>glyphs</a> described by <a href='#SkCanvas_drawPosTextH_byteLength'>byteLength</a> of <a href='#SkCanvas_drawPosTextH_text'>text</a>.
5121
5122<a href='#SkCanvas_drawPosTextH_text'>text</a> meaning depends on <a href='undocumented#SkTextEncoding'>SkTextEncoding</a>; by default, <a href='#SkCanvas_drawPosTextH_text'>text</a> is encoded as
5123UTF-8. <a href='#SkCanvas_drawPosTextH_xpos'>xpos</a> elements meaning depends on <a href='SkPaint_Reference#SkPaint'>SkPaint</a> vertical <a href='#SkCanvas_drawPosTextH_text'>text</a>;
5124by default each <a href='undocumented#Glyph'>glyph</a>   <a href='undocumented#Left_Side_Bearing'>left side bearing</a> is positioned at an <a href='#SkCanvas_drawPosTextH_xpos'>xpos</a> element and
5125its baseline is positioned at <a href='#SkCanvas_drawPosTextH_constY'>constY</a>. <a href='undocumented#Text'>Text</a> <a href='undocumented#Size'>size</a> is affected by <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> and
5126<a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawPosTextH_text'>text</a> <a href='undocumented#Size'>size</a>.
5127
5128All elements of <a href='#SkCanvas_drawPosTextH_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
5129<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='#SkCanvas_drawPosTextH_text'>text</a>. By default, draws
5130filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
5131
5132Layout engines such as Harfbuzz typically position each <a href='undocumented#Glyph'>glyph</a>
5133rather than using the  <a href='SkFont_Reference#Font_Advance'>font advance</a> widths if all <a href='undocumented#Glyph'>glyphs</a> share the same
5134baseline.
5135
5136### Parameters
5137
5138<table>  <tr>    <td><a name='SkCanvas_drawPosTextH_text'><code><strong>text</strong></code></a></td>
5139    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn</td>
5140  </tr>
5141  <tr>    <td><a name='SkCanvas_drawPosTextH_byteLength'><code><strong>byteLength</strong></code></a></td>
5142    <td>byte length of <a href='#SkCanvas_drawPosTextH_text'>text</a> array</td>
5143  </tr>
5144  <tr>    <td><a name='SkCanvas_drawPosTextH_xpos'><code><strong>xpos</strong></code></a></td>
5145    <td>array of x-axis positions, used to position each <a href='undocumented#Glyph'>glyph</a></td>
5146  </tr>
5147  <tr>    <td><a name='SkCanvas_drawPosTextH_constY'><code><strong>constY</strong></code></a></td>
5148    <td>shared y-axis value for all of x-axis positions</td>
5149  </tr>
5150  <tr>    <td><a name='SkCanvas_drawPosTextH_paint'><code><strong>paint</strong></code></a></td>
5151    <td><a href='#SkCanvas_drawPosTextH_text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
5152  </tr>
5153</table>
5154
5155### Example
5156
5157<div><fiddle-embed name="95c6a7ef82993a8d2add676080e9438a"></fiddle-embed></div>
5158
5159### See Also
5160
5161<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a> <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>
5162
5163<a name='SkCanvas_drawTextRSXform'></a>
5164
5165---
5166
5167<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5168void <a href='#SkCanvas_drawTextRSXform'>drawTextRSXform</a>(const void* <a href='undocumented#Text'>text</a>, size_t byteLength, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[],
5169                     const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5170</pre>
5171
5172Draws <a href='#SkCanvas_drawTextRSXform_text'>text</a>, transforming each <a href='undocumented#Glyph'>glyph</a> by the corresponding <a href='undocumented#SkRSXform'>SkRSXform</a>,
5173using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawTextRSXform_paint'>paint</a>.
5174
5175<a href='undocumented#SkRSXform'>SkRSXform</a> <a href='#SkCanvas_drawTextRSXform_xform'>xform</a> array specifies a separate square scale, rotation, and translation
5176for each <a href='undocumented#Glyph'>glyph</a>. <a href='#SkCanvas_drawTextRSXform_xform'>xform</a> does not affect <a href='#SkCanvas_drawTextRSXform_paint'>paint</a> <a href='undocumented#SkShader'>SkShader</a>.
5177
5178Optional <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawTextRSXform_cullRect'>cullRect</a> is a conservative bounds of <a href='#SkCanvas_drawTextRSXform_text'>text</a>, taking into account
5179<a href='undocumented#SkRSXform'>SkRSXform</a> and <a href='#SkCanvas_drawTextRSXform_paint'>paint</a>. If <a href='#SkCanvas_drawTextRSXform_cullRect'>cullRect</a> is outside of clip, <a href='SkCanvas_Reference#Canvas'>canvas</a> can skip drawing.
5180
5181All elements of <a href='#SkCanvas_drawTextRSXform_paint'>paint</a>: <a href='undocumented#SkPathEffect'>SkPathEffect</a>, <a href='undocumented#SkMaskFilter'>SkMaskFilter</a>, <a href='undocumented#SkShader'>SkShader</a>,
5182<a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='undocumented#SkDrawLooper'>SkDrawLooper</a>; apply to <a href='#SkCanvas_drawTextRSXform_text'>text</a>. By default, draws
5183filled 12 <a href='SkPoint_Reference#Point'>point</a> black <a href='undocumented#Glyph'>glyphs</a>.
5184
5185### Parameters
5186
5187<table>  <tr>    <td><a name='SkCanvas_drawTextRSXform_text'><code><strong>text</strong></code></a></td>
5188    <td>character code <a href='SkPoint_Reference#Point'>points</a> or <a href='undocumented#Glyph'>glyphs</a> drawn</td>
5189  </tr>
5190  <tr>    <td><a name='SkCanvas_drawTextRSXform_byteLength'><code><strong>byteLength</strong></code></a></td>
5191    <td>byte length of <a href='#SkCanvas_drawTextRSXform_text'>text</a> array</td>
5192  </tr>
5193  <tr>    <td><a name='SkCanvas_drawTextRSXform_xform'><code><strong>xform</strong></code></a></td>
5194    <td><a href='undocumented#SkRSXform'>SkRSXform</a> rotates, scales, and translates each <a href='undocumented#Glyph'>glyph</a> individually</td>
5195  </tr>
5196  <tr>    <td><a name='SkCanvas_drawTextRSXform_cullRect'><code><strong>cullRect</strong></code></a></td>
5197    <td><a href='SkRect_Reference#SkRect'>SkRect</a> bounds of <a href='#SkCanvas_drawTextRSXform_text'>text</a> for efficient clipping; or nullptr</td>
5198  </tr>
5199  <tr>    <td><a name='SkCanvas_drawTextRSXform_paint'><code><strong>paint</strong></code></a></td>
5200    <td><a href='#SkCanvas_drawTextRSXform_text'>text</a> <a href='undocumented#Size'>size</a>, blend, <a href='SkColor_Reference#Color'>color</a>, and so on, used to draw</td>
5201  </tr>
5202</table>
5203
5204### Example
5205
5206<div><fiddle-embed name="935c8f8b9782d297a73d7186f6ef7945"></fiddle-embed></div>
5207
5208### See Also
5209
5210<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>
5211
5212<a name='SkCanvas_drawTextBlob'></a>
5213
5214---
5215
5216<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5217void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>* blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5218</pre>
5219
5220Draws <a href='#Text_Blob'>Text_Blob</a> <a href='#SkCanvas_drawTextBlob_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_x'>x</a>, <a href='#SkCanvas_drawTextBlob_y'>y</a>), using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_paint'>paint</a>.
5221
5222<a href='#SkCanvas_drawTextBlob_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_paint'>paint</a> attributes specific to <a href='undocumented#Text'>text</a>: <a href='undocumented#Typeface'>Typeface</a>, <a href='#Font_Size'>Font_Size</a>, <a href='#Font_Scale_X'>Font_Scale_X</a>,
5223<a href='#Font_Skew_X'>Font_Skew_X</a>, <a href='#Font_Hinting'>Font_Hinting</a>, <a href='#Paint_Anti_Alias'>Paint_Anti_Alias</a>, <a href='#Font_Embolden'>Font_Embolden</a>, <a href='#Font_Force_Hinting'>Font_Force_Hinting</a>,
5224<a href='#Font_Embedded_Bitmaps'>Font_Embedded_Bitmaps</a>, <a href='#Font_Hinting_Spacing'>Font_Hinting_Spacing</a>, <a href='#Font_Anti_Alias'>Font_Anti_Alias</a>, <a href='#Font_Linear'>Font_Linear</a>,
5225and <a href='#Font_Subpixel'>Font_Subpixel</a>
5226.
5227
5228<a href='#Paint_Text_Encoding'>Paint_Text_Encoding</a> must be set to <a href='undocumented#kGlyphID_SkTextEncoding'>kGlyphID_SkTextEncoding</a>.
5229
5230Elements of <a href='#SkCanvas_drawTextBlob_paint'>paint</a>: <a href='#Paint_Anti_Alias'>Anti_Alias</a>, <a href='#Blend_Mode'>Blend_Mode</a>, <a href='SkColor_Reference#Color'>Color</a> including <a href='#Color_Alpha'>Color_Alpha</a>,
5231<a href='#Color_Filter'>Color_Filter</a>, <a href='#Paint_Dither'>Paint_Dither</a>, <a href='#Draw_Looper'>Draw_Looper</a>, <a href='#Mask_Filter'>Mask_Filter</a>, <a href='#Path_Effect'>Path_Effect</a>, <a href='undocumented#Shader'>Shader</a>, and
5232<a href='#Paint_Style'>Paint_Style</a>; apply to <a href='#SkCanvas_drawTextBlob_blob'>blob</a>. If <a href='SkPaint_Reference#Paint'>Paint</a> contains <a href='SkPaint_Reference#SkPaint'>SkPaint</a>::<a href='#SkPaint_kStroke_Style'>kStroke_Style</a>:
5233<a href='#Paint_Miter_Limit'>Paint_Miter_Limit</a>, <a href='#Paint_Stroke_Cap'>Paint_Stroke_Cap</a>, <a href='#Paint_Stroke_Join'>Paint_Stroke_Join</a>, and <a href='#Paint_Stroke_Width'>Paint_Stroke_Width</a>;
5234apply to <a href='SkPath_Reference#Path'>Path</a> created from <a href='#SkCanvas_drawTextBlob_blob'>blob</a>.
5235
5236### Parameters
5237
5238<table>  <tr>    <td><a name='SkCanvas_drawTextBlob_blob'><code><strong>blob</strong></code></a></td>
5239    <td><a href='undocumented#Glyph'>Glyphs</a>, positions, and their paints' <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, <a href='undocumented#Typeface'>typeface</a>, and so on</td>
5240  </tr>
5241  <tr>    <td><a name='SkCanvas_drawTextBlob_x'><code><strong>x</strong></code></a></td>
5242    <td>horizontal offset applied to <a href='#SkCanvas_drawTextBlob_blob'>blob</a></td>
5243  </tr>
5244  <tr>    <td><a name='SkCanvas_drawTextBlob_y'><code><strong>y</strong></code></a></td>
5245    <td>vertical offset applied to <a href='#SkCanvas_drawTextBlob_blob'>blob</a></td>
5246  </tr>
5247  <tr>    <td><a name='SkCanvas_drawTextBlob_paint'><code><strong>paint</strong></code></a></td>
5248    <td>blend, <a href='SkColor_Reference#Color'>color</a>, stroking, and so on, used to draw</td>
5249  </tr>
5250</table>
5251
5252### Example
5253
5254<div><fiddle-embed name="005502b502c1282cb8d306d6c8d998fb"></fiddle-embed></div>
5255
5256### See Also
5257
5258<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a>
5259
5260<a name='SkCanvas_drawTextBlob_2'></a>
5261
5262---
5263
5264<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5265void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>&gt;& blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5266</pre>
5267
5268Draws <a href='#Text_Blob'>Text_Blob</a> <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_2_x'>x</a>, <a href='#SkCanvas_drawTextBlob_2_y'>y</a>), using Clip, <a href='SkMatrix_Reference#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a>.
5269
5270<a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> attributes specific to <a href='undocumented#Text'>text</a>: <a href='undocumented#Typeface'>Typeface</a>, <a href='#Font_Size'>Font_Size</a>, <a href='#Font_Scale_X'>Font_Scale_X</a>,
5271<a href='#Font_Skew_X'>Font_Skew_X</a>, <a href='#Font_Hinting'>Font_Hinting</a>, <a href='#Paint_Anti_Alias'>Paint_Anti_Alias</a>, <a href='#Font_Embolden'>Font_Embolden</a>, <a href='#Font_Force_Hinting'>Font_Force_Hinting</a>,
5272<a href='#Font_Embedded_Bitmaps'>Font_Embedded_Bitmaps</a>, <a href='#Font_Hinting_Spacing'>Font_Hinting_Spacing</a>, <a href='#Font_Anti_Alias'>Font_Anti_Alias</a>, <a href='#Font_Linear'>Font_Linear</a>,
5273and <a href='#Font_Subpixel'>Font_Subpixel</a>
5274.
5275
5276<a href='#Paint_Text_Encoding'>Paint_Text_Encoding</a> must be set to <a href='undocumented#kGlyphID_SkTextEncoding'>kGlyphID_SkTextEncoding</a>.
5277
5278Elements of <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a>: <a href='#Path_Effect'>Path_Effect</a>, <a href='#Mask_Filter'>Mask_Filter</a>, <a href='undocumented#Shader'>Shader</a>, <a href='#Color_Filter'>Color_Filter</a>,
5279<a href='#Image_Filter'>Image_Filter</a>, and <a href='#Draw_Looper'>Draw_Looper</a>; apply to <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a>.
5280
5281### Parameters
5282
5283<table>  <tr>    <td><a name='SkCanvas_drawTextBlob_2_blob'><code><strong>blob</strong></code></a></td>
5284    <td><a href='undocumented#Glyph'>Glyphs</a>, positions, and their paints' <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, <a href='undocumented#Typeface'>typeface</a>, and so on</td>
5285  </tr>
5286  <tr>    <td><a name='SkCanvas_drawTextBlob_2_x'><code><strong>x</strong></code></a></td>
5287    <td>horizontal offset applied to <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a></td>
5288  </tr>
5289  <tr>    <td><a name='SkCanvas_drawTextBlob_2_y'><code><strong>y</strong></code></a></td>
5290    <td>vertical offset applied to <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a></td>
5291  </tr>
5292  <tr>    <td><a name='SkCanvas_drawTextBlob_2_paint'><code><strong>paint</strong></code></a></td>
5293    <td>blend, <a href='SkColor_Reference#Color'>color</a>, stroking, and so on, used to draw</td>
5294  </tr>
5295</table>
5296
5297### Example
5298
5299<div><fiddle-embed name="1cae21e7b63b24de3eca0bbd9be1936b"><div><a href='SkPaint_Reference#Paint'>Paint</a> attributes related to <a href='undocumented#Text'>text</a>, like <a href='undocumented#Text'>text</a> <a href='undocumented#Size'>size</a>, have no effect on <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> passed to <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>.
5300</div></fiddle-embed></div>
5301
5302### See Also
5303
5304<a href='#SkCanvas_drawText'>drawText</a> <a href='#SkCanvas_drawPosText'>drawPosText</a> <a href='#SkCanvas_drawPosTextH'>drawPosTextH</a>
5305
5306<a name='SkCanvas_drawPicture'></a>
5307
5308---
5309
5310<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5311void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='SkPicture_Reference#SkPicture'>SkPicture</a>* <a href='SkPicture_Reference#Picture'>picture</a>)
5312</pre>
5313
5314Draws <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='#SkCanvas_drawPicture_picture'>picture</a>, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
5315Clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> are unchanged by <a href='#SkCanvas_drawPicture_picture'>picture</a> contents, as if
5316<a href='#SkCanvas_save'>save()</a> was called before and <a href='#SkCanvas_restore'>restore()</a> was called after <a href='#SkCanvas_drawPicture'>drawPicture</a>().
5317
5318<a href='SkPicture_Reference#SkPicture'>SkPicture</a> records a series of draw commands for later playback.
5319
5320### Parameters
5321
5322<table>  <tr>    <td><a name='SkCanvas_drawPicture_picture'><code><strong>picture</strong></code></a></td>
5323    <td>recorded drawing commands to play</td>
5324  </tr>
5325</table>
5326
5327### Example
5328
5329<div><fiddle-embed name="83918a23fcffd47f59a1ef662c85a24c"></fiddle-embed></div>
5330
5331### See Also
5332
5333<a href='#SkCanvas_drawDrawable'>drawDrawable</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a>::<a href='#SkPicture_playback'>playback</a>
5334
5335<a name='SkCanvas_drawPicture_2'></a>
5336
5337---
5338
5339<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5340void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkPicture_Reference#SkPicture'>SkPicture</a>&gt;& <a href='SkPicture_Reference#Picture'>picture</a>)
5341</pre>
5342
5343Draws <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='#SkCanvas_drawPicture_2_picture'>picture</a>, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
5344Clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> are unchanged by <a href='#SkCanvas_drawPicture_2_picture'>picture</a> contents, as if
5345<a href='#SkCanvas_save'>save()</a> was called before and <a href='#SkCanvas_restore'>restore()</a> was called after <a href='#SkCanvas_drawPicture'>drawPicture</a>().
5346
5347<a href='SkPicture_Reference#SkPicture'>SkPicture</a> records a series of draw commands for later playback.
5348
5349### Parameters
5350
5351<table>  <tr>    <td><a name='SkCanvas_drawPicture_2_picture'><code><strong>picture</strong></code></a></td>
5352    <td>recorded drawing commands to play</td>
5353  </tr>
5354</table>
5355
5356### Example
5357
5358<div><fiddle-embed name="83918a23fcffd47f59a1ef662c85a24c"></fiddle-embed></div>
5359
5360### See Also
5361
5362<a href='#SkCanvas_drawDrawable'>drawDrawable</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a>::<a href='#SkPicture_playback'>playback</a>
5363
5364<a name='SkCanvas_drawPicture_3'></a>
5365
5366---
5367
5368<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5369void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='SkPicture_Reference#SkPicture'>SkPicture</a>* <a href='SkPicture_Reference#Picture'>picture</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5370</pre>
5371
5372Draws <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='#SkCanvas_drawPicture_3_picture'>picture</a>, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>; transforming <a href='#SkCanvas_drawPicture_3_picture'>picture</a> with
5373<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> <a href='#SkCanvas_drawPicture_3_matrix'>matrix</a>, if provided; and use <a href='SkPaint_Reference#SkPaint'>SkPaint</a>  <a href='#SkCanvas_drawPicture_3_paint'>paint alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>,
5374<a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, if provided.
5375
5376<a href='#SkCanvas_drawPicture_3_matrix'>matrix</a> transformation is equivalent to: <a href='#SkCanvas_save'>save()</a>, <a href='#SkCanvas_concat'>concat()</a>, <a href='#SkCanvas_drawPicture'>drawPicture</a>(), <a href='#SkCanvas_restore'>restore()</a>.
5377<a href='#SkCanvas_drawPicture_3_paint'>paint</a> use is equivalent to: <a href='#SkCanvas_saveLayer'>saveLayer</a>(), <a href='#SkCanvas_drawPicture'>drawPicture</a>(), <a href='#SkCanvas_restore'>restore()</a>.
5378
5379### Parameters
5380
5381<table>  <tr>    <td><a name='SkCanvas_drawPicture_3_picture'><code><strong>picture</strong></code></a></td>
5382    <td>recorded drawing commands to play</td>
5383  </tr>
5384  <tr>    <td><a name='SkCanvas_drawPicture_3_matrix'><code><strong>matrix</strong></code></a></td>
5385    <td><a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> to rotate, scale, translate, and so on; may be nullptr</td>
5386  </tr>
5387  <tr>    <td><a name='SkCanvas_drawPicture_3_paint'><code><strong>paint</strong></code></a></td>
5388    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> to apply transparency, filtering, and so on; may be nullptr</td>
5389  </tr>
5390</table>
5391
5392### Example
5393
5394<div><fiddle-embed name="759e4e5bac680838added8f70884dcdc"></fiddle-embed></div>
5395
5396### See Also
5397
5398<a href='#SkCanvas_drawDrawable'>drawDrawable</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a>::<a href='#SkPicture_playback'>playback</a>
5399
5400<a name='SkCanvas_drawPicture_4'></a>
5401
5402---
5403
5404<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5405void <a href='#SkCanvas_drawPicture'>drawPicture</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkPicture_Reference#SkPicture'>SkPicture</a>&gt;& <a href='SkPicture_Reference#Picture'>picture</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a>, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5406</pre>
5407
5408Draws <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='#SkCanvas_drawPicture_4_picture'>picture</a>, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>; transforming <a href='#SkCanvas_drawPicture_4_picture'>picture</a> with
5409<a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> <a href='#SkCanvas_drawPicture_4_matrix'>matrix</a>, if provided; and use <a href='SkPaint_Reference#SkPaint'>SkPaint</a>  <a href='#SkCanvas_drawPicture_4_paint'>paint alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>,
5410<a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, if provided.
5411
5412<a href='#SkCanvas_drawPicture_4_matrix'>matrix</a> transformation is equivalent to: <a href='#SkCanvas_save'>save()</a>, <a href='#SkCanvas_concat'>concat()</a>, <a href='#SkCanvas_drawPicture'>drawPicture</a>(), <a href='#SkCanvas_restore'>restore()</a>.
5413<a href='#SkCanvas_drawPicture_4_paint'>paint</a> use is equivalent to: <a href='#SkCanvas_saveLayer'>saveLayer</a>(), <a href='#SkCanvas_drawPicture'>drawPicture</a>(), <a href='#SkCanvas_restore'>restore()</a>.
5414
5415### Parameters
5416
5417<table>  <tr>    <td><a name='SkCanvas_drawPicture_4_picture'><code><strong>picture</strong></code></a></td>
5418    <td>recorded drawing commands to play</td>
5419  </tr>
5420  <tr>    <td><a name='SkCanvas_drawPicture_4_matrix'><code><strong>matrix</strong></code></a></td>
5421    <td><a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> to rotate, scale, translate, and so on; may be nullptr</td>
5422  </tr>
5423  <tr>    <td><a name='SkCanvas_drawPicture_4_paint'><code><strong>paint</strong></code></a></td>
5424    <td><a href='SkPaint_Reference#SkPaint'>SkPaint</a> to apply transparency, filtering, and so on; may be nullptr</td>
5425  </tr>
5426</table>
5427
5428### Example
5429
5430<div><fiddle-embed name="c4ff59439dd2fc871925d4eeb0c84ca1"></fiddle-embed></div>
5431
5432### See Also
5433
5434<a href='#SkCanvas_drawDrawable'>drawDrawable</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='SkPicture_Reference#SkPicture'>SkPicture</a>::<a href='#SkPicture_playback'>playback</a>
5435
5436<a name='SkCanvas_drawVertices'></a>
5437
5438---
5439
5440<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5441void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#SkVertices'>SkVertices</a>* <a href='undocumented#Vertices'>vertices</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5442</pre>
5443
5444Draws <a href='undocumented#SkVertices'>SkVertices</a> <a href='#SkCanvas_drawVertices_vertices'>vertices</a>, a triangle mesh, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
5445If  <a href='undocumented#Vertices_Texs'>vertices texs</a> and  <a href='undocumented#Vertices_Colors'>vertices colors</a> are defined in <a href='#SkCanvas_drawVertices_vertices'>vertices</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawVertices_paint'>paint</a>
5446contains <a href='undocumented#SkShader'>SkShader</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawVertices_mode'>mode</a> combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>.
5447
5448### Parameters
5449
5450<table>  <tr>    <td><a name='SkCanvas_drawVertices_vertices'><code><strong>vertices</strong></code></a></td>
5451    <td>triangle mesh to draw</td>
5452  </tr>
5453  <tr>    <td><a name='SkCanvas_drawVertices_mode'><code><strong>mode</strong></code></a></td>
5454    <td>combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>, if both are present</td>
5455  </tr>
5456  <tr>    <td><a name='SkCanvas_drawVertices_paint'><code><strong>paint</strong></code></a></td>
5457    <td>specifies the <a href='undocumented#SkShader'>SkShader</a>, used as <a href='undocumented#SkVertices'>SkVertices</a> <a href='undocumented#Texture'>texture</a>; may be nullptr</td>
5458  </tr>
5459</table>
5460
5461### Example
5462
5463<div><fiddle-embed name="f48b22eaad1bb7adcc3faaa321754af6"></fiddle-embed></div>
5464
5465### See Also
5466
5467<a href='#SkCanvas_drawPatch'>drawPatch</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5468
5469<a name='SkCanvas_drawVertices_2'></a>
5470
5471---
5472
5473<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5474void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='undocumented#SkVertices'>SkVertices</a>&gt;& <a href='undocumented#Vertices'>vertices</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5475</pre>
5476
5477Draws <a href='undocumented#SkVertices'>SkVertices</a> <a href='#SkCanvas_drawVertices_2_vertices'>vertices</a>, a triangle mesh, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>.
5478If  <a href='undocumented#Vertices_Texs'>vertices texs</a> and  <a href='undocumented#Vertices_Colors'>vertices colors</a> are defined in <a href='#SkCanvas_drawVertices_2_vertices'>vertices</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawVertices_2_paint'>paint</a>
5479contains <a href='undocumented#SkShader'>SkShader</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawVertices_2_mode'>mode</a> combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>.
5480
5481### Parameters
5482
5483<table>  <tr>    <td><a name='SkCanvas_drawVertices_2_vertices'><code><strong>vertices</strong></code></a></td>
5484    <td>triangle mesh to draw</td>
5485  </tr>
5486  <tr>    <td><a name='SkCanvas_drawVertices_2_mode'><code><strong>mode</strong></code></a></td>
5487    <td>combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>, if both are present</td>
5488  </tr>
5489  <tr>    <td><a name='SkCanvas_drawVertices_2_paint'><code><strong>paint</strong></code></a></td>
5490    <td>specifies the <a href='undocumented#SkShader'>SkShader</a>, used as <a href='undocumented#SkVertices'>SkVertices</a> <a href='undocumented#Texture'>texture</a>, may be nullptr</td>
5491  </tr>
5492</table>
5493
5494### Example
5495
5496<div><fiddle-embed name="e8bdae9bea3227758989028424fcac3d"></fiddle-embed></div>
5497
5498### See Also
5499
5500<a href='#SkCanvas_drawPatch'>drawPatch</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5501
5502<a name='SkCanvas_drawVertices_3'></a>
5503
5504---
5505
5506<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5507void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#SkVertices'>SkVertices</a>* <a href='undocumented#Vertices'>vertices</a>, const <a href='undocumented#SkVertices'>SkVertices</a>::<a href='#SkVertices_Bone'>Bone</a> bones[], int boneCount,
5508                  <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5509</pre>
5510
5511Draws <a href='undocumented#SkVertices'>SkVertices</a> <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a>, a triangle mesh, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. Bone <a href='undocumented#Data'>data</a> is used to
5512deform <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a> with bone <a href='SkPath_Reference#Conic_Weight'>weights</a>.
5513If  <a href='undocumented#Vertices_Texs'>vertices texs</a> and  <a href='undocumented#Vertices_Colors'>vertices colors</a> are defined in <a href='#SkCanvas_drawVertices_3_vertices'>vertices</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawVertices_3_paint'>paint</a>
5514contains <a href='undocumented#SkShader'>SkShader</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawVertices_3_mode'>mode</a> combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>.
5515The first element of <a href='#SkCanvas_drawVertices_3_bones'>bones</a> should be an object to world space transformation <a href='SkMatrix_Reference#Matrix'>matrix</a> that
5516will be applied before performing mesh deformations. If no such transformation is needed,
5517it should be the identity <a href='SkMatrix_Reference#Matrix'>matrix</a>.
5518<a href='#SkCanvas_drawVertices_3_boneCount'>boneCount</a> must be at most 80, and thus the <a href='undocumented#Size'>size</a> of <a href='#SkCanvas_drawVertices_3_bones'>bones</a> should be at most 80.
5519
5520### Parameters
5521
5522<table>  <tr>    <td><a name='SkCanvas_drawVertices_3_vertices'><code><strong>vertices</strong></code></a></td>
5523    <td>triangle mesh to draw</td>
5524  </tr>
5525  <tr>    <td><a name='SkCanvas_drawVertices_3_bones'><code><strong>bones</strong></code></a></td>
5526    <td>bone <a href='SkMatrix_Reference#Matrix'>matrix</a> <a href='undocumented#Data'>data</a></td>
5527  </tr>
5528  <tr>    <td><a name='SkCanvas_drawVertices_3_boneCount'><code><strong>boneCount</strong></code></a></td>
5529    <td>number of bone <a href='SkMatrix_Reference#Matrix'>matrices</a></td>
5530  </tr>
5531  <tr>    <td><a name='SkCanvas_drawVertices_3_mode'><code><strong>mode</strong></code></a></td>
5532    <td>combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>, if both are present</td>
5533  </tr>
5534  <tr>    <td><a name='SkCanvas_drawVertices_3_paint'><code><strong>paint</strong></code></a></td>
5535    <td>specifies the <a href='undocumented#SkShader'>SkShader</a>, used as <a href='undocumented#SkVertices'>SkVertices</a> <a href='undocumented#Texture'>texture</a>, may be nullptr</td>
5536  </tr>
5537</table>
5538
5539### See Also
5540
5541<a href='#SkCanvas_drawPatch'>drawPatch</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5542
5543<a name='SkCanvas_drawVertices_4'></a>
5544
5545---
5546
5547<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5548void <a href='#SkCanvas_drawVertices'>drawVertices</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='undocumented#SkVertices'>SkVertices</a>&gt;& <a href='undocumented#Vertices'>vertices</a>, const <a href='undocumented#SkVertices'>SkVertices</a>::<a href='#SkVertices_Bone'>Bone</a> bones[], int boneCount,
5549                  <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5550</pre>
5551
5552Draws <a href='undocumented#SkVertices'>SkVertices</a> <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a>, a triangle mesh, using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>. Bone <a href='undocumented#Data'>data</a> is used to
5553deform <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a> with bone <a href='SkPath_Reference#Conic_Weight'>weights</a>.
5554If  <a href='undocumented#Vertices_Texs'>vertices texs</a> and  <a href='undocumented#Vertices_Colors'>vertices colors</a> are defined in <a href='#SkCanvas_drawVertices_4_vertices'>vertices</a>, and <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawVertices_4_paint'>paint</a>
5555contains <a href='undocumented#SkShader'>SkShader</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawVertices_4_mode'>mode</a> combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>.
5556The first element of <a href='#SkCanvas_drawVertices_4_bones'>bones</a> should be an object to world space transformation <a href='SkMatrix_Reference#Matrix'>matrix</a> that
5557will be applied before performing mesh deformations. If no such transformation is needed,
5558it should be the identity <a href='SkMatrix_Reference#Matrix'>matrix</a>.
5559<a href='#SkCanvas_drawVertices_4_boneCount'>boneCount</a> must be at most 80, and thus the <a href='undocumented#Size'>size</a> of <a href='#SkCanvas_drawVertices_4_bones'>bones</a> should be at most 80.
5560
5561### Parameters
5562
5563<table>  <tr>    <td><a name='SkCanvas_drawVertices_4_vertices'><code><strong>vertices</strong></code></a></td>
5564    <td>triangle mesh to draw</td>
5565  </tr>
5566  <tr>    <td><a name='SkCanvas_drawVertices_4_bones'><code><strong>bones</strong></code></a></td>
5567    <td>bone <a href='SkMatrix_Reference#Matrix'>matrix</a> <a href='undocumented#Data'>data</a></td>
5568  </tr>
5569  <tr>    <td><a name='SkCanvas_drawVertices_4_boneCount'><code><strong>boneCount</strong></code></a></td>
5570    <td>number of bone <a href='SkMatrix_Reference#Matrix'>matrices</a></td>
5571  </tr>
5572  <tr>    <td><a name='SkCanvas_drawVertices_4_mode'><code><strong>mode</strong></code></a></td>
5573    <td>combines  <a href='undocumented#Vertices_Colors'>vertices colors</a> with <a href='undocumented#SkShader'>SkShader</a>, if both are present</td>
5574  </tr>
5575  <tr>    <td><a name='SkCanvas_drawVertices_4_paint'><code><strong>paint</strong></code></a></td>
5576    <td>specifies the <a href='undocumented#SkShader'>SkShader</a>, used as <a href='undocumented#SkVertices'>SkVertices</a> <a href='undocumented#Texture'>texture</a>, may be nullptr</td>
5577  </tr>
5578</table>
5579
5580### See Also
5581
5582<a href='#SkCanvas_drawPatch'>drawPatch</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5583
5584<a name='SkCanvas_drawPatch'></a>
5585
5586---
5587
5588<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5589void <a href='#SkCanvas_drawPatch'>drawPatch</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPath_Reference#Cubic'>cubics</a>[12], const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[4], const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> texCoords[4],
5590               <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5591</pre>
5592
5593Draws a  <a href='undocumented#Coons_Patch'>Coons patch</a>: the interpolation of four <a href='#SkCanvas_drawPatch_cubics'>cubics</a> with shared corners,
5594associating a <a href='SkColor_Reference#Color'>color</a>, and optionally a <a href='undocumented#Texture'>texture</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>, with each corner.
5595
5596<a href='undocumented#Coons_Patch'>Coons patch</a> uses clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, <a href='#SkCanvas_drawPatch_paint'>paint</a> <a href='undocumented#SkShader'>SkShader</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>,
5597<a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>. If <a href='undocumented#SkShader'>SkShader</a> is provided it is treated
5598as  <a href='undocumented#Coons_Patch'>Coons patch</a> <a href='undocumented#Texture'>texture</a>; <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawPatch_mode'>mode</a> combines <a href='SkColor_Reference#Color'>color</a> <a href='#SkCanvas_drawPatch_colors'>colors</a> and <a href='undocumented#SkShader'>SkShader</a> if
5599both are provided.
5600
5601<a href='SkPath_Reference#Point_Array'>SkPoint array</a> <a href='#SkCanvas_drawPatch_cubics'>cubics</a> specifies four <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> starting at the top-left corner,
5602in clockwise order, sharing every fourth <a href='SkPoint_Reference#Point'>point</a>. The last <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> ends at the
5603first <a href='SkPoint_Reference#Point'>point</a>.
5604
5605<a href='SkColor_Reference#Color'>Color</a> array <a href='SkColor_Reference#Color'>color</a> associates <a href='#SkCanvas_drawPatch_colors'>colors</a> with corners in top-left, top-right,
5606bottom-right, bottom-left order.
5607
5608If <a href='#SkCanvas_drawPatch_paint'>paint</a> contains <a href='undocumented#SkShader'>SkShader</a>,  <a href='SkPath_Reference#Point_Array'>SkPoint array</a> <a href='#SkCanvas_drawPatch_texCoords'>texCoords</a> maps <a href='undocumented#SkShader'>SkShader</a> as <a href='undocumented#Texture'>texture</a> to
5609corners in top-left, top-right, bottom-right, bottom-left order.
5610
5611### Parameters
5612
5613<table>  <tr>    <td><a name='SkCanvas_drawPatch_cubics'><code><strong>cubics</strong></code></a></td>
5614    <td><a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> array, sharing common <a href='SkPoint_Reference#Point'>points</a></td>
5615  </tr>
5616  <tr>    <td><a name='SkCanvas_drawPatch_colors'><code><strong>colors</strong></code></a></td>
5617    <td><a href='SkColor_Reference#Color'>color</a> array, one for each corner</td>
5618  </tr>
5619  <tr>    <td><a name='SkCanvas_drawPatch_texCoords'><code><strong>texCoords</strong></code></a></td>
5620    <td><a href='SkPath_Reference#Point_Array'>SkPoint array</a> of <a href='undocumented#Texture'>texture</a> coordinates, mapping <a href='undocumented#SkShader'>SkShader</a> to corners;</td>
5621  </tr>
5622</table>
5623
5624may be nullptr
5625
5626### Parameters
5627
5628<table>  <tr>    <td><a name='SkCanvas_drawPatch_mode'><code><strong>mode</strong></code></a></td>
5629    <td><a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> for <a href='#SkCanvas_drawPatch_colors'>colors</a>, and for <a href='undocumented#SkShader'>SkShader</a> if <a href='#SkCanvas_drawPatch_paint'>paint</a> has one</td>
5630  </tr>
5631  <tr>    <td><a name='SkCanvas_drawPatch_paint'><code><strong>paint</strong></code></a></td>
5632    <td><a href='undocumented#SkShader'>SkShader</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, used to draw</td>
5633  </tr>
5634</table>
5635
5636### Example
5637
5638<div><fiddle-embed name="accb545d67984ced168f5be6ab824795"></fiddle-embed></div>
5639
5640### See Also
5641
5642<a href='#SkCanvas_drawVertices'>drawVertices</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5643
5644<a name='SkCanvas_drawPatch_2'></a>
5645
5646---
5647
5648<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5649void <a href='#SkCanvas_drawPatch'>drawPatch</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPath_Reference#Cubic'>cubics</a>[12], const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[4], const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> texCoords[4],
5650               const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& <a href='SkPaint_Reference#Paint'>paint</a>)
5651</pre>
5652
5653Draws <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a>  <a href='undocumented#Coons_Patch'>Coons patch</a>: the interpolation of four <a href='#SkCanvas_drawPatch_2_cubics'>cubics</a> with shared corners,
5654associating a <a href='SkColor_Reference#Color'>color</a>, and optionally a <a href='undocumented#Texture'>texture</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>, with each corner.
5655
5656<a href='undocumented#Coons_Patch'>Coons patch</a> uses clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, <a href='#SkCanvas_drawPatch_2_paint'>paint</a> <a href='undocumented#SkShader'>SkShader</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>,
5657<a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>. If <a href='undocumented#SkShader'>SkShader</a> is provided it is treated
5658as  <a href='undocumented#Coons_Patch'>Coons patch</a> <a href='undocumented#Texture'>texture</a>; <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode combines <a href='SkColor_Reference#Color'>color</a> <a href='#SkCanvas_drawPatch_2_colors'>colors</a> and <a href='undocumented#SkShader'>SkShader</a> if
5659both are provided.
5660
5661<a href='SkPath_Reference#Point_Array'>SkPoint array</a> <a href='#SkCanvas_drawPatch_2_cubics'>cubics</a> specifies four <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> starting at the top-left corner,
5662in clockwise order, sharing every fourth <a href='SkPoint_Reference#Point'>point</a>. The last <a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> ends at the
5663first <a href='SkPoint_Reference#Point'>point</a>.
5664
5665<a href='SkColor_Reference#Color'>Color</a> array <a href='SkColor_Reference#Color'>color</a> associates <a href='#SkCanvas_drawPatch_2_colors'>colors</a> with corners in top-left, top-right,
5666bottom-right, bottom-left order.
5667
5668If <a href='#SkCanvas_drawPatch_2_paint'>paint</a> contains <a href='undocumented#SkShader'>SkShader</a>,  <a href='SkPath_Reference#Point_Array'>SkPoint array</a> <a href='#SkCanvas_drawPatch_2_texCoords'>texCoords</a> maps <a href='undocumented#SkShader'>SkShader</a> as <a href='undocumented#Texture'>texture</a> to
5669corners in top-left, top-right, bottom-right, bottom-left order.
5670
5671### Parameters
5672
5673<table>  <tr>    <td><a name='SkCanvas_drawPatch_2_cubics'><code><strong>cubics</strong></code></a></td>
5674    <td><a href='SkPath_Reference#SkPath'>SkPath</a> <a href='SkPath_Reference#Cubic'>cubic</a> array, sharing common <a href='SkPoint_Reference#Point'>points</a></td>
5675  </tr>
5676  <tr>    <td><a name='SkCanvas_drawPatch_2_colors'><code><strong>colors</strong></code></a></td>
5677    <td><a href='SkColor_Reference#Color'>color</a> array, one for each corner</td>
5678  </tr>
5679  <tr>    <td><a name='SkCanvas_drawPatch_2_texCoords'><code><strong>texCoords</strong></code></a></td>
5680    <td><a href='SkPath_Reference#Point_Array'>SkPoint array</a> of <a href='undocumented#Texture'>texture</a> coordinates, mapping <a href='undocumented#SkShader'>SkShader</a> to corners;</td>
5681  </tr>
5682</table>
5683
5684may be nullptr
5685
5686### Parameters
5687
5688<table>  <tr>    <td><a name='SkCanvas_drawPatch_2_paint'><code><strong>paint</strong></code></a></td>
5689    <td><a href='undocumented#SkShader'>SkShader</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, used to draw</td>
5690  </tr>
5691</table>
5692
5693### Example
5694
5695<div><fiddle-embed name="4e8b7409531c9211a2afcf632005a38c"></fiddle-embed></div>
5696
5697### Example
5698
5699<div><fiddle-embed name="3412c2a16cb529af0e04878d264451f2"></fiddle-embed></div>
5700
5701### See Also
5702
5703<a href='#SkCanvas_drawVertices'>drawVertices</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5704
5705<a name='SkCanvas_drawAtlas'></a>
5706
5707---
5708
5709<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5710void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[],
5711               const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[], int count, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect,
5712               const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5713</pre>
5714
5715Draws a set of <a href='undocumented#Sprite'>sprites</a> from <a href='#SkCanvas_drawAtlas_atlas'>atlas</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawAtlas_paint'>paint</a>.
5716<a href='#SkCanvas_drawAtlas_paint'>paint</a> uses <a href='SkPaint_Reference#Anti_Alias'>anti-alias</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>
5717to draw, if present. For each entry in the array, <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawAtlas_tex'>tex</a> locates <a href='undocumented#Sprite'>sprite</a> in
5718<a href='#SkCanvas_drawAtlas_atlas'>atlas</a>, and <a href='undocumented#SkRSXform'>SkRSXform</a> <a href='#SkCanvas_drawAtlas_xform'>xform</a> transforms it into destination space.
5719
5720<a href='#SkCanvas_drawAtlas_xform'>xform</a>, <a href='undocumented#Text'>text</a>, and <a href='#SkCanvas_drawAtlas_colors'>colors</a> if present, must contain <a href='#SkCanvas_drawAtlas_count'>count</a> entries.
5721Optional <a href='#SkCanvas_drawAtlas_colors'>colors</a> are applied for each <a href='undocumented#Sprite'>sprite</a> using <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> <a href='#SkCanvas_drawAtlas_mode'>mode</a>, treating
5722<a href='undocumented#Sprite'>sprite</a> as source and <a href='#SkCanvas_drawAtlas_colors'>colors</a> as destination.
5723Optional <a href='#SkCanvas_drawAtlas_cullRect'>cullRect</a> is a conservative bounds of all transformed <a href='undocumented#Sprite'>sprites</a>.
5724If <a href='#SkCanvas_drawAtlas_cullRect'>cullRect</a> is outside of clip, <a href='SkCanvas_Reference#Canvas'>canvas</a> can skip drawing.
5725
5726### Parameters
5727
5728<table>  <tr>    <td><a name='SkCanvas_drawAtlas_atlas'><code><strong>atlas</strong></code></a></td>
5729    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing <a href='undocumented#Sprite'>sprites</a></td>
5730  </tr>
5731  <tr>    <td><a name='SkCanvas_drawAtlas_xform'><code><strong>xform</strong></code></a></td>
5732    <td><a href='undocumented#SkRSXform'>SkRSXform</a> mappings for <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_atlas'>atlas</a></td>
5733  </tr>
5734  <tr>    <td><a name='SkCanvas_drawAtlas_tex'><code><strong>tex</strong></code></a></td>
5735    <td><a href='SkRect_Reference#SkRect'>SkRect</a> locations of <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_atlas'>atlas</a></td>
5736  </tr>
5737  <tr>    <td><a name='SkCanvas_drawAtlas_colors'><code><strong>colors</strong></code></a></td>
5738    <td>one per <a href='undocumented#Sprite'>sprite</a>, blended with <a href='undocumented#Sprite'>sprite</a> using <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>; may be nullptr</td>
5739  </tr>
5740  <tr>    <td><a name='SkCanvas_drawAtlas_count'><code><strong>count</strong></code></a></td>
5741    <td>number of <a href='undocumented#Sprite'>sprites</a> to draw</td>
5742  </tr>
5743  <tr>    <td><a name='SkCanvas_drawAtlas_mode'><code><strong>mode</strong></code></a></td>
5744    <td><a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> combining <a href='#SkCanvas_drawAtlas_colors'>colors</a> and <a href='undocumented#Sprite'>sprites</a></td>
5745  </tr>
5746  <tr>    <td><a name='SkCanvas_drawAtlas_cullRect'><code><strong>cullRect</strong></code></a></td>
5747    <td>bounds of transformed <a href='undocumented#Sprite'>sprites</a> for efficient clipping; may be nullptr</td>
5748  </tr>
5749  <tr>    <td><a name='SkCanvas_drawAtlas_paint'><code><strong>paint</strong></code></a></td>
5750    <td><a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and so on; may be nullptr</td>
5751  </tr>
5752</table>
5753
5754### Example
5755
5756<div><fiddle-embed name="1df575f9b8132306ce0552a2554ed132"></fiddle-embed></div>
5757
5758### See Also
5759
5760<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a>
5761
5762<a name='SkCanvas_drawAtlas_2'></a>
5763
5764---
5765
5766<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5767void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[],
5768               const <a href='SkColor_Reference#SkColor'>SkColor</a> colors[], int count, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> mode, const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect,
5769               const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5770</pre>
5771
5772Draws a set of <a href='undocumented#Sprite'>sprites</a> from <a href='#SkCanvas_drawAtlas_2_atlas'>atlas</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawAtlas_2_paint'>paint</a>.
5773<a href='#SkCanvas_drawAtlas_2_paint'>paint</a> uses <a href='SkPaint_Reference#Anti_Alias'>anti-alias</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>
5774to draw, if present. For each entry in the array, <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawAtlas_2_tex'>tex</a> locates <a href='undocumented#Sprite'>sprite</a> in
5775<a href='#SkCanvas_drawAtlas_2_atlas'>atlas</a>, and <a href='undocumented#SkRSXform'>SkRSXform</a> <a href='#SkCanvas_drawAtlas_2_xform'>xform</a> transforms it into destination space.
5776
5777<a href='#SkCanvas_drawAtlas_2_xform'>xform</a>, <a href='undocumented#Text'>text</a>, and <a href='#SkCanvas_drawAtlas_2_colors'>colors</a> if present, must contain <a href='#SkCanvas_drawAtlas_2_count'>count</a> entries.
5778Optional <a href='#SkCanvas_drawAtlas_2_colors'>colors</a> is applied for each <a href='undocumented#Sprite'>sprite</a> using <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>.
5779Optional <a href='#SkCanvas_drawAtlas_2_cullRect'>cullRect</a> is a conservative bounds of all transformed <a href='undocumented#Sprite'>sprites</a>.
5780If <a href='#SkCanvas_drawAtlas_2_cullRect'>cullRect</a> is outside of clip, <a href='SkCanvas_Reference#Canvas'>canvas</a> can skip drawing.
5781
5782### Parameters
5783
5784<table>  <tr>    <td><a name='SkCanvas_drawAtlas_2_atlas'><code><strong>atlas</strong></code></a></td>
5785    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing <a href='undocumented#Sprite'>sprites</a></td>
5786  </tr>
5787  <tr>    <td><a name='SkCanvas_drawAtlas_2_xform'><code><strong>xform</strong></code></a></td>
5788    <td><a href='undocumented#SkRSXform'>SkRSXform</a> mappings for <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_2_atlas'>atlas</a></td>
5789  </tr>
5790  <tr>    <td><a name='SkCanvas_drawAtlas_2_tex'><code><strong>tex</strong></code></a></td>
5791    <td><a href='SkRect_Reference#SkRect'>SkRect</a> locations of <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_2_atlas'>atlas</a></td>
5792  </tr>
5793  <tr>    <td><a name='SkCanvas_drawAtlas_2_colors'><code><strong>colors</strong></code></a></td>
5794    <td>one per <a href='undocumented#Sprite'>sprite</a>, blended with <a href='undocumented#Sprite'>sprite</a> using <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>; may be nullptr</td>
5795  </tr>
5796  <tr>    <td><a name='SkCanvas_drawAtlas_2_count'><code><strong>count</strong></code></a></td>
5797    <td>number of <a href='undocumented#Sprite'>sprites</a> to draw</td>
5798  </tr>
5799  <tr>    <td><a name='SkCanvas_drawAtlas_2_mode'><code><strong>mode</strong></code></a></td>
5800    <td><a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a> combining <a href='#SkCanvas_drawAtlas_2_colors'>colors</a> and <a href='undocumented#Sprite'>sprites</a></td>
5801  </tr>
5802  <tr>    <td><a name='SkCanvas_drawAtlas_2_cullRect'><code><strong>cullRect</strong></code></a></td>
5803    <td>bounds of transformed <a href='undocumented#Sprite'>sprites</a> for efficient clipping; may be nullptr</td>
5804  </tr>
5805  <tr>    <td><a name='SkCanvas_drawAtlas_2_paint'><code><strong>paint</strong></code></a></td>
5806    <td><a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and so on; may be nullptr</td>
5807  </tr>
5808</table>
5809
5810### Example
5811
5812<div><fiddle-embed name="0e66a8f230a8d531bcef9f5ebdc5aac1"></fiddle-embed></div>
5813
5814### See Also
5815
5816<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a>
5817
5818<a name='SkCanvas_drawAtlas_3'></a>
5819
5820---
5821
5822<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5823void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[], int count,
5824               const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5825</pre>
5826
5827Draws a set of <a href='undocumented#Sprite'>sprites</a> from <a href='#SkCanvas_drawAtlas_3_atlas'>atlas</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawAtlas_3_paint'>paint</a>.
5828<a href='#SkCanvas_drawAtlas_3_paint'>paint</a> uses <a href='SkPaint_Reference#Anti_Alias'>anti-alias</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>
5829to draw, if present. For each entry in the array, <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawAtlas_3_tex'>tex</a> locates <a href='undocumented#Sprite'>sprite</a> in
5830<a href='#SkCanvas_drawAtlas_3_atlas'>atlas</a>, and <a href='undocumented#SkRSXform'>SkRSXform</a> <a href='#SkCanvas_drawAtlas_3_xform'>xform</a> transforms it into destination space.
5831
5832<a href='#SkCanvas_drawAtlas_3_xform'>xform</a> and <a href='undocumented#Text'>text</a> must contain <a href='#SkCanvas_drawAtlas_3_count'>count</a> entries.
5833Optional <a href='#SkCanvas_drawAtlas_3_cullRect'>cullRect</a> is a conservative bounds of all transformed <a href='undocumented#Sprite'>sprites</a>.
5834If <a href='#SkCanvas_drawAtlas_3_cullRect'>cullRect</a> is outside of clip, <a href='SkCanvas_Reference#Canvas'>canvas</a> can skip drawing.
5835
5836### Parameters
5837
5838<table>  <tr>    <td><a name='SkCanvas_drawAtlas_3_atlas'><code><strong>atlas</strong></code></a></td>
5839    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing <a href='undocumented#Sprite'>sprites</a></td>
5840  </tr>
5841  <tr>    <td><a name='SkCanvas_drawAtlas_3_xform'><code><strong>xform</strong></code></a></td>
5842    <td><a href='undocumented#SkRSXform'>SkRSXform</a> mappings for <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_3_atlas'>atlas</a></td>
5843  </tr>
5844  <tr>    <td><a name='SkCanvas_drawAtlas_3_tex'><code><strong>tex</strong></code></a></td>
5845    <td><a href='SkRect_Reference#SkRect'>SkRect</a> locations of <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_3_atlas'>atlas</a></td>
5846  </tr>
5847  <tr>    <td><a name='SkCanvas_drawAtlas_3_count'><code><strong>count</strong></code></a></td>
5848    <td>number of <a href='undocumented#Sprite'>sprites</a> to draw</td>
5849  </tr>
5850  <tr>    <td><a name='SkCanvas_drawAtlas_3_cullRect'><code><strong>cullRect</strong></code></a></td>
5851    <td>bounds of transformed <a href='undocumented#Sprite'>sprites</a> for efficient clipping; may be nullptr</td>
5852  </tr>
5853  <tr>    <td><a name='SkCanvas_drawAtlas_3_paint'><code><strong>paint</strong></code></a></td>
5854    <td><a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and so on; may be nullptr</td>
5855  </tr>
5856</table>
5857
5858### Example
5859
5860<div><fiddle-embed name="8dc0d0fdeab20bbc21cac6874ddbefcd"></fiddle-embed></div>
5861
5862### See Also
5863
5864<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a>
5865
5866<a name='SkCanvas_drawAtlas_4'></a>
5867
5868---
5869
5870<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5871void <a href='#SkCanvas_drawAtlas'>drawAtlas</a>(const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='SkImage_Reference#SkImage'>SkImage</a>&gt;& atlas, const <a href='undocumented#SkRSXform'>SkRSXform</a> xform[], const <a href='SkRect_Reference#SkRect'>SkRect</a> tex[], int count,
5872               const <a href='SkRect_Reference#SkRect'>SkRect</a>* cullRect, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='SkPaint_Reference#Paint'>paint</a>)
5873</pre>
5874
5875Draws a set of <a href='undocumented#Sprite'>sprites</a> from <a href='#SkCanvas_drawAtlas_4_atlas'>atlas</a>, using clip, <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, and optional <a href='SkPaint_Reference#SkPaint'>SkPaint</a> <a href='#SkCanvas_drawAtlas_4_paint'>paint</a>.
5876<a href='#SkCanvas_drawAtlas_4_paint'>paint</a> uses <a href='SkPaint_Reference#Anti_Alias'>anti-alias</a>, <a href='SkColor_Reference#Alpha'>alpha</a>, <a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, and <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>
5877to draw, if present. For each entry in the array, <a href='SkRect_Reference#SkRect'>SkRect</a> <a href='#SkCanvas_drawAtlas_4_tex'>tex</a> locates <a href='undocumented#Sprite'>sprite</a> in
5878<a href='#SkCanvas_drawAtlas_4_atlas'>atlas</a>, and <a href='undocumented#SkRSXform'>SkRSXform</a> <a href='#SkCanvas_drawAtlas_4_xform'>xform</a> transforms it into destination space.
5879
5880<a href='#SkCanvas_drawAtlas_4_xform'>xform</a> and <a href='undocumented#Text'>text</a> must contain <a href='#SkCanvas_drawAtlas_4_count'>count</a> entries.
5881Optional <a href='#SkCanvas_drawAtlas_4_cullRect'>cullRect</a> is a conservative bounds of all transformed <a href='undocumented#Sprite'>sprites</a>.
5882If <a href='#SkCanvas_drawAtlas_4_cullRect'>cullRect</a> is outside of clip, <a href='SkCanvas_Reference#Canvas'>canvas</a> can skip drawing.
5883
5884### Parameters
5885
5886<table>  <tr>    <td><a name='SkCanvas_drawAtlas_4_atlas'><code><strong>atlas</strong></code></a></td>
5887    <td><a href='SkImage_Reference#SkImage'>SkImage</a> containing <a href='undocumented#Sprite'>sprites</a></td>
5888  </tr>
5889  <tr>    <td><a name='SkCanvas_drawAtlas_4_xform'><code><strong>xform</strong></code></a></td>
5890    <td><a href='undocumented#SkRSXform'>SkRSXform</a> mappings for <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_4_atlas'>atlas</a></td>
5891  </tr>
5892  <tr>    <td><a name='SkCanvas_drawAtlas_4_tex'><code><strong>tex</strong></code></a></td>
5893    <td><a href='SkRect_Reference#SkRect'>SkRect</a> locations of <a href='undocumented#Sprite'>sprites</a> in <a href='#SkCanvas_drawAtlas_4_atlas'>atlas</a></td>
5894  </tr>
5895  <tr>    <td><a name='SkCanvas_drawAtlas_4_count'><code><strong>count</strong></code></a></td>
5896    <td>number of <a href='undocumented#Sprite'>sprites</a> to draw</td>
5897  </tr>
5898  <tr>    <td><a name='SkCanvas_drawAtlas_4_cullRect'><code><strong>cullRect</strong></code></a></td>
5899    <td>bounds of transformed <a href='undocumented#Sprite'>sprites</a> for efficient clipping; may be nullptr</td>
5900  </tr>
5901  <tr>    <td><a name='SkCanvas_drawAtlas_4_paint'><code><strong>paint</strong></code></a></td>
5902    <td><a href='undocumented#SkColorFilter'>SkColorFilter</a>, <a href='undocumented#SkImageFilter'>SkImageFilter</a>, <a href='SkBlendMode_Reference#SkBlendMode'>SkBlendMode</a>, and so on; may be nullptr</td>
5903  </tr>
5904</table>
5905
5906### Example
5907
5908<div><fiddle-embed name="c093c2b14bd3e6171ede7cd4049d9b57"></fiddle-embed></div>
5909
5910### See Also
5911
5912<a href='#SkCanvas_drawBitmap'>drawBitmap</a> <a href='#SkCanvas_drawImage'>drawImage</a>
5913
5914<a name='SkCanvas_drawDrawable'></a>
5915
5916---
5917
5918<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5919void <a href='#SkCanvas_drawDrawable'>drawDrawable</a>(<a href='undocumented#SkDrawable'>SkDrawable</a>* <a href='undocumented#Drawable'>drawable</a>, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* <a href='SkMatrix_Reference#Matrix'>matrix</a> = nullptr)
5920</pre>
5921
5922Draws <a href='undocumented#SkDrawable'>SkDrawable</a> <a href='#SkCanvas_drawDrawable_drawable'>drawable</a> using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, concatenated with
5923optional <a href='#SkCanvas_drawDrawable_matrix'>matrix</a>.
5924
5925If <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> has an asynchronous implementation, as is the case
5926when it is recording into <a href='SkPicture_Reference#SkPicture'>SkPicture</a>, then <a href='#SkCanvas_drawDrawable_drawable'>drawable</a> will be referenced,
5927so that <a href='undocumented#SkDrawable'>SkDrawable</a>::<a href='#SkDrawable_draw'>draw()</a> can be called when the operation is finalized. To force
5928immediate drawing, call <a href='undocumented#SkDrawable'>SkDrawable</a>::<a href='#SkDrawable_draw'>draw()</a> instead.
5929
5930### Parameters
5931
5932<table>  <tr>    <td><a name='SkCanvas_drawDrawable_drawable'><code><strong>drawable</strong></code></a></td>
5933    <td>custom struct encapsulating drawing commands</td>
5934  </tr>
5935  <tr>    <td><a name='SkCanvas_drawDrawable_matrix'><code><strong>matrix</strong></code></a></td>
5936    <td>transformation applied to drawing; may be nullptr</td>
5937  </tr>
5938</table>
5939
5940### Example
5941
5942<div><fiddle-embed name="3a4dfcd08838866b5cfc0d82489195ba"></fiddle-embed></div>
5943
5944### See Also
5945
5946<a href='undocumented#SkDrawable'>SkDrawable</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5947
5948<a name='SkCanvas_drawDrawable_2'></a>
5949
5950---
5951
5952<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5953void <a href='#SkCanvas_drawDrawable'>drawDrawable</a>(<a href='undocumented#SkDrawable'>SkDrawable</a>* <a href='undocumented#Drawable'>drawable</a>, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y)
5954</pre>
5955
5956Draws <a href='undocumented#SkDrawable'>SkDrawable</a> <a href='#SkCanvas_drawDrawable_2_drawable'>drawable</a> using clip and <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>, offset by (<a href='#SkCanvas_drawDrawable_2_x'>x</a>, <a href='#SkCanvas_drawDrawable_2_y'>y</a>).
5957
5958If <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> has an asynchronous implementation, as is the case
5959when it is recording into <a href='SkPicture_Reference#SkPicture'>SkPicture</a>, then <a href='#SkCanvas_drawDrawable_2_drawable'>drawable</a> will be referenced,
5960so that <a href='undocumented#SkDrawable'>SkDrawable</a>::<a href='#SkDrawable_draw'>draw()</a> can be called when the operation is finalized. To force
5961immediate drawing, call <a href='undocumented#SkDrawable'>SkDrawable</a>::<a href='#SkDrawable_draw'>draw()</a> instead.
5962
5963### Parameters
5964
5965<table>  <tr>    <td><a name='SkCanvas_drawDrawable_2_drawable'><code><strong>drawable</strong></code></a></td>
5966    <td>custom struct encapsulating drawing commands</td>
5967  </tr>
5968  <tr>    <td><a name='SkCanvas_drawDrawable_2_x'><code><strong>x</strong></code></a></td>
5969    <td>offset into <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> writable pixels on x-axis</td>
5970  </tr>
5971  <tr>    <td><a name='SkCanvas_drawDrawable_2_y'><code><strong>y</strong></code></a></td>
5972    <td>offset into <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> writable pixels on y-axis</td>
5973  </tr>
5974</table>
5975
5976### Example
5977
5978<div><fiddle-embed name="1bdc07ad3b154c89b771722c2fcaee3f"></fiddle-embed></div>
5979
5980### See Also
5981
5982<a href='undocumented#SkDrawable'>SkDrawable</a> <a href='#SkCanvas_drawPicture'>drawPicture</a>
5983
5984<a name='SkCanvas_drawAnnotation'></a>
5985
5986---
5987
5988<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
5989void <a href='#SkCanvas_drawAnnotation'>drawAnnotation</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const char key[], <a href='undocumented#SkData'>SkData</a>* value)
5990</pre>
5991
5992Associates <a href='SkRect_Reference#SkRect'>SkRect</a> on <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> with an annotation; a key-value pair, where the <a href='#SkCanvas_drawAnnotation_key'>key</a> is
5993a null-terminated UTF-8 <a href='undocumented#String'>string</a>, and optional <a href='#SkCanvas_drawAnnotation_value'>value</a> is stored as <a href='undocumented#SkData'>SkData</a>.
5994
5995Only some <a href='SkCanvas_Reference#Canvas'>canvas</a> implementations, such as recording to <a href='SkPicture_Reference#SkPicture'>SkPicture</a>, or drawing to
5996<a href='undocumented#Document_PDF'>document PDF</a>, use annotations.
5997
5998### Parameters
5999
6000<table>  <tr>    <td><a name='SkCanvas_drawAnnotation_rect'><code><strong>rect</strong></code></a></td>
6001    <td><a href='SkRect_Reference#SkRect'>SkRect</a> extent of <a href='SkCanvas_Reference#Canvas'>canvas</a> to annotate</td>
6002  </tr>
6003  <tr>    <td><a name='SkCanvas_drawAnnotation_key'><code><strong>key</strong></code></a></td>
6004    <td><a href='undocumented#String'>string</a> used for lookup</td>
6005  </tr>
6006  <tr>    <td><a name='SkCanvas_drawAnnotation_value'><code><strong>value</strong></code></a></td>
6007    <td><a href='undocumented#Data'>data</a> holding <a href='#SkCanvas_drawAnnotation_value'>value</a> stored in annotation</td>
6008  </tr>
6009</table>
6010
6011### Example
6012
6013<div><fiddle-embed name="00b430bd80d740e19c6d020a940f56d5"></fiddle-embed></div>
6014
6015### See Also
6016
6017<a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='undocumented#SkDocument'>SkDocument</a>
6018
6019<a name='SkCanvas_drawAnnotation_2'></a>
6020
6021---
6022
6023<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
6024void <a href='#SkCanvas_drawAnnotation'>drawAnnotation</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='SkRect_Reference#Rect'>rect</a>, const char key[], const <a href='undocumented#sk_sp'>sk_sp</a>&lt;<a href='undocumented#SkData'>SkData</a>&gt;& value)
6025</pre>
6026
6027Associates <a href='SkRect_Reference#SkRect'>SkRect</a> on <a href='SkCanvas_Reference#SkCanvas'>SkCanvas</a> when an annotation; a key-value pair, where the <a href='#SkCanvas_drawAnnotation_2_key'>key</a> is
6028a null-terminated UTF-8 <a href='undocumented#String'>string</a>, and optional <a href='#SkCanvas_drawAnnotation_2_value'>value</a> is stored as <a href='undocumented#SkData'>SkData</a>.
6029
6030Only some <a href='SkCanvas_Reference#Canvas'>canvas</a> implementations, such as recording to <a href='SkPicture_Reference#SkPicture'>SkPicture</a>, or drawing to
6031<a href='undocumented#Document_PDF'>document PDF</a>, use annotations.
6032
6033### Parameters
6034
6035<table>  <tr>    <td><a name='SkCanvas_drawAnnotation_2_rect'><code><strong>rect</strong></code></a></td>
6036    <td><a href='SkRect_Reference#SkRect'>SkRect</a> extent of <a href='SkCanvas_Reference#Canvas'>canvas</a> to annotate</td>
6037  </tr>
6038  <tr>    <td><a name='SkCanvas_drawAnnotation_2_key'><code><strong>key</strong></code></a></td>
6039    <td><a href='undocumented#String'>string</a> used for lookup</td>
6040  </tr>
6041  <tr>    <td><a name='SkCanvas_drawAnnotation_2_value'><code><strong>value</strong></code></a></td>
6042    <td><a href='undocumented#Data'>data</a> holding <a href='#SkCanvas_drawAnnotation_2_value'>value</a> stored in annotation</td>
6043  </tr>
6044</table>
6045
6046### Example
6047
6048<div><fiddle-embed name="00b430bd80d740e19c6d020a940f56d5"></fiddle-embed></div>
6049
6050### See Also
6051
6052<a href='SkPicture_Reference#SkPicture'>SkPicture</a> <a href='undocumented#SkDocument'>SkDocument</a>
6053
6054<a name='SkCanvas_isClipEmpty'></a>
6055
6056---
6057
6058<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
6059virtual bool <a href='#SkCanvas_isClipEmpty'>isClipEmpty</a>()const
6060</pre>
6061
6062Returns true if clip is empty; that is, nothing will draw.
6063
6064May do work when called; it should not be called
6065more often than needed. However, once called, subsequent calls perform no
6066work until clip changes.
6067
6068### Return Value
6069
6070true if clip is empty
6071
6072### Example
6073
6074<div><fiddle-embed name="f106f146a58c8604308d4d8d7086d2f5">
6075
6076#### Example Output
6077
6078~~~~
6079clip is not empty
6080clip is empty
6081~~~~
6082
6083</fiddle-embed></div>
6084
6085### See Also
6086
6087<a href='#SkCanvas_isClipRect'>isClipRect</a> <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>
6088
6089<a name='SkCanvas_isClipRect'></a>
6090
6091---
6092
6093<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
6094virtual bool <a href='#SkCanvas_isClipRect'>isClipRect</a>()const
6095</pre>
6096
6097Returns true if clip is <a href='SkRect_Reference#SkRect'>SkRect</a> and not empty.
6098Returns false if the clip is empty, or if it is not <a href='SkRect_Reference#SkRect'>SkRect</a>.
6099
6100### Return Value
6101
6102true if clip is <a href='SkRect_Reference#SkRect'>SkRect</a> and not empty
6103
6104### Example
6105
6106<div><fiddle-embed name="9894bfb476c78a8f6c8f49fbbca3d50d">
6107
6108#### Example Output
6109
6110~~~~
6111clip is rect
6112clip is not rect
6113~~~~
6114
6115</fiddle-embed></div>
6116
6117### See Also
6118
6119<a href='#SkCanvas_isClipEmpty'>isClipEmpty</a> <a href='#SkCanvas_getLocalClipBounds'>getLocalClipBounds</a> <a href='#SkCanvas_getDeviceClipBounds'>getDeviceClipBounds</a>
6120
6121