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
This commit is contained in:
reed@google.com 2012-05-10 12:56:16 +00:00
parent f1d88064bc
commit 75a0972dd7
5 changed files with 37 additions and 39 deletions

View File

@ -921,42 +921,5 @@ private:
#endif
};
///////////////////////////////////////////////////////////////////////////////
#include "SkPathEffect.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&);
};
#endif

View File

@ -71,6 +71,39 @@ bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src,
#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 @@ SkStrokePathEffect::SkStrokePathEffect(SkFlattenableReadBuffer& buffer) {
///////////////////////////////////////////////////////////////////////////////
SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposePathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR(SkStrokePathEffect)
//SK_DEFINE_FLATTENABLE_REGISTRAR(SkStrokePathEffect)
SK_DEFINE_FLATTENABLE_REGISTRAR(SkSumPathEffect)

View File

@ -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>

View File

@ -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"

View File

@ -68,7 +68,7 @@ void SkFlattenable::InitializeFlattenables() {
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)