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 |
11 #define SkDraw_DEFINED | 11 #define SkDraw_DEFINED |
12 | 12 |
13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
14 #include "SkMask.h" | 14 #include "SkMask.h" |
15 #include "SkPaint.h" | 15 #include "SkPaint.h" |
| 16 #include "SkStrokeRec.h" |
16 | 17 |
17 class SkBitmap; | 18 class SkBitmap; |
18 class SkClipStack; | 19 class SkClipStack; |
19 class SkBaseDevice; | 20 class SkBaseDevice; |
20 class SkBlitter; | 21 class SkBlitter; |
21 class SkMatrix; | 22 class SkMatrix; |
22 class SkPath; | 23 class SkPath; |
23 class SkRegion; | 24 class SkRegion; |
24 class SkRasterClip; | 25 class SkRasterClip; |
25 struct SkDrawProcs; | 26 struct SkDrawProcs; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 87 } |
87 | 88 |
88 /** Helper function that creates a mask from a path and an optional maskfilt
er. | 89 /** Helper function that creates a mask from a path and an optional maskfilt
er. |
89 Note however, that the resulting mask will not have been actually filter
ed, | 90 Note however, that the resulting mask will not have been actually filter
ed, |
90 that must be done afterwards (by calling filterMask). The maskfilter is
provided | 91 that must be done afterwards (by calling filterMask). The maskfilter is
provided |
91 solely to assist in computing the mask's bounds (if the mode requests th
at). | 92 solely to assist in computing the mask's bounds (if the mode requests th
at). |
92 */ | 93 */ |
93 static bool DrawToMask(const SkPath& devPath, const SkIRect* clipBounds, | 94 static bool DrawToMask(const SkPath& devPath, const SkIRect* clipBounds, |
94 const SkMaskFilter*, const SkMatrix* filterMatrix, | 95 const SkMaskFilter*, const SkMatrix* filterMatrix, |
95 SkMask* mask, SkMask::CreateMode mode, | 96 SkMask* mask, SkMask::CreateMode mode, |
96 SkPaint::Style style); | 97 SkStrokeRec::InitStyle style); |
97 | 98 |
98 enum RectType { | 99 enum RectType { |
99 kHair_RectType, | 100 kHair_RectType, |
100 kFill_RectType, | 101 kFill_RectType, |
101 kStroke_RectType, | 102 kStroke_RectType, |
102 kPath_RectType | 103 kPath_RectType |
103 }; | 104 }; |
104 | 105 |
105 /** | 106 /** |
106 * Based on the paint's style, strokeWidth, and the matrix, classify how | 107 * Based on the paint's style, strokeWidth, and the matrix, classify how |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 SkBaseDevice* fDevice; // optional, may be null | 152 SkBaseDevice* fDevice; // optional, may be null |
152 | 153 |
153 #ifdef SK_DEBUG | 154 #ifdef SK_DEBUG |
154 void validate() const; | 155 void validate() const; |
155 #else | 156 #else |
156 void validate() const {} | 157 void validate() const {} |
157 #endif | 158 #endif |
158 }; | 159 }; |
159 | 160 |
160 #endif | 161 #endif |
OLD | NEW |