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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 | 988 |
989 /** Draw the picture into this canvas. This method effective brackets the | 989 /** Draw the picture into this canvas. This method effective brackets the |
990 playback of the picture's draw calls with save/restore, so the state | 990 playback of the picture's draw calls with save/restore, so the state |
991 of this canvas will be unchanged after this call. | 991 of this canvas will be unchanged after this call. |
992 @param picture The recorded drawing commands to playback into this | 992 @param picture The recorded drawing commands to playback into this |
993 canvas. | 993 canvas. |
994 */ | 994 */ |
995 void drawPicture(const SkPicture* picture) { | 995 void drawPicture(const SkPicture* picture) { |
996 this->drawPicture(picture, NULL, NULL); | 996 this->drawPicture(picture, NULL, NULL); |
997 } | 997 } |
998 void drawPicture(sk_sp<SkPicture>& picture) { | 998 void drawPicture(const sk_sp<SkPicture>& picture) { |
999 this->drawPicture(picture.get()); | 999 this->drawPicture(picture.get()); |
1000 } | 1000 } |
1001 | 1001 |
1002 /** | 1002 /** |
1003 * Draw the picture into this canvas. | 1003 * Draw the picture into this canvas. |
1004 * | 1004 * |
1005 * If matrix is non-null, apply that matrix to the CTM when drawing this pi
cture. This is | 1005 * If matrix is non-null, apply that matrix to the CTM when drawing this pi
cture. This is |
1006 * logically equivalent to | 1006 * logically equivalent to |
1007 * save/concat/drawPicture/restore | 1007 * save/concat/drawPicture/restore |
1008 * | 1008 * |
1009 * If paint is non-null, draw the picture into a temporary buffer, and then
apply the paint's | 1009 * If paint is non-null, draw the picture into a temporary buffer, and then
apply the paint's |
1010 * alpha/colorfilter/imagefilter/xfermode to that buffer as it is drawn to
the canvas. | 1010 * alpha/colorfilter/imagefilter/xfermode to that buffer as it is drawn to
the canvas. |
1011 * This is logically equivalent to | 1011 * This is logically equivalent to |
1012 * saveLayer(paint)/drawPicture/restore | 1012 * saveLayer(paint)/drawPicture/restore |
1013 */ | 1013 */ |
1014 void drawPicture(const SkPicture*, const SkMatrix* matrix, const SkPaint* pa
int); | 1014 void drawPicture(const SkPicture*, const SkMatrix* matrix, const SkPaint* pa
int); |
1015 void drawPicture(sk_sp<SkPicture>& picture, const SkMatrix* matrix, const Sk
Paint* paint) { | 1015 void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix, co
nst SkPaint* paint) { |
1016 this->drawPicture(picture.get(), matrix, paint); | 1016 this->drawPicture(picture.get(), matrix, paint); |
1017 } | 1017 } |
1018 | 1018 |
1019 enum VertexMode { | 1019 enum VertexMode { |
1020 kTriangles_VertexMode, | 1020 kTriangles_VertexMode, |
1021 kTriangleStrip_VertexMode, | 1021 kTriangleStrip_VertexMode, |
1022 kTriangleFan_VertexMode | 1022 kTriangleFan_VertexMode |
1023 }; | 1023 }; |
1024 | 1024 |
1025 /** Draw the array of vertices, interpreted as triangles (based on mode). | 1025 /** Draw the array of vertices, interpreted as triangles (based on mode). |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 | 1551 |
1552 class SkCanvasClipVisitor { | 1552 class SkCanvasClipVisitor { |
1553 public: | 1553 public: |
1554 virtual ~SkCanvasClipVisitor(); | 1554 virtual ~SkCanvasClipVisitor(); |
1555 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1555 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1556 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1556 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1557 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1557 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1558 }; | 1558 }; |
1559 | 1559 |
1560 #endif | 1560 #endif |
OLD | NEW |