BlurFilter Class
A Gaussian blur, of one standard deviation or of one per axis: blur() of CSS, feGaussianBlur of SVG.
public sealed class BlurFilter : FilterRemarks
Below a deviation of 2 pixels, the weights are those of ImageProcessingExtensions.GaussianBlur (three standard deviations on each side); from 2 pixels, the blur is three successive box blurs of d = floor(3 sqrt(2 pi) s / 4 + 1/2) pixels, as "Filter Effects Module Level 1" defines it and browsers draw it, whose cost does not grow with the deviation. The rows are blurred, then the columns. What is read beyond the edges of what is filtered is given by BlurFilter.EdgeMode; a deviation of zero leaves its axis as it is.
- Inheritance
FilterBlurFilter
Constructors
| Name | Description |
|---|---|
| BlurFilter(double) | Initializes a new instance of the BlurFilter class with the same standard deviation along both axes. |
| BlurFilter(double, double) | Initializes a new instance of the BlurFilter class with a standard deviation per axis. |
BlurFilter overloads
BlurFilter(double)
BlurFilter.csInitializes a new instance of the BlurFilter class with the same standard deviation along both axes.
public BlurFilter(double sigma)Parameters
sigmadouble- The standard deviation, in units of the drawing. Must be between 0 and 10000.
Exceptions
ArgumentExceptionsigmais not a finite number.ArgumentOutOfRangeExceptionsigmais negative or exceeds 10000.
BlurFilter(double, double)
BlurFilter.csInitializes a new instance of the BlurFilter class with a standard deviation per axis.
Parameters
sigmaXdouble- The standard deviation along x, in units of the drawing. Must be between 0 and 10000.
sigmaYdouble- The standard deviation along y, in units of the drawing. Must be between 0 and 10000.
Exceptions
ArgumentException- A standard deviation is not a finite number.
ArgumentOutOfRangeException- A standard deviation is negative or exceeds 10000.
Properties
| Name | Description |
|---|---|
| EdgeMode | Gets what the blur reads beyond the edges of what it filters: the edges of the canvas for a drawing, the edges of the rectangle for a backdrop (which is always mirrored). Defaults to FilterEdgeMode.Transparent. |
| SigmaX | Gets the standard deviation along x. |
| SigmaY | Gets the standard deviation along y. |
EdgeMode
BlurFilter.csGets what the blur reads beyond the edges of what it filters: the edges of the canvas for a drawing, the edges of the rectangle for a backdrop (which is always mirrored). Defaults to FilterEdgeMode.Transparent.
public FilterEdgeMode EdgeMode { get; init; }