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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 void drawTextRSXform(const void* text, size_t byteLength, const SkRSXform[], | 1064 void drawTextRSXform(const void* text, size_t byteLength, const SkRSXform[], |
1065 const SkRect* cullRect, const SkPaint& paint); | 1065 const SkRect* cullRect, const SkPaint& paint); |
1066 | 1066 |
1067 /** Draw the text blob, offset by (x,y), using the specified paint. | 1067 /** Draw the text blob, offset by (x,y), using the specified paint. |
1068 @param blob The text blob to be drawn | 1068 @param blob The text blob to be drawn |
1069 @param x The x-offset of the text being drawn | 1069 @param x The x-offset of the text being drawn |
1070 @param y The y-offset of the text being drawn | 1070 @param y The y-offset of the text being drawn |
1071 @param paint The paint used for the text (e.g. color, size, style) | 1071 @param paint The paint used for the text (e.g. color, size, style) |
1072 */ | 1072 */ |
1073 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa
int& paint); | 1073 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa
int& paint); |
| 1074 void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, con
st SkPaint& paint) { |
| 1075 this->drawTextBlob(blob.get(), x, y, paint); |
| 1076 } |
1074 | 1077 |
1075 /** Draw the picture into this canvas. This method effective brackets the | 1078 /** Draw the picture into this canvas. This method effective brackets the |
1076 playback of the picture's draw calls with save/restore, so the state | 1079 playback of the picture's draw calls with save/restore, so the state |
1077 of this canvas will be unchanged after this call. | 1080 of this canvas will be unchanged after this call. |
1078 @param picture The recorded drawing commands to playback into this | 1081 @param picture The recorded drawing commands to playback into this |
1079 canvas. | 1082 canvas. |
1080 */ | 1083 */ |
1081 void drawPicture(const SkPicture* picture) { | 1084 void drawPicture(const SkPicture* picture) { |
1082 this->drawPicture(picture, NULL, NULL); | 1085 this->drawPicture(picture, NULL, NULL); |
1083 } | 1086 } |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 | 1721 |
1719 class SkCanvasClipVisitor { | 1722 class SkCanvasClipVisitor { |
1720 public: | 1723 public: |
1721 virtual ~SkCanvasClipVisitor(); | 1724 virtual ~SkCanvasClipVisitor(); |
1722 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1725 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1723 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1726 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1724 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1727 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1725 }; | 1728 }; |
1726 | 1729 |
1727 #endif | 1730 #endif |
OLD | NEW |