8 #ifndef SkLayerDrawLooper_DEFINED
9 #define SkLayerDrawLooper_DEFINED
16 #ifndef SK_SUPPORT_LEGACY_DRAWLOOPER
17 #error "SkDrawLooper is unsupported"
36 kPathEffect_Bit = 1 << 2,
37 kMaskFilter_Bit = 1 << 3,
39 kColorFilter_Bit = 1 << 5,
40 kXfermode_Bit = 1 << 6,
50 kEntirePaint_Bits = -1
89 void flatten(SkWriteBuffer&)
const override;
108 bool next(Info*,
SkPaint* paint)
override;
113 static void ApplyInfo(
SkPaint* dst,
const SkPaint& src,
const LayerInfo&);
SkBlendMode
Blends are operators that take in two colors (source, destination) and return a new color.
Definition: SkBlendMode.h:38
#define SK_FLATTENABLE_HOOKS(type)
Definition: SkFlattenable.h:108
float SkScalar
Definition: SkScalar.h:14
Holds state during a draw.
Definition: SkDrawLooper.h:40
DEPRECATED: No longer supported in Skia.
Definition: SkDrawLooper.h:32
SkDrawLooper()
Definition: SkDrawLooper.h:129
Definition: SkLayerDrawLooper.h:119
void addLayer(SkScalar dx, SkScalar dy)
This layer will draw with the original paint, at the specified offset.
SkPaint * addLayerOnTop(const LayerInfo &)
Similar to addLayer, but adds a layer to the top.
sk_sp< SkDrawLooper > detach()
Pass list of layers on to newly built looper and return it.
SkPaint * addLayer(const LayerInfo &)
Call for each layer you want to add (from top to bottom).
void addLayer()
This layer will with the original paint and no offset.
Definition: SkLayerDrawLooper.h:140
DEPRECATED: No longer supported by Skia.
Definition: SkLayerDrawLooper.h:23
void flatten(SkWriteBuffer &) const override
Override this if your subclass needs to record data that it will need to recreate itself from its Cre...
~SkLayerDrawLooper() override
Bits
Bits specifies which aspects of the layer's paint should replace the corresponding aspects on the dra...
Definition: SkLayerDrawLooper.h:34
int32_t BitFlags
Definition: SkLayerDrawLooper.h:53
SkDrawLooper::Context * makeContext(SkArenaAlloc *) const override
Called right before something is being drawn.
bool asABlurShadow(BlurShadowRec *rec) const override
If this looper can be interpreted as having two layers, such that.
SkPaint controls options applied when drawing.
Definition: SkPaint.h:44
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition: SkRefCnt.h:220
Definition: SkDrawLooper.h:93
Info for how to apply the layer's paint and offset.
Definition: SkLayerDrawLooper.h:66
SkBlendMode fColorMode
Definition: SkLayerDrawLooper.h:68
bool fPostTranslate
applies to fOffset
Definition: SkLayerDrawLooper.h:70
SkVector fOffset
Definition: SkLayerDrawLooper.h:69
BitFlags fPaintBits
Definition: SkLayerDrawLooper.h:67
LayerInfo()
Initial the LayerInfo.