| 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 void EXPERIMENTAL_purge(const SkPicture* picture); | 979 void EXPERIMENTAL_purge(const SkPicture* picture); |
| 980 | 980 |
| 981 /** Draw the picture into this canvas. This method effective brackets the | 981 /** Draw the picture into this canvas. This method effective brackets the |
| 982 playback of the picture's draw calls with save/restore, so the state | 982 playback of the picture's draw calls with save/restore, so the state |
| 983 of this canvas will be unchanged after this call. | 983 of this canvas will be unchanged after this call. |
| 984 @param picture The recorded drawing commands to playback into this | 984 @param picture The recorded drawing commands to playback into this |
| 985 canvas. | 985 canvas. |
| 986 */ | 986 */ |
| 987 void drawPicture(const SkPicture* picture); | 987 void drawPicture(const SkPicture* picture); |
| 988 | 988 |
| 989 #ifdef SK_SUPPORT_LEGACY_DRAWPICTURE_API | |
| 990 virtual void drawPicture(SkPicture& picture) { | |
| 991 this->drawPicture(&picture); | |
| 992 } | |
| 993 #endif | |
| 994 | |
| 995 enum VertexMode { | 989 enum VertexMode { |
| 996 kTriangles_VertexMode, | 990 kTriangles_VertexMode, |
| 997 kTriangleStrip_VertexMode, | 991 kTriangleStrip_VertexMode, |
| 998 kTriangleFan_VertexMode | 992 kTriangleFan_VertexMode |
| 999 }; | 993 }; |
| 1000 | 994 |
| 1001 /** Draw the array of vertices, interpreted as triangles (based on mode). | 995 /** Draw the array of vertices, interpreted as triangles (based on mode). |
| 1002 | 996 |
| 1003 If both textures and vertex-colors are NULL, it strokes hairlines with | 997 If both textures and vertex-colors are NULL, it strokes hairlines with |
| 1004 the paint's color. This behavior is a useful debugging mode to visualize | 998 the paint's color. This behavior is a useful debugging mode to visualize |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 | 1494 |
| 1501 class SkCanvasClipVisitor { | 1495 class SkCanvasClipVisitor { |
| 1502 public: | 1496 public: |
| 1503 virtual ~SkCanvasClipVisitor(); | 1497 virtual ~SkCanvasClipVisitor(); |
| 1504 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1498 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1505 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1499 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1506 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1500 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1507 }; | 1501 }; |
| 1508 | 1502 |
| 1509 #endif | 1503 #endif |
| OLD | NEW |