[librsvg: 6/9] Toplevel docs for the filter_func module




commit f65b83e5a81c346d28f44b34043dca19f19f3dd8
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed May 26 19:26:20 2021 -0500

    Toplevel docs for the filter_func module

 src/filter_func.rs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/src/filter_func.rs b/src/filter_func.rs
index 15ddd24e..593d7c65 100644
--- a/src/filter_func.rs
+++ b/src/filter_func.rs
@@ -1,3 +1,19 @@
+//! 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`](struct.Blur.html) stores the blur's standard
+//! deviation parameter.
+//!
+//! Those types get aggregated in the [`FilterFunction`](enum.FilterFunction.html) enum.
+//! A `FilterFunction` can then convert itself into a
+//! [`FilterSpec`](../filters/struct.FilterSpec.html), which is ready to be rendered on a
+//! surface.
+
 use cssparser::{Color, Parser, RGBA};
 
 use crate::coord_units::CoordUnits;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]