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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_DEFINE_FLATTENABLE_TYPE(SkPathEffect) | 134 SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect) |
135 | 135 |
136 protected: | 136 protected: |
137 SkPathEffect() {} | 137 SkPathEffect() {} |
138 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
139 SkPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} | |
140 #endif | |
141 | 138 |
142 private: | 139 private: |
143 // illegal | 140 // illegal |
144 SkPathEffect(const SkPathEffect&); | 141 SkPathEffect(const SkPathEffect&); |
145 SkPathEffect& operator=(const SkPathEffect&); | 142 SkPathEffect& operator=(const SkPathEffect&); |
146 | 143 |
147 typedef SkFlattenable INHERITED; | 144 typedef SkFlattenable INHERITED; |
148 }; | 145 }; |
149 | 146 |
150 /** \class SkPairPathEffect | 147 /** \class SkPairPathEffect |
151 | 148 |
152 Common baseclass for Compose and Sum. This subclass manages two pathEffects, | 149 Common baseclass for Compose and Sum. This subclass manages two pathEffects, |
153 including flattening them. It does nothing in filterPath, and is only useful | 150 including flattening them. It does nothing in filterPath, and is only useful |
154 for managing the lifetimes of its two arguments. | 151 for managing the lifetimes of its two arguments. |
155 */ | 152 */ |
156 class SkPairPathEffect : public SkPathEffect { | 153 class SkPairPathEffect : public SkPathEffect { |
157 public: | 154 public: |
158 virtual ~SkPairPathEffect(); | 155 virtual ~SkPairPathEffect(); |
159 | 156 |
160 protected: | 157 protected: |
161 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); | 158 SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); |
162 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
163 SkPairPathEffect(SkReadBuffer&); | |
164 #endif | |
165 | 159 |
166 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 160 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
167 | 161 |
168 // these are visible to our subclasses | 162 // these are visible to our subclasses |
169 SkPathEffect* fPE0, *fPE1; | 163 SkPathEffect* fPE0, *fPE1; |
170 | 164 |
171 private: | 165 private: |
172 typedef SkPathEffect INHERITED; | 166 typedef SkPathEffect INHERITED; |
173 }; | 167 }; |
174 | 168 |
(...skipping 15 matching lines...) Expand all Loading... |
190 | 184 |
191 virtual bool filterPath(SkPath* dst, const SkPath& src, | 185 virtual bool filterPath(SkPath* dst, const SkPath& src, |
192 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 186 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
193 | 187 |
194 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) | 188 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) |
195 | 189 |
196 protected: | 190 protected: |
197 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) | 191 SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) |
198 : INHERITED(outer, inner) {} | 192 : INHERITED(outer, inner) {} |
199 | 193 |
200 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
201 explicit SkComposePathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} | |
202 #endif | |
203 | |
204 private: | 194 private: |
205 // illegal | 195 // illegal |
206 SkComposePathEffect(const SkComposePathEffect&); | 196 SkComposePathEffect(const SkComposePathEffect&); |
207 SkComposePathEffect& operator=(const SkComposePathEffect&); | 197 SkComposePathEffect& operator=(const SkComposePathEffect&); |
208 | 198 |
209 typedef SkPairPathEffect INHERITED; | 199 typedef SkPairPathEffect INHERITED; |
210 }; | 200 }; |
211 | 201 |
212 /** \class SkSumPathEffect | 202 /** \class SkSumPathEffect |
213 | 203 |
(...skipping 13 matching lines...) Expand all Loading... |
227 | 217 |
228 virtual bool filterPath(SkPath* dst, const SkPath& src, | 218 virtual bool filterPath(SkPath* dst, const SkPath& src, |
229 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | 219 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
230 | 220 |
231 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) | 221 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) |
232 | 222 |
233 protected: | 223 protected: |
234 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) | 224 SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) |
235 : INHERITED(first, second) {} | 225 : INHERITED(first, second) {} |
236 | 226 |
237 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
238 explicit SkSumPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} | |
239 #endif | |
240 | |
241 private: | 227 private: |
242 // illegal | 228 // illegal |
243 SkSumPathEffect(const SkSumPathEffect&); | 229 SkSumPathEffect(const SkSumPathEffect&); |
244 SkSumPathEffect& operator=(const SkSumPathEffect&); | 230 SkSumPathEffect& operator=(const SkSumPathEffect&); |
245 | 231 |
246 typedef SkPairPathEffect INHERITED; | 232 typedef SkPairPathEffect INHERITED; |
247 }; | 233 }; |
248 | 234 |
249 #endif | 235 #endif |
OLD | NEW |