MorphologyPrimitive Class
A primitive that makes the shapes of its input thinner or thicker: feMorphology of SVG.
public sealed class MorphologyPrimitive : FilterPrimitiveRemarks
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
FilterPrimitiveMorphologyPrimitive
Constructors
| Name | Description |
|---|---|
| MorphologyPrimitive(FilterMorphologyOperator, double, double) | Initializes a new instance of the MorphologyPrimitive class. |
MorphologyPrimitive(FilterMorphologyOperator, double, double)
MorphologyPrimitive.csInitializes a new instance of the MorphologyPrimitive class.
public MorphologyPrimitive(FilterMorphologyOperator @operator, double radiusX, double radiusY)Parameters
operatorFilterMorphologyOperator- Whether the shapes get thinner or thicker.
radiusXdouble- The radius along x, in units of the drawing:
radius. radiusYdouble- The radius along y, in units of the drawing.
Exceptions
ArgumentOutOfRangeExceptionoperatoris not defined, or a radius is negative or exceeds 16777216.ArgumentException- A radius is not a finite number.
Properties
| Name | Description |
|---|---|
| Input | Gets the input: in. |
| Operator | Gets whether the shapes get thinner or thicker. |
| RadiusX | Gets the radius along x. |
| RadiusY | Gets the radius along y. |
Operator
MorphologyPrimitive.csGets whether the shapes get thinner or thicker.
public FilterMorphologyOperator Operator { get; }