MorphologyPrimitive Class

A primitive that makes the shapes of its input thinner or thicker: feMorphology of SVG.

public sealed class MorphologyPrimitive : FilterPrimitive

Remarks

Each component of a pixel of the result, the colors multiplied by their alpha, is the smallest (erode) or the largest (dilate) value of that component on the rectangle of 2 rx + 1 by 2 ry + 1 pixels around the pixel, where rx and ry are the radii on the canvas rounded to the nearest pixel. What is beyond the subregion of the input is transparent. A radius that is zero on the canvas along an axis leaves that axis as it is.

Inheritance
FilterPrimitive MorphologyPrimitive

Constructors

NameDescription
MorphologyPrimitive(FilterMorphologyOperator, double, double)Initializes a new instance of the MorphologyPrimitive class.

MorphologyPrimitive(FilterMorphologyOperator, double, double)

MorphologyPrimitive.cs

Initializes a new instance of the MorphologyPrimitive class.

public MorphologyPrimitive(FilterMorphologyOperator @operator, double radiusX, double radiusY)

Parameters

operator FilterMorphologyOperator
Whether the shapes get thinner or thicker.
radiusX double
The radius along x, in units of the drawing: radius.
radiusY double
The radius along y, in units of the drawing.

Exceptions

ArgumentOutOfRangeException
operator is not defined, or a radius is negative or exceeds 16777216.
ArgumentException
A radius is not a finite number.

Properties

NameDescription
InputGets the input: in.
OperatorGets whether the shapes get thinner or thicker.
RadiusXGets the radius along x.
RadiusYGets the radius along y.

Gets the input: in.

public FilterInput Input { get; init; }

Property value

FilterInput

Gets whether the shapes get thinner or thicker.

public FilterMorphologyOperator Operator { get; }

Gets the radius along x.

public double RadiusX { get; }

Property value

double

Gets the radius along y.

public double RadiusY { get; }

Property value

double