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 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 class SkBaseDevice; | 22 class SkBaseDevice; |
23 class SkCanvasClipVisitor; | 23 class SkCanvasClipVisitor; |
24 class SkDraw; | 24 class SkDraw; |
25 class SkDrawable; | 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 struct SkRSXform; | |
31 class SkSurface; | 32 class SkSurface; |
32 class SkSurface_Base; | 33 class SkSurface_Base; |
33 class SkTextBlob; | 34 class SkTextBlob; |
34 class GrContext; | 35 class GrContext; |
35 class GrRenderTarget; | 36 class GrRenderTarget; |
36 | 37 |
37 class SkCanvasState; | 38 class SkCanvasState; |
38 | 39 |
39 /** \class SkCanvas | 40 /** \class SkCanvas |
40 | 41 |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1017 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch, | 1018 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch, |
1018 their order is the same as the colors. | 1019 their order is the same as the colors. |
1019 @param xmode specifies how are the colors and the textures combined if both of them are | 1020 @param xmode specifies how are the colors and the textures combined if both of them are |
1020 present. | 1021 present. |
1021 @param paint Specifies the shader/texture if present. | 1022 @param paint Specifies the shader/texture if present. |
1022 */ | 1023 */ |
1023 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1024 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], |
1024 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); | 1025 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); |
1025 | 1026 |
1026 /** | 1027 /** |
1028 * colors, cullRect and paint are all optional. | |
1029 */ | |
1030 void drawAtlas(const SkImage* atlas, const SkRSXform[], const SkRect tex[], const SkColor[], | |
bsalomon
2015/06/15 15:44:15
What does SkRSXform apply to? A standard rectangle
reed1
2015/06/15 18:52:33
added to dox:
xform maps [0, 0, tex.width, tex.he
| |
1031 int count, const SkRect* cullRect, const SkPaint* paint); | |
1032 | |
1033 /** | |
1027 * Draw the contents of this drawable into the canvas. If the canvas is asy nc | 1034 * Draw the contents of this drawable into the canvas. If the canvas is asy nc |
1028 * (e.g. it is recording into a picture) then the drawable will be referenc ed instead, | 1035 * (e.g. it is recording into a picture) then the drawable will be referenc ed instead, |
1029 * to have its draw() method called when the picture is finalized. | 1036 * to have its draw() method called when the picture is finalized. |
1030 * | 1037 * |
1031 * If the intent is to force the contents of the drawable into this canvas immediately, | 1038 * If the intent is to force the contents of the drawable into this canvas immediately, |
1032 * then drawable->draw(canvas) may be called. | 1039 * then drawable->draw(canvas) may be called. |
1033 */ | 1040 */ |
1034 void drawDrawable(SkDrawable* drawable); | 1041 void drawDrawable(SkDrawable* drawable); |
1035 | 1042 |
1036 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. | 1043 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1503 | 1510 |
1504 class SkCanvasClipVisitor { | 1511 class SkCanvasClipVisitor { |
1505 public: | 1512 public: |
1506 virtual ~SkCanvasClipVisitor(); | 1513 virtual ~SkCanvasClipVisitor(); |
1507 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1514 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1508 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1515 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1509 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1516 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1510 }; | 1517 }; |
1511 | 1518 |
1512 #endif | 1519 #endif |
OLD | NEW |