DropShadowFilter Class
A drop shadow: drop-shadow() of CSS, feDropShadow of SVG, the shadow of the HTML canvas.
public sealed class DropShadowFilter : FilterRemarks
The shadow is the alpha of what is filtered, moved by DropShadowFilter.Offset (between pixels, the four around are interpolated), blurred by a Gaussian blur of standard deviation DropShadowFilter.Sigma (transparent beyond the edges), and painted with DropShadowFilter.Color; what is filtered is then drawn over it, unless DropShadowFilter.ShadowOnly is set.
- Inheritance
FilterDropShadowFilter
Constructors
| Name | Description |
|---|---|
| DropShadowFilter(Rgba64, PointD, double) | Initializes a new instance of the DropShadowFilter class. |
DropShadowFilter(Rgba64, PointD, double)
DropShadowFilter.csInitializes a new instance of the DropShadowFilter class.
Parameters
colorRgba64- The color of the shadow, with straight alpha. An
Rgba32converts implicitly. offsetPointD- The distance from what is filtered to its shadow, in units of the drawing.
sigmadouble- The standard deviation of the blur of the shadow, in units of the drawing: what CSS calls a blur radius is twice that. Must be between 0 and 10000.
Exceptions
ArgumentException- A coordinate of
offset, orsigma, is not a finite number. ArgumentOutOfRangeException- The magnitude of a coordinate of
offsetexceeds 16777216, orsigmais negative or exceeds 10000.
Properties
| Name | Description |
|---|---|
| Color | Gets the color of the shadow. |
| Offset | Gets the distance from what is filtered to its shadow. |
| ShadowOnly | Gets a value indicating whether the result is the shadow alone, without what casts it: the shadow of a drawing of the HTML canvas, drawn before the drawing. |
| Sigma | Gets the standard deviation of the blur of the shadow. |