XML technologies / SVG / Filters, transformations and gradients / Using and combining filters and lighting effectively / Filters and masks / The feMorphology filter element

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

The element <feMorphology> makes a graphic thicker or thinner. Internally, a rectangular area is rendered, with its size calculated as follows:

Breite = 2*x-radius

Höhe = 2*y-radius

In addition to the universal attributes, the element has these properties:

<filter id="Morph1">
  <feMorphology in="SourceGraphic" operator="erode" radius="5 0"/>
</filter>
<filter id="Morph2">
  <feMorphology in="SourceGraphic" operator="dilate" radius="5 0"/>
</filter>

Applied only to the example graphic’s text element, the defined filters produce the following result:

Results of erode and dilate

Figure: Results of operator="erode" and operator="dilate".

   

 

 

 

back to top