OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkDraw_DEFINED | 10 #ifndef SkDraw_DEFINED |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void drawPath(const SkPath& path, const SkPaint& paint, | 53 void drawPath(const SkPath& path, const SkPaint& paint, |
54 SkBlitter* customBlitter = NULL) const { | 54 SkBlitter* customBlitter = NULL) const { |
55 this->drawPath(path, paint, NULL, false, false, customBlitter); | 55 this->drawPath(path, paint, NULL, false, false, customBlitter); |
56 } | 56 } |
57 | 57 |
58 void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const; | 58 void drawBitmap(const SkBitmap&, const SkMatrix&, const SkPaint&) const; |
59 void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const; | 59 void drawSprite(const SkBitmap&, int x, int y, const SkPaint&) const; |
60 void drawText(const char text[], size_t byteLength, SkScalar x, | 60 void drawText(const char text[], size_t byteLength, SkScalar x, |
61 SkScalar y, const SkPaint& paint) const; | 61 SkScalar y, const SkPaint& paint) const; |
62 void drawPosText(const char text[], size_t byteLength, | 62 void drawPosText(const char text[], size_t byteLength, |
63 const SkScalar pos[], int scalarsPerPosition, | 63 const SkScalar pos[], SkScalar constY, |
64 const SkPoint& offset, const SkPaint& paint) const; | 64 int scalarsPerPosition, const SkPaint& paint) const; |
65 void drawTextOnPath(const char text[], size_t byteLength, | 65 void drawTextOnPath(const char text[], size_t byteLength, |
66 const SkPath&, const SkMatrix*, const SkPaint&) const; | 66 const SkPath&, const SkMatrix*, const SkPaint&) const; |
67 void drawVertices(SkCanvas::VertexMode mode, int count, | 67 void drawVertices(SkCanvas::VertexMode mode, int count, |
68 const SkPoint vertices[], const SkPoint textures[], | 68 const SkPoint vertices[], const SkPoint textures[], |
69 const SkColor colors[], SkXfermode* xmode, | 69 const SkColor colors[], SkXfermode* xmode, |
70 const uint16_t indices[], int ptCount, | 70 const uint16_t indices[], int ptCount, |
71 const SkPaint& paint) const; | 71 const SkPaint& paint) const; |
72 | 72 |
73 /** | 73 /** |
74 * Overwrite the target with the path's coverage (i.e. its mask). | 74 * Overwrite the target with the path's coverage (i.e. its mask). |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 * Iff RectType == kStroke_RectType, then strokeSize is set to the device | 106 * Iff RectType == kStroke_RectType, then strokeSize is set to the device |
107 * width and height of the stroke. | 107 * width and height of the stroke. |
108 */ | 108 */ |
109 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, | 109 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, |
110 SkPoint* strokeSize); | 110 SkPoint* strokeSize); |
111 | 111 |
112 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&); | 112 static bool ShouldDrawTextAsPaths(const SkPaint&, const SkMatrix&); |
113 void drawText_asPaths(const char text[], size_t byteLength, | 113 void drawText_asPaths(const char text[], size_t byteLength, |
114 SkScalar x, SkScalar y, const SkPaint&) const; | 114 SkScalar x, SkScalar y, const SkPaint&) const; |
115 void drawPosText_asPaths(const char text[], size_t byteLength, | 115 void drawPosText_asPaths(const char text[], size_t byteLength, |
116 const SkScalar pos[], int scalarsPerPosition
, | 116 const SkScalar pos[], SkScalar constY, |
117 const SkPoint& offset, const SkPaint&) const
; | 117 int scalarsPerPosition, const SkPaint&) cons
t; |
118 | 118 |
119 private: | 119 private: |
120 void drawDevMask(const SkMask& mask, const SkPaint&) const; | 120 void drawDevMask(const SkMask& mask, const SkPaint&) const; |
121 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; | 121 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; |
122 | 122 |
123 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, | 123 void drawPath(const SkPath&, const SkPaint&, const SkMatrix* preMatrix, |
124 bool pathIsMutable, bool drawCoverage, | 124 bool pathIsMutable, bool drawCoverage, |
125 SkBlitter* customBlitter = NULL) const; | 125 SkBlitter* customBlitter = NULL) const; |
126 | 126 |
127 /** | 127 /** |
(...skipping 18 matching lines...) Expand all Loading... |
146 SkDrawProcs* fProcs; // optional | 146 SkDrawProcs* fProcs; // optional |
147 | 147 |
148 #ifdef SK_DEBUG | 148 #ifdef SK_DEBUG |
149 void validate() const; | 149 void validate() const; |
150 #else | 150 #else |
151 void validate() const {} | 151 void validate() const {} |
152 #endif | 152 #endif |
153 }; | 153 }; |
154 | 154 |
155 #endif | 155 #endif |
OLD | NEW |