| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef Sk2DPathEffect_DEFINED | 8 #ifndef Sk2DPathEffect_DEFINED |
| 9 #define Sk2DPathEffect_DEFINED | 9 #define Sk2DPathEffect_DEFINED |
| 10 | 10 |
| 11 #include "SkPath.h" | 11 #include "SkPath.h" |
| 12 #include "SkPathEffect.h" | 12 #include "SkPathEffect.h" |
| 13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
| 14 | 14 |
| 15 class SK_API Sk2DPathEffect : public SkPathEffect { | 15 class SK_API Sk2DPathEffect : public SkPathEffect { |
| 16 public: | 16 public: |
| 17 static Sk2DPathEffect* Create(const SkMatrix& mat) { | 17 virtual bool filterPath(SkPath*, const SkPath&, SkStrokeRec*, const SkRect*)
const SK_OVERRIDE; |
| 18 return SkNEW_ARGS(Sk2DPathEffect, (mat)); | |
| 19 } | |
| 20 | 18 |
| 21 virtual bool filterPath(SkPath*, const SkPath&, | 19 SK_DECLARE_UNFLATTENABLE_OBJECT() |
| 22 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; | |
| 23 | |
| 24 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk2DPathEffect) | |
| 25 | 20 |
| 26 protected: | 21 protected: |
| 27 /** New virtual, to be overridden by subclasses. | 22 /** New virtual, to be overridden by subclasses. |
| 28 This is called once from filterPath, and provides the | 23 This is called once from filterPath, and provides the |
| 29 uv parameter bounds for the path. Subsequent calls to | 24 uv parameter bounds for the path. Subsequent calls to |
| 30 next() will receive u and v values within these bounds, | 25 next() will receive u and v values within these bounds, |
| 31 and then a call to end() will signal the end of processing. | 26 and then a call to end() will signal the end of processing. |
| 32 */ | 27 */ |
| 33 virtual void begin(const SkIRect& uvBounds, SkPath* dst) const; | 28 virtual void begin(const SkIRect& uvBounds, SkPath* dst) const; |
| 34 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const; | 29 virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 99 |
| 105 virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; | 100 virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; |
| 106 | 101 |
| 107 private: | 102 private: |
| 108 SkPath fPath; | 103 SkPath fPath; |
| 109 | 104 |
| 110 typedef Sk2DPathEffect INHERITED; | 105 typedef Sk2DPathEffect INHERITED; |
| 111 }; | 106 }; |
| 112 | 107 |
| 113 #endif | 108 #endif |
| OLD | NEW |