| 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 their order is the same as the colors. | 1010 their order is the same as the colors. |
| 1011 @param xmode specifies how are the colors and the textures combined if both
of them are | 1011 @param xmode specifies how are the colors and the textures combined if both
of them are |
| 1012 present. | 1012 present. |
| 1013 @param paint Specifies the shader/texture if present. | 1013 @param paint Specifies the shader/texture if present. |
| 1014 */ | 1014 */ |
| 1015 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], | 1015 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| 1016 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint&
paint); | 1016 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint&
paint); |
| 1017 | 1017 |
| 1018 void EXPERIMENTAL_drawDrawable(SkCanvasDrawable*); | 1018 void EXPERIMENTAL_drawDrawable(SkCanvasDrawable*); |
| 1019 | 1019 |
| 1020 #ifdef SK_SUPPORT_LEGACY_DRAWDATA |
| 1020 /** Send a blob of data to the canvas. | 1021 /** Send a blob of data to the canvas. |
| 1021 For canvases that draw, this call is effectively a no-op, as the data | 1022 For canvases that draw, this call is effectively a no-op, as the data |
| 1022 is not parsed, but just ignored. However, this call exists for | 1023 is not parsed, but just ignored. However, this call exists for |
| 1023 subclasses like SkPicture's recording canvas, that can store the data | 1024 subclasses like SkPicture's recording canvas, that can store the data |
| 1024 and then play it back later (via another call to drawData). | 1025 and then play it back later (via another call to drawData). |
| 1025 */ | 1026 */ |
| 1026 virtual void drawData(const void* /*data*/, size_t /*length*/) { | 1027 virtual void drawData(const void* /*data*/, size_t /*length*/) {} |
| 1027 // do nothing. Subclasses may do something with the data | 1028 #endif |
| 1028 } | |
| 1029 | 1029 |
| 1030 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. | 1030 /** Add comments. beginCommentGroup/endCommentGroup open/close a new group. |
| 1031 Each comment added via addComment is notionally attached to its | 1031 Each comment added via addComment is notionally attached to its |
| 1032 enclosing group. Top-level comments simply belong to no group. | 1032 enclosing group. Top-level comments simply belong to no group. |
| 1033 */ | 1033 */ |
| 1034 virtual void beginCommentGroup(const char* /*description*/) { | 1034 virtual void beginCommentGroup(const char* /*description*/) { |
| 1035 // do nothing. Subclasses may do something | 1035 // do nothing. Subclasses may do something |
| 1036 } | 1036 } |
| 1037 virtual void addComment(const char* /*kywd*/, const char* /*value*/) { | 1037 virtual void addComment(const char* /*kywd*/, const char* /*value*/) { |
| 1038 // do nothing. Subclasses may do something | 1038 // do nothing. Subclasses may do something |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 | 1482 |
| 1483 class SkCanvasClipVisitor { | 1483 class SkCanvasClipVisitor { |
| 1484 public: | 1484 public: |
| 1485 virtual ~SkCanvasClipVisitor(); | 1485 virtual ~SkCanvasClipVisitor(); |
| 1486 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1486 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1487 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1487 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1488 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1488 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1489 }; | 1489 }; |
| 1490 | 1490 |
| 1491 #endif | 1491 #endif |
| OLD | NEW |