Index: include/effects/Sk2DPathEffect.h |
diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h |
index 859b5cd95292f96f6ec5021e344b22b8071553a9..f037e335085674ae3108d8626e563b1e30056ccb 100644 |
--- a/include/effects/Sk2DPathEffect.h |
+++ b/include/effects/Sk2DPathEffect.h |
@@ -14,7 +14,9 @@ |
class SK_API Sk2DPathEffect : public SkPathEffect { |
public: |
- Sk2DPathEffect(const SkMatrix& mat); |
+ static Sk2DPathEffect* Create(const SkMatrix& mat) { |
+ return SkNEW_ARGS(Sk2DPathEffect, (mat)); |
+ } |
virtual bool filterPath(SkPath*, const SkPath&, |
SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
@@ -44,6 +46,11 @@ protected: |
Sk2DPathEffect(SkReadBuffer&); |
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ Sk2DPathEffect(const SkMatrix& mat); |
+ |
private: |
SkMatrix fMatrix, fInverse; |
bool fMatrixIsInvertible; |
@@ -58,8 +65,9 @@ private: |
class SK_API SkLine2DPathEffect : public Sk2DPathEffect { |
public: |
- SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) |
- : Sk2DPathEffect(matrix), fWidth(width) {} |
+ static SkLine2DPathEffect* Create(SkScalar width, const SkMatrix& matrix) { |
+ return SkNEW_ARGS(SkLine2DPathEffect, (width, matrix)); |
+ } |
virtual bool filterPath(SkPath* dst, const SkPath& src, |
SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
@@ -73,6 +81,12 @@ protected: |
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) |
+ : Sk2DPathEffect(matrix), fWidth(width) {} |
+ |
private: |
SkScalar fWidth; |
@@ -85,7 +99,9 @@ public: |
* Stamp the specified path to fill the shape, using the matrix to define |
* the latice. |
*/ |
- SkPath2DPathEffect(const SkMatrix&, const SkPath&); |
+ static SkPath2DPathEffect* Create(const SkMatrix& matrix, const SkPath& path) { |
+ return SkNEW_ARGS(SkPath2DPathEffect, (matrix, path)); |
+ } |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect) |
@@ -95,6 +111,11 @@ protected: |
virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ SkPath2DPathEffect(const SkMatrix&, const SkPath&); |
+ |
private: |
SkPath fPath; |