PeachDrawing.Core

PeachDrawing.Core

LayerOptions Struct

How a layer is composited onto the canvas that began it.

public readonly record struct LayerOptions : System.IEquatable<PeachDrawing.Core.LayerOptions>

Implements System.IEquatable<LayerOptions>

Constructors  
LayerOptions(double, PaintBlendMode, Nullable<ColorMatrix>, Nullable<Rect>, IReadOnlyList<LayerEffect>) How a layer is composited onto the canvas that began it.
Properties  
BlendMode how the finished layer is blended with what is already on the canvas
Bounds the region the layer covers, in the coordinates of the canvas that began it, or null for everything from the canvas’s origin to the bottom-right of its current clip. Content outside the region is not part of the layer.
ColorMatrix a colour transform applied to the finished layer before it is composited, or null for none
Effects effects applied to the finished layer, in order, before it is composited, or null for none. Effects work on pixels, so the layer is drawn into a bitmap covering exactly Bounds and nothing outside it is kept: make the region large enough for the effects to spread into (see PeachDrawing.RasterLayerEffects.GetInkMargin). A canvas that cannot apply effects returns no layer at all (see BeginLayer(LayerOptions)).
Opacity how opaque the finished layer is, from 0 (invisible) to 1; the layer’s content is composited once, as a whole, so overlapping content inside it does not show through itself