Canvas.SaveLayerRec
- class SaveLayerRec
SaveLayerRec contains the state used to create the layer.
Methods
Overloaded function.
Attributes
If not null, this triggers the same initialization behavior as setting
Canvas.SaveLayerFlags.kInitWithPrevious
onfSaveLayerFlags
: the current layer is copied into the new layer, rather than initializing the new layer with transparent-black.hints at layer size limit
modifies overlay
preserves LCD text, creates with prior layer contents
Methods
- SaveLayerRec.__init__(*args, **kwargs)
Overloaded function.
__init__(self: skia.Canvas.SaveLayerRec) -> None
Sets
fBounds
,fPaint
, andfBackdrop
to nullptr.Clears
fSaveLayerFlags
.__init__(self: skia.Canvas.SaveLayerRec, bounds: skia.Rect, paint: skia.Paint, saveLayerFlags: int = 0) -> None
Sets
fBounds
,fPaint
, andfSaveLayerFlags
; setsfBackdrop
to nullptr.- bounds:
layer dimensions; may be nullptr
- paint:
applied to layer when overlaying prior layer; may be nullptr
- saveLayerFlags:
SaveLayerRec options to modify layer
__init__(self: skia.Canvas.SaveLayerRec, bounds: skia.Rect, paint: skia.Paint, backdrop: skia.ImageFilter, saveLayerFlags: int) -> None
Sets
fBounds
,fPaint
,fBackdrop
, andfSaveLayerFlags
.- bounds:
layer dimensions; may be nullptr
- paint:
applied to layer when overlaying prior layer; may be nullptr
- backdrop:
If not null, this causes the current layer to be filtered by backdrop, and then drawn into the new layer (respecting the current clip). If null, the new layer is initialized with transparent-black.
- saveLayerFlags:
SaveLayerRec options to modify layer
Attributes
- SaveLayerRec.fBackdrop
If not null, this triggers the same initialization behavior as setting
Canvas.SaveLayerFlags.kInitWithPrevious
onfSaveLayerFlags
: the current layer is copied into the new layer, rather than initializing the new layer with transparent-black.This is then filtered by fBackdrop (respecting the current clip).
- SaveLayerRec.fBounds
hints at layer size limit
- SaveLayerRec.fPaint
modifies overlay
- SaveLayerRec.fSaveLayerFlags
preserves LCD text, creates with prior layer contents