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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 * Based on the paint's style, strokeWidth, and the matrix, classify how | 90 * Based on the paint's style, strokeWidth, and the matrix, classify how |
91 * to draw the rect. If no special-case is available, returns | 91 * to draw the rect. If no special-case is available, returns |
92 * kPath_RectType. | 92 * kPath_RectType. |
93 * | 93 * |
94 * Iff RectType == kStroke_RectType, then strokeSize is set to the device | 94 * Iff RectType == kStroke_RectType, then strokeSize is set to the device |
95 * width and height of the stroke. | 95 * width and height of the stroke. |
96 */ | 96 */ |
97 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, | 97 static RectType ComputeRectType(const SkPaint&, const SkMatrix&, |
98 SkPoint* strokeSize); | 98 SkPoint* strokeSize); |
99 | 99 |
100 private: | |
101 void drawText_asPaths(const char text[], size_t byteLength, | 100 void drawText_asPaths(const char text[], size_t byteLength, |
102 SkScalar x, SkScalar y, const SkPaint&) const; | 101 SkScalar x, SkScalar y, const SkPaint&) const; |
103 void drawDevMask(const SkMask& mask, const SkPaint&) const; | |
104 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; | |
105 | |
106 void drawPosText_asPaths(const char text[], size_t byteLength, | 102 void drawPosText_asPaths(const char text[], size_t byteLength, |
107 const SkScalar pos[], SkScalar constY, | 103 const SkScalar pos[], SkScalar constY, |
108 int scalarsPerPosition, const SkPaint&) const; | 104 int scalarsPerPosition, const SkPaint&) const; |
109 | 105 |
| 106 private: |
| 107 void drawDevMask(const SkMask& mask, const SkPaint&) const; |
| 108 void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; |
| 109 |
110 /** | 110 /** |
111 * Return the current clip bounds, in local coordinates, with slop to accou
nt | 111 * Return the current clip bounds, in local coordinates, with slop to accou
nt |
112 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then | 112 * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then |
113 * run through the inverse of the matrix). | 113 * run through the inverse of the matrix). |
114 * | 114 * |
115 * If the matrix cannot be inverted, or the current clip is empty, return | 115 * If the matrix cannot be inverted, or the current clip is empty, return |
116 * false and ignore bounds parameter. | 116 * false and ignore bounds parameter. |
117 */ | 117 */ |
118 bool SK_WARN_UNUSED_RESULT | 118 bool SK_WARN_UNUSED_RESULT |
119 computeConservativeLocalClipBounds(SkRect* bounds) const; | 119 computeConservativeLocalClipBounds(SkRect* bounds) const; |
(...skipping 12 matching lines...) Expand all Loading... |
132 SkDrawProcs* fProcs; // optional | 132 SkDrawProcs* fProcs; // optional |
133 | 133 |
134 #ifdef SK_DEBUG | 134 #ifdef SK_DEBUG |
135 void validate() const; | 135 void validate() const; |
136 #else | 136 #else |
137 void validate() const {} | 137 void validate() const {} |
138 #endif | 138 #endif |
139 }; | 139 }; |
140 | 140 |
141 #endif | 141 #endif |
OLD | NEW |