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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 vertex (texs, colors) array. | 1001 vertex (texs, colors) array. |
1002 @param indexCount number of entries in the indices array (if not null) | 1002 @param indexCount number of entries in the indices array (if not null) |
1003 @param paint Specifies the shader/texture if present. | 1003 @param paint Specifies the shader/texture if present. |
1004 */ | 1004 */ |
1005 virtual void drawVertices(VertexMode vmode, int vertexCount, | 1005 virtual void drawVertices(VertexMode vmode, int vertexCount, |
1006 const SkPoint vertices[], const SkPoint texs[], | 1006 const SkPoint vertices[], const SkPoint texs[], |
1007 const SkColor colors[], SkXfermode* xmode, | 1007 const SkColor colors[], SkXfermode* xmode, |
1008 const uint16_t indices[], int indexCount, | 1008 const uint16_t indices[], int indexCount, |
1009 const SkPaint& paint); | 1009 const SkPaint& paint); |
1010 | 1010 |
| 1011 /** |
| 1012 |
| 1013 Draw a SkPatch |
| 1014 |
| 1015 @param patch specifies the 4 bounding cubic bezier curves of a patch. |
| 1016 @param paint Specifies the shader/texture if present. |
| 1017 */ |
1011 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint); | 1018 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint); |
1012 | 1019 |
1013 /** Send a blob of data to the canvas. | 1020 /** Send a blob of data to the canvas. |
1014 For canvases that draw, this call is effectively a no-op, as the data | 1021 For canvases that draw, this call is effectively a no-op, as the data |
1015 is not parsed, but just ignored. However, this call exists for | 1022 is not parsed, but just ignored. However, this call exists for |
1016 subclasses like SkPicture's recording canvas, that can store the data | 1023 subclasses like SkPicture's recording canvas, that can store the data |
1017 and then play it back later (via another call to drawData). | 1024 and then play it back later (via another call to drawData). |
1018 */ | 1025 */ |
1019 virtual void drawData(const void* data, size_t length) { | 1026 virtual void drawData(const void* data, size_t length) { |
1020 // do nothing. Subclasses may do something with the data | 1027 // do nothing. Subclasses may do something with the data |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 | 1482 |
1476 class SkCanvasClipVisitor { | 1483 class SkCanvasClipVisitor { |
1477 public: | 1484 public: |
1478 virtual ~SkCanvasClipVisitor(); | 1485 virtual ~SkCanvasClipVisitor(); |
1479 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1486 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1480 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1487 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1481 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1488 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1482 }; | 1489 }; |
1483 | 1490 |
1484 #endif | 1491 #endif |
OLD | NEW |