Class LayerEffect
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Describes an image effect applied to the contents of a compositing layer when it is restored. The layer isolates the content the effect operates on, so the effect sees only what was drawn into the layer, against transparency, before the result is composited onto the canvas.
public abstract class LayerEffect
- Inheritance
-
LayerEffect
- Derived
- Inherited Members
Constructors
LayerEffect(LayerEffect)
Initializes a new instance of the LayerEffect class with the observable behavior of another effect when this effect is not executed natively.
protected LayerEffect(LayerEffect fallbackEffect)
Parameters
fallbackEffectLayerEffectThe effect whose behavior is used as the fallback.
LayerEffect(Action<IImageProcessingContext>)
Initializes a new instance of the LayerEffect class.
protected LayerEffect(Action<IImageProcessingContext> operation)
Parameters
operationAction<IImageProcessingContext>The operation that implements the effect.
Properties
IsPassThrough
Gets a value indicating whether the effect leaves the layer content unchanged, in which case its application is skipped entirely.
public virtual bool IsPassThrough { get; }
Property Value
Reach
Gets the distance, in pixels, the effect can push content beyond its source region. Layer and processing bounds are expanded by this reach so the effect output is not cut off. Effects constructed over a fallback inherit the fallback's reach.
public virtual int Reach { get; }
Property Value
WriteBackOffset
Gets the offset, in pixels, at which the processed pixels are written back relative to the region they were read from.
public virtual Point WriteBackOffset { get; }
Property Value
WriteBackOptions
Gets the graphics options used to composite the processed pixels back onto the layer, or null to replace the processed region outright.
public virtual GraphicsOptions? WriteBackOptions { get; }