Class InnerShadowLayerEffect
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Composites a shadow inside the contents of a compositing layer when it is restored: the darkness outside the content's silhouette is tinted with the shadow colour, blurred, offset, and clipped onto the content itself, so the shadow hugs the content's inside edges.
public sealed class InnerShadowLayerEffect : LayerEffect
- Inheritance
-
InnerShadowLayerEffect
- Inherited Members
Constructors
InnerShadowLayerEffect(Point, float, Color)
Initializes a new instance of the InnerShadowLayerEffect class.
public InnerShadowLayerEffect(Point offset, float sigma, Color color)
Parameters
offsetPointThe shadow offset, in pixels. Positive values shade the content's top and left inside edges, matching a CSS inset shadow.
sigmafloatThe Gaussian blur sigma, in pixels; zero draws a hard shadow.
colorColorThe shadow colour. Its alpha scales the shadow's alpha, so a semi-transparent colour draws a semi-transparent shadow.
Properties
Color
Gets the shadow colour.
public Color Color { get; }
Property Value
Offset
Gets the shadow offset, in pixels.
public Point Offset { 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 override int Reach { get; }
Property Value
Sigma
Gets the Gaussian blur sigma, in pixels.
public float Sigma { 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 override 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 override GraphicsOptions? WriteBackOptions { get; }