OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkCanvas_DEFINED | 8 #ifndef SkCanvas_DEFINED |
9 #define SkCanvas_DEFINED | 9 #define SkCanvas_DEFINED |
10 | 10 |
11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 #include "SkDeque.h" | 13 #include "SkDeque.h" |
14 #include "SkClipStack.h" | 14 #include "SkClipStack.h" |
15 #include "SkPaint.h" | 15 #include "SkPaint.h" |
16 #include "SkRefCnt.h" | 16 #include "SkRefCnt.h" |
17 #include "SkPath.h" | 17 #include "SkPath.h" |
18 #include "SkRegion.h" | 18 #include "SkRegion.h" |
19 #include "SkSurfaceProps.h" | 19 #include "SkSurfaceProps.h" |
20 #include "SkXfermode.h" | 20 #include "SkXfermode.h" |
21 | 21 |
22 class SkBaseDevice; | 22 class SkBaseDevice; |
23 class SkCanvasClipVisitor; | 23 class SkCanvasClipVisitor; |
24 class SkCanvasDrawable; | |
25 class SkDraw; | 24 class SkDraw; |
25 class SkDrawable; | |
26 class SkDrawFilter; | 26 class SkDrawFilter; |
27 class SkImage; | 27 class SkImage; |
28 class SkMetaData; | 28 class SkMetaData; |
29 class SkPicture; | 29 class SkPicture; |
30 class SkRRect; | 30 class SkRRect; |
31 class SkSurface; | 31 class SkSurface; |
32 class SkSurface_Base; | 32 class SkSurface_Base; |
33 class SkTextBlob; | 33 class SkTextBlob; |
34 class GrContext; | 34 class GrContext; |
35 class GrRenderTarget; | 35 class GrRenderTarget; |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1010 @param colors specifies the colors for the corners which will be bilerp acr oss the patch, | 1010 @param colors specifies the colors for the corners which will be bilerp acr oss the patch, |
1011 their order is clockwise starting at the top left corner. | 1011 their order is clockwise starting at the top left corner. |
1012 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch, | 1012 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch, |
1013 their order is the same as the colors. | 1013 their order is the same as the colors. |
1014 @param xmode specifies how are the colors and the textures combined if both of them are | 1014 @param xmode specifies how are the colors and the textures combined if both of them are |
1015 present. | 1015 present. |
1016 @param paint Specifies the shader/texture if present. | 1016 @param paint Specifies the shader/texture if present. |
1017 */ | 1017 */ |
1018 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1018 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], |
1019 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); | 1019 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
1020 | 1020 |
robertphillips
2015/02/06 14:53:28
Needs comment!
| |
1021 void EXPERIMENTAL_drawDrawable(SkCanvasDrawable*); | 1021 void drawDrawable(SkDrawable*); |
1022 | 1022 |
1023 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. | 1023 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. |
1024 Each comment added via addComment is notionally attached to its | 1024 Each comment added via addComment is notionally attached to its |
1025 enclosing group. Top-level comments simply belong to no group. | 1025 enclosing group. Top-level comments simply belong to no group. |
1026 */ | 1026 */ |
1027 virtual void beginCommentGroup(const char* /*description*/) { | 1027 virtual void beginCommentGroup(const char* /*description*/) { |
1028 // do nothing. Subclasses may do something | 1028 // do nothing. Subclasses may do something |
1029 } | 1029 } |
1030 virtual void addComment(const char* /*kywd*/, const char* /*value*/) { | 1030 virtual void addComment(const char* /*kywd*/, const char* /*value*/) { |
1031 // do nothing. Subclasses may do something | 1031 // do nothing. Subclasses may do something |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1181 virtual void onDrawTextOnPath(const void* text, size_t byteLength, | 1181 virtual void onDrawTextOnPath(const void* text, size_t byteLength, |
1182 const SkPath& path, const SkMatrix* matrix, | 1182 const SkPath& path, const SkMatrix* matrix, |
1183 const SkPaint& paint); | 1183 const SkPaint& paint); |
1184 | 1184 |
1185 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 1185 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
1186 const SkPaint& paint); | 1186 const SkPaint& paint); |
1187 | 1187 |
1188 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1188 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
1189 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); | 1189 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
1190 | 1190 |
1191 virtual void onDrawDrawable(SkCanvasDrawable*); | 1191 virtual void onDrawDrawable(SkDrawable*); |
1192 | 1192 |
1193 virtual void onDrawPaint(const SkPaint&); | 1193 virtual void onDrawPaint(const SkPaint&); |
1194 virtual void onDrawRect(const SkRect&, const SkPaint&); | 1194 virtual void onDrawRect(const SkRect&, const SkPaint&); |
1195 virtual void onDrawOval(const SkRect&, const SkPaint&); | 1195 virtual void onDrawOval(const SkRect&, const SkPaint&); |
1196 virtual void onDrawRRect(const SkRRect&, const SkPaint&); | 1196 virtual void onDrawRRect(const SkRRect&, const SkPaint&); |
1197 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons t SkPaint&); | 1197 virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], cons t SkPaint&); |
1198 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti ces[], | 1198 virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint verti ces[], |
1199 const SkPoint texs[], const SkColor colors[], Sk Xfermode*, | 1199 const SkPoint texs[], const SkColor colors[], Sk Xfermode*, |
1200 const uint16_t indices[], int indexCount, const SkPaint&); | 1200 const uint16_t indices[], int indexCount, const SkPaint&); |
1201 virtual void onDrawPath(const SkPath&, const SkPaint&); | 1201 virtual void onDrawPath(const SkPath&, const SkPaint&); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1492 | 1492 |
1493 class SkCanvasClipVisitor { | 1493 class SkCanvasClipVisitor { |
1494 public: | 1494 public: |
1495 virtual ~SkCanvasClipVisitor(); | 1495 virtual ~SkCanvasClipVisitor(); |
1496 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1496 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1497 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1497 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1498 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1498 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1499 }; | 1499 }; |
1500 | 1500 |
1501 #endif | 1501 #endif |
OLD | NEW |