Applies the morphology filter effect.
The MorphologyFX class performs "fattening" or "thinning" of artwork. It is particularly useful for fattening or thinning an alpha channel.
The dilation (or erosion) kernel is a rectangle with a width of 2 * RadiusX
and a height of 2 * RadiusY
. In dilation, the output pixel is the individual component-wise maximum of the corresponding R,G,B,A values in the input image's kernel rectangle. In erosion, the output pixel is the individual component-wise minimum of the corresponding R,G,B,A values in the input image's kernel rectangle.
Frequently this operation will take place on alpha-only images, such as that produced by the built-in input, SourceAlpha. In that case, the implementation might want to optimize the single channel case.
Because the algorithm operates on premultipied color values, it will always result in color values less than or equal to the alpha channel.
The MorphologyFX class consists of the following fields:
The following actions are currently supported:
Name | Comment | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Draw | Render the effect to the target bitmap. | |||||||||||
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
|
MorphologyFX options.
Name | Description |
---|---|
MOP::DILATE | Dilate (fatten) the input source. |
MOP::ERODE | Erode (thin) the input source. |
Class Info | |
---|---|
ID | ID_MORPHOLOGYFX |
Category | Graphics |
Include | modules/morphologyfx.h |
Version | 1 |