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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 including flattening them. It does nothing in filterPath, and is only useful | 156 including flattening them. It does nothing in filterPath, and is only useful |
157 for managing the lifetimes of its two arguments. | 157 for managing the lifetimes of its two arguments. |
158 */ | 158 */ |
159 class SkPairPathEffect : public SkPathEffect { | 159 class SkPairPathEffect : public SkPathEffect { |
160 public: | 160 public: |
161 virtual ~SkPairPathEffect(); | 161 virtual ~SkPairPathEffect(); |
162 | 162 |
163 protected: | 163 protected: |
164 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); | 164 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); |
165 | 165 |
166 void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 166 void flatten(SkWriteBuffer&) const override; |
167 | 167 |
168 // these are visible to our subclasses | 168 // these are visible to our subclasses |
169 SkPathEffect* fPE0, *fPE1; | 169 SkPathEffect* fPE0, *fPE1; |
170 | 170 |
171 SK_TO_STRING_OVERRIDE() | 171 SK_TO_STRING_OVERRIDE() |
172 | 172 |
173 private: | 173 private: |
174 typedef SkPathEffect INHERITED; | 174 typedef SkPathEffect INHERITED; |
175 }; | 175 }; |
176 | 176 |
177 /** \class SkComposePathEffect | 177 /** \class SkComposePathEffect |
178 | 178 |
179 This subclass of SkPathEffect composes its two arguments, to create | 179 This subclass of SkPathEffect composes its two arguments, to create |
180 a compound pathEffect. | 180 a compound pathEffect. |
181 */ | 181 */ |
182 class SkComposePathEffect : public SkPairPathEffect { | 182 class SkComposePathEffect : public SkPairPathEffect { |
183 public: | 183 public: |
184 /** Construct a pathEffect whose effect is to apply first the inner pathEffe
ct | 184 /** Construct a pathEffect whose effect is to apply first the inner pathEffe
ct |
185 and the the outer pathEffect (e.g. outer(inner(path))) | 185 and the the outer pathEffect (e.g. outer(inner(path))) |
186 The reference counts for outer and inner are both incremented in the con
structor, | 186 The reference counts for outer and inner are both incremented in the con
structor, |
187 and decremented in the destructor. | 187 and decremented in the destructor. |
188 */ | 188 */ |
189 static SkComposePathEffect* Create(SkPathEffect* outer, SkPathEffect* inner)
{ | 189 static SkComposePathEffect* Create(SkPathEffect* outer, SkPathEffect* inner)
{ |
190 return SkNEW_ARGS(SkComposePathEffect, (outer, inner)); | 190 return SkNEW_ARGS(SkComposePathEffect, (outer, inner)); |
191 } | 191 } |
192 | 192 |
193 virtual bool filterPath(SkPath* dst, const SkPath& src, | 193 virtual bool filterPath(SkPath* dst, const SkPath& src, |
194 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 194 SkStrokeRec*, const SkRect*) const override; |
195 | 195 |
196 SK_TO_STRING_OVERRIDE() | 196 SK_TO_STRING_OVERRIDE() |
197 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) | 197 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) |
198 | 198 |
199 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 199 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
200 bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } | 200 bool exposedInAndroidJavaAPI() const override { return true; } |
201 #endif | 201 #endif |
202 | 202 |
203 protected: | 203 protected: |
204 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) : INHERITED(ou
ter, inner) {} | 204 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) : INHERITED(ou
ter, inner) {} |
205 | 205 |
206 private: | 206 private: |
207 // illegal | 207 // illegal |
208 SkComposePathEffect(const SkComposePathEffect&); | 208 SkComposePathEffect(const SkComposePathEffect&); |
209 SkComposePathEffect& operator=(const SkComposePathEffect&); | 209 SkComposePathEffect& operator=(const SkComposePathEffect&); |
210 | 210 |
(...skipping 10 matching lines...) Expand all Loading... |
221 /** Construct a pathEffect whose effect is to apply two effects, in sequence
. | 221 /** Construct a pathEffect whose effect is to apply two effects, in sequence
. |
222 (e.g. first(path) + second(path)) | 222 (e.g. first(path) + second(path)) |
223 The reference counts for first and second are both incremented in the co
nstructor, | 223 The reference counts for first and second are both incremented in the co
nstructor, |
224 and decremented in the destructor. | 224 and decremented in the destructor. |
225 */ | 225 */ |
226 static SkSumPathEffect* Create(SkPathEffect* first, SkPathEffect* second) { | 226 static SkSumPathEffect* Create(SkPathEffect* first, SkPathEffect* second) { |
227 return SkNEW_ARGS(SkSumPathEffect, (first, second)); | 227 return SkNEW_ARGS(SkSumPathEffect, (first, second)); |
228 } | 228 } |
229 | 229 |
230 virtual bool filterPath(SkPath* dst, const SkPath& src, | 230 virtual bool filterPath(SkPath* dst, const SkPath& src, |
231 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 231 SkStrokeRec*, const SkRect*) const override; |
232 | 232 |
233 SK_TO_STRING_OVERRIDE() | 233 SK_TO_STRING_OVERRIDE() |
234 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) | 234 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) |
235 | 235 |
236 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 236 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
237 bool exposedInAndroidJavaAPI() const SK_OVERRIDE { return true; } | 237 bool exposedInAndroidJavaAPI() const override { return true; } |
238 #endif | 238 #endif |
239 | 239 |
240 protected: | 240 protected: |
241 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) : INHERITED(first
, second) {} | 241 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) : INHERITED(first
, second) {} |
242 | 242 |
243 private: | 243 private: |
244 // illegal | 244 // illegal |
245 SkSumPathEffect(const SkSumPathEffect&); | 245 SkSumPathEffect(const SkSumPathEffect&); |
246 SkSumPathEffect& operator=(const SkSumPathEffect&); | 246 SkSumPathEffect& operator=(const SkSumPathEffect&); |
247 | 247 |
248 typedef SkPairPathEffect INHERITED; | 248 typedef SkPairPathEffect INHERITED; |
249 }; | 249 }; |
250 | 250 |
251 #endif | 251 #endif |
OLD | NEW |