| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 class InverseFillPE : public SkPathEffect { | 111 class InverseFillPE : public SkPathEffect { |
| 112 public: | 112 public: |
| 113 InverseFillPE() {} | 113 InverseFillPE() {} |
| 114 virtual bool filterPath(SkPath* dst, const SkPath& src, | 114 virtual bool filterPath(SkPath* dst, const SkPath& src, |
| 115 SkStrokeRec*, const SkRect*) const SK_OVERRIDE { | 115 SkStrokeRec*, const SkRect*) const SK_OVERRIDE { |
| 116 *dst = src; | 116 *dst = src; |
| 117 dst->setFillType(SkPath::kInverseWinding_FillType); | 117 dst->setFillType(SkPath::kInverseWinding_FillType); |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| 120 |
| 121 #ifndef SK_IGNORE_TO_STRING |
| 122 void toString(SkString* str) const SK_OVERRIDE { |
| 123 str->appendf("InverseFillPE: ()"); |
| 124 } |
| 125 #endif |
| 126 |
| 120 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(InverseFillPE) | 127 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(InverseFillPE) |
| 121 | 128 |
| 122 private: | 129 private: |
| 123 typedef SkPathEffect INHERITED; | 130 typedef SkPathEffect INHERITED; |
| 124 }; | 131 }; |
| 125 | 132 |
| 126 SkFlattenable* InverseFillPE::CreateProc(SkReadBuffer& buffer) { | 133 SkFlattenable* InverseFillPE::CreateProc(SkReadBuffer& buffer) { |
| 127 return SkNEW(InverseFillPE); | 134 return SkNEW(InverseFillPE); |
| 128 } | 135 } |
| 129 | 136 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 253 } |
| 247 | 254 |
| 248 private: | 255 private: |
| 249 typedef SkView INHERITED; | 256 typedef SkView INHERITED; |
| 250 }; | 257 }; |
| 251 | 258 |
| 252 ////////////////////////////////////////////////////////////////////////////// | 259 ////////////////////////////////////////////////////////////////////////////// |
| 253 | 260 |
| 254 static SkView* MyFactory() { return new ClockFaceView; } | 261 static SkView* MyFactory() { return new ClockFaceView; } |
| 255 static SkViewRegister reg(MyFactory); | 262 static SkViewRegister reg(MyFactory); |
| OLD | NEW |