diff options
Diffstat (limited to 'include/effects/SkAvoidXfermode.h')
-rw-r--r-- | include/effects/SkAvoidXfermode.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/effects/SkAvoidXfermode.h b/include/effects/SkAvoidXfermode.h index 9af4a4b..b52e6f5 100644 --- a/include/effects/SkAvoidXfermode.h +++ b/include/effects/SkAvoidXfermode.h @@ -33,14 +33,14 @@ public: /** This xfermode draws, or doesn't draw, based on the destination's distance from an op-color. - + There are two modes, and each mode interprets a tolerance value. - + Avoid: In this mode, drawing is allowed only on destination pixels that are different from the op-color. Tolerance near 0: avoid any colors even remotely similar to the op-color Tolerance near 255: avoid only colors nearly identical to the op-color - + Target: In this mode, drawing only occurs on destination pixels that are similar to the op-color Tolerance near 0: draw only on colors that are nearly identical to the op-color @@ -62,6 +62,10 @@ public: virtual Factory getFactory(); virtual void flatten(SkFlattenableWriteBuffer&); + static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) { + return SkNEW_ARGS(SkAvoidXfermode, (buffer)); + } + protected: SkAvoidXfermode(SkFlattenableReadBuffer&); @@ -69,9 +73,9 @@ private: SkColor fOpColor; uint32_t fDistMul; // x.14 Mode fMode; - + static SkFlattenable* Create(SkFlattenableReadBuffer&); - + typedef SkXfermode INHERITED; }; |