Module rsvg::filter_func

source ·
Expand description

SVG2 filter function shortcuts - blur(), brightness(), etc.

The <filter> element from SVG1.1 (also present in SVG2) uses some verbose XML to define chains of filter primitives. In SVG2, there is a shortcut form of the filter attribute and property, where one can simply say filter="blur(5)" and get the equivalent of writing a full <filter> with a <feGaussianBlur> element.

This module has a type for each of the filter functions in SVG2 with the function’s parameters, for example Blur stores the blur’s standard deviation parameter.

Those types get aggregated in the FilterFunction enum. A FilterFunction can then convert itself into a FilterSpec, which is ready to be rendered on a surface.

Structs§

  • Parameters for the blur() filter function
  • Parameters for the brightness() filter function
  • Parameters for the contrast() filter function
  • Parameters for the drop-shadow() filter function
  • Parameters for the grayscale() filter function
  • Parameters for the hue-rotate() filter function
  • Parameters for the invert() filter function
  • Parameters for the opacity() filter function
  • Parameters for the saturate() filter function
  • Parameters for the sepia() filter function

Enums§

  • CSS Filter functions from the Filter Effects Module Level 1

Functions§