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 SkPathEffect_DEFINED | 10 #ifndef SkPathEffect_DEFINED |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 int32_t fCount; //!< Number of intervals in the dash. Sh
ould be even number | 127 int32_t fCount; //!< Number of intervals in the dash. Sh
ould be even number |
128 SkScalar fPhase; //!< Offset into the dashed interval pat
tern | 128 SkScalar fPhase; //!< Offset into the dashed interval pat
tern |
129 // mod the sum of all intervals | 129 // mod the sum of all intervals |
130 }; | 130 }; |
131 | 131 |
132 virtual DashType asADash(DashInfo* info) const; | 132 virtual DashType asADash(DashInfo* info) const; |
133 | 133 |
134 SK_TO_STRING_PUREVIRT() | 134 SK_TO_STRING_PUREVIRT() |
135 SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect) | 135 SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect) |
136 | 136 |
| 137 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 138 /// Override for subclasses as appropriate. |
| 139 virtual bool exposedInAndroidJavaAPI() const { return false; } |
| 140 #endif |
| 141 |
137 protected: | 142 protected: |
138 SkPathEffect() {} | 143 SkPathEffect() {} |
139 | 144 |
140 private: | 145 private: |
141 // illegal | 146 // illegal |
142 SkPathEffect(const SkPathEffect&); | 147 SkPathEffect(const SkPathEffect&); |
143 SkPathEffect& operator=(const SkPathEffect&); | 148 SkPathEffect& operator=(const SkPathEffect&); |
144 | 149 |
145 typedef SkFlattenable INHERITED; | 150 typedef SkFlattenable INHERITED; |
146 }; | 151 }; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 static SkComposePathEffect* Create(SkPathEffect* outer, SkPathEffect* inner)
{ | 189 static SkComposePathEffect* Create(SkPathEffect* outer, SkPathEffect* inner)
{ |
185 return SkNEW_ARGS(SkComposePathEffect, (outer, inner)); | 190 return SkNEW_ARGS(SkComposePathEffect, (outer, inner)); |
186 } | 191 } |
187 | 192 |
188 virtual bool filterPath(SkPath* dst, const SkPath& src, | 193 virtual bool filterPath(SkPath* dst, const SkPath& src, |
189 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 194 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
190 | 195 |
191 SK_TO_STRING_OVERRIDE() | 196 SK_TO_STRING_OVERRIDE() |
192 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) | 197 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) |
193 | 198 |
| 199 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 200 bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } |
| 201 #endif |
| 202 |
194 protected: | 203 protected: |
195 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) : INHERITED(ou
ter, inner) {} | 204 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) : INHERITED(ou
ter, inner) {} |
196 | 205 |
197 private: | 206 private: |
198 // illegal | 207 // illegal |
199 SkComposePathEffect(const SkComposePathEffect&); | 208 SkComposePathEffect(const SkComposePathEffect&); |
200 SkComposePathEffect& operator=(const SkComposePathEffect&); | 209 SkComposePathEffect& operator=(const SkComposePathEffect&); |
201 | 210 |
202 typedef SkPairPathEffect INHERITED; | 211 typedef SkPairPathEffect INHERITED; |
203 }; | 212 }; |
(...skipping 13 matching lines...) Expand all Loading... |
217 static SkSumPathEffect* Create(SkPathEffect* first, SkPathEffect* second) { | 226 static SkSumPathEffect* Create(SkPathEffect* first, SkPathEffect* second) { |
218 return SkNEW_ARGS(SkSumPathEffect, (first, second)); | 227 return SkNEW_ARGS(SkSumPathEffect, (first, second)); |
219 } | 228 } |
220 | 229 |
221 virtual bool filterPath(SkPath* dst, const SkPath& src, | 230 virtual bool filterPath(SkPath* dst, const SkPath& src, |
222 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 231 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
223 | 232 |
224 SK_TO_STRING_OVERRIDE() | 233 SK_TO_STRING_OVERRIDE() |
225 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) | 234 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) |
226 | 235 |
| 236 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 237 bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } |
| 238 #endif |
| 239 |
227 protected: | 240 protected: |
228 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) : INHERITED(first
, second) {} | 241 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) : INHERITED(first
, second) {} |
229 | 242 |
230 private: | 243 private: |
231 // illegal | 244 // illegal |
232 SkSumPathEffect(const SkSumPathEffect&); | 245 SkSumPathEffect(const SkSumPathEffect&); |
233 SkSumPathEffect& operator=(const SkSumPathEffect&); | 246 SkSumPathEffect& operator=(const SkSumPathEffect&); |
234 | 247 |
235 typedef SkPairPathEffect INHERITED; | 248 typedef SkPairPathEffect INHERITED; |
236 }; | 249 }; |
237 | 250 |
238 #endif | 251 #endif |
OLD | NEW |