OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #include "SampleCode.h" | 8 #include "SampleCode.h" |
9 #include "SkView.h" | 9 #include "SkView.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 #include "SkBlurMaskFilter.h" | 64 #include "SkBlurMaskFilter.h" |
65 | 65 |
66 #include "Sk2DPathEffect.h" | 66 #include "Sk2DPathEffect.h" |
67 | 67 |
68 class Dot2DPathEffect : public Sk2DPathEffect { | 68 class Dot2DPathEffect : public Sk2DPathEffect { |
69 public: | 69 public: |
70 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix, | 70 Dot2DPathEffect(SkScalar radius, const SkMatrix& matrix, |
71 SkTDArray<SkPoint>* pts) | 71 SkTDArray<SkPoint>* pts) |
72 : Sk2DPathEffect(matrix), fRadius(radius), fPts(pts) {} | 72 : Sk2DPathEffect(matrix), fRadius(radius), fPts(pts) {} |
73 | 73 |
74 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Dot2DPathEffect) | 74 SK_DEFINE_FLATTENABLE_TYPE_CHECKING_PROCS(Dot2DPathEffect) |
sugoi1
2013/10/09 14:29:58
Both should be SK_DEFINE_FLATTENABLE_DESERIALIZATI
| |
75 | 75 |
76 protected: | 76 protected: |
77 virtual void begin(const SkIRect& uvBounds, SkPath* dst) const SK_OVERRIDE { | 77 virtual void begin(const SkIRect& uvBounds, SkPath* dst) const SK_OVERRIDE { |
78 if (fPts) { | 78 if (fPts) { |
79 fPts->reset(); | 79 fPts->reset(); |
80 } | 80 } |
81 this->INHERITED::begin(uvBounds, dst); | 81 this->INHERITED::begin(uvBounds, dst); |
82 } | 82 } |
83 | 83 |
84 virtual void next(const SkPoint& loc, int u, int v, | 84 virtual void next(const SkPoint& loc, int u, int v, |
(...skipping 23 matching lines...) Expand all Loading... | |
108 | 108 |
109 class InverseFillPE : public SkPathEffect { | 109 class InverseFillPE : public SkPathEffect { |
110 public: | 110 public: |
111 InverseFillPE() {} | 111 InverseFillPE() {} |
112 virtual bool filterPath(SkPath* dst, const SkPath& src, | 112 virtual bool filterPath(SkPath* dst, const SkPath& src, |
113 SkStrokeRec*, const SkRect*) const SK_OVERRIDE { | 113 SkStrokeRec*, const SkRect*) const SK_OVERRIDE { |
114 *dst = src; | 114 *dst = src; |
115 dst->setFillType(SkPath::kInverseWinding_FillType); | 115 dst->setFillType(SkPath::kInverseWinding_FillType); |
116 return true; | 116 return true; |
117 } | 117 } |
118 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(InverseFillPE) | 118 SK_DEFINE_FLATTENABLE_TYPE_CHECKING_PROCS(InverseFillPE) |
119 | 119 |
120 protected: | 120 protected: |
121 InverseFillPE(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} | 121 InverseFillPE(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} |
122 private: | 122 private: |
123 | 123 |
124 typedef SkPathEffect INHERITED; | 124 typedef SkPathEffect INHERITED; |
125 }; | 125 }; |
126 | 126 |
127 static SkPathEffect* makepe(float interp, SkTDArray<SkPoint>* pts) { | 127 static SkPathEffect* makepe(float interp, SkTDArray<SkPoint>* pts) { |
128 SkMatrix lattice; | 128 SkMatrix lattice; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 } | 243 } |
244 | 244 |
245 private: | 245 private: |
246 typedef SkView INHERITED; | 246 typedef SkView INHERITED; |
247 }; | 247 }; |
248 | 248 |
249 ////////////////////////////////////////////////////////////////////////////// | 249 ////////////////////////////////////////////////////////////////////////////// |
250 | 250 |
251 static SkView* MyFactory() { return new ClockFaceView; } | 251 static SkView* MyFactory() { return new ClockFaceView; } |
252 static SkViewRegister reg(MyFactory); | 252 static SkViewRegister reg(MyFactory); |
OLD | NEW |