move SkStrokePathEffect into hiding for now, as its functionality is rethought.
git-svn-id: http://skia.googlecode.com/svn/trunk@3890 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPathEffect.cpp b/src/core/SkPathEffect.cpp
index bbf6f18..8731aed 100644
--- a/src/core/SkPathEffect.cpp
+++ b/src/core/SkPathEffect.cpp
@@ -71,6 +71,39 @@
#include "SkStroke.h"
+/** \class SkStrokePathEffect
+
+ SkStrokePathEffect simulates stroking inside a patheffect, allowing the
+ caller to have explicit control of when to stroke a path. Typically this is
+ used if the caller wants to stroke before another patheffect is applied
+ (using SkComposePathEffect or SkSumPathEffect).
+ */
+class SkStrokePathEffect : public SkPathEffect {
+public:
+ SkStrokePathEffect(const SkPaint&);
+ SkStrokePathEffect(SkScalar width, SkPaint::Style, SkPaint::Join,
+ SkPaint::Cap, SkScalar miterLimit = -1);
+
+ // overrides
+ virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
+
+ SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStrokePathEffect)
+
+protected:
+ SkStrokePathEffect(SkFlattenableReadBuffer&);
+ virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
+
+private:
+ SkScalar fWidth, fMiter;
+ uint8_t fStyle, fJoin, fCap;
+
+ typedef SkPathEffect INHERITED;
+
+ // illegal
+ SkStrokePathEffect(const SkStrokePathEffect&);
+ SkStrokePathEffect& operator=(const SkStrokePathEffect&);
+};
+
SkStrokePathEffect::SkStrokePathEffect(const SkPaint& paint)
: fWidth(paint.getStrokeWidth()), fMiter(paint.getStrokeMiter()),
fStyle(SkToU8(paint.getStyle())), fJoin(SkToU8(paint.getStrokeJoin())),
@@ -129,6 +162,6 @@
///////////////////////////////////////////////////////////////////////////////
SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposePathEffect)
-SK_DEFINE_FLATTENABLE_REGISTRAR(SkStrokePathEffect)
+//SK_DEFINE_FLATTENABLE_REGISTRAR(SkStrokePathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR(SkSumPathEffect)
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp
index 8899b42..f3de867 100644
--- a/src/effects/SkLayerRasterizer.cpp
+++ b/src/effects/SkLayerRasterizer.cpp
@@ -14,6 +14,7 @@
#include "SkMaskFilter.h"
#include "SkPaint.h"
#include "SkPath.h"
+#include "SkPathEffect.h"
#include "../core/SkRasterClip.h"
#include "SkXfermode.h"
#include <new>
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index b06d40e..08c6f49 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -12,6 +12,7 @@
#include "SkData.h"
#include "SkDevice.h"
#include "SkPaint.h"
+#include "SkPathEffect.h"
#include "SkGPipe.h"
#include "SkGPipePriv.h"
#include "SkImageFilter.h"
diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp
index a949c6e..8995d3b 100644
--- a/src/ports/SkGlobalInitialization_default.cpp
+++ b/src/ports/SkGlobalInitialization_default.cpp
@@ -68,7 +68,7 @@
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPath2DPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkPixelXorXfermode)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRectShape)
- SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStrokePathEffect)
+// SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkStrokePathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSumPathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkShape)