DropShadowPrimitive Class

A primitive that draws its input over its shadow: feDropShadow of SVG.

public sealed class DropShadowPrimitive : FilterPrimitive

Remarks

The shadow is the one of DropShadowFilter, with a standard deviation per axis: the alpha of the input, moved by DropShadowPrimitive.Offset, blurred (transparent beyond the subregion of the input), painted with DropShadowPrimitive.Color in the colors of the primitive; the input is drawn over it.

Inheritance
FilterPrimitive DropShadowPrimitive

Constructors

NameDescription
DropShadowPrimitive(Rgba64, PointD, double, double)Initializes a new instance of the DropShadowPrimitive class.

DropShadowPrimitive(Rgba64, PointD, double, double)

DropShadowPrimitive.cs

Initializes a new instance of the DropShadowPrimitive class.

public DropShadowPrimitive(Rgba64 color, PointD offset, double sigmaX, double sigmaY)

Parameters

color Rgba64
The color of the shadow, with straight alpha: flood-color and flood-opacity. An Rgba32 converts implicitly.
offset PointD
The distance from the input to its shadow, in units of the drawing: dx and dy.
sigmaX double
The standard deviation of the blur along x, in units of the drawing. Must be between 0 and 10000.
sigmaY double
The standard deviation of the blur along y, in units of the drawing. Must be between 0 and 10000.

Exceptions

ArgumentException
A coordinate of offset, or a standard deviation, is not a finite number.
ArgumentOutOfRangeException
The magnitude of a coordinate of offset exceeds 16777216, or a standard deviation is negative or exceeds 10000.

Properties

NameDescription
ColorGets the color of the shadow.
InputGets the input: in.
OffsetGets the distance from the input to its shadow.
SigmaXGets the standard deviation of the blur along x.
SigmaYGets the standard deviation of the blur along y.

Gets the color of the shadow.

public Rgba64 Color { get; }

Property value

Rgba64

Gets the input: in.

public FilterInput Input { get; init; }

Property value

FilterInput

Gets the distance from the input to its shadow.

public PointD Offset { get; }

Property value

PointD

Gets the standard deviation of the blur along x.

public double SigmaX { get; }

Property value

double

Gets the standard deviation of the blur along y.

public double SigmaY { get; }

Property value

double