From 69f0baf425bbdb744d85b6a8449910b0d6edb2ea Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 15 Mar 2024 16:44:47 +0100 Subject: [PATCH] svg-filters: init --- Cargo.lock | 136 ++++++++++++++++++ Cargo.toml | 2 +- crates/svg-filters/Cargo.toml | 15 ++ crates/svg-filters/src/lib.rs | 16 +++ crates/svg-filters/src/types.rs | 20 +++ crates/svg-filters/src/types/length.rs | 14 ++ crates/svg-filters/src/types/nodes.rs | 13 ++ .../svg-filters/src/types/nodes/primitives.rs | 51 +++++++ .../src/types/nodes/primitives/blend.rs | 25 ++++ .../types/nodes/primitives/color_matrix.rs | 19 +++ .../nodes/primitives/component_transfer.rs | 27 ++++ .../src/types/nodes/primitives/composite.rs | 13 ++ .../types/nodes/primitives/convolve_matrix.rs | 18 +++ .../nodes/primitives/diffuse_lighting.rs | 2 + .../nodes/primitives/displacement_map.rs | 13 ++ .../src/types/nodes/primitives/flood.rs | 7 + .../types/nodes/primitives/gaussian_blur.rs | 4 + .../src/types/nodes/primitives/image.rs | 2 + .../src/types/nodes/primitives/merge.rs | 2 + .../src/types/nodes/primitives/morphology.rs | 10 ++ .../src/types/nodes/primitives/offset.rs | 5 + .../nodes/primitives/specular_lighting.rs | 2 + .../src/types/nodes/primitives/tile.rs | 2 + .../src/types/nodes/primitives/turbulence.rs | 18 +++ .../src/types/nodes/standard_input.rs | 10 ++ 25 files changed, 445 insertions(+), 1 deletion(-) create mode 100644 crates/svg-filters/Cargo.toml create mode 100644 crates/svg-filters/src/lib.rs create mode 100644 crates/svg-filters/src/types.rs create mode 100644 crates/svg-filters/src/types/length.rs create mode 100644 crates/svg-filters/src/types/nodes.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/blend.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/color_matrix.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/component_transfer.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/composite.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/convolve_matrix.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/diffuse_lighting.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/displacement_map.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/flood.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/gaussian_blur.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/image.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/merge.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/morphology.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/offset.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/specular_lighting.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/tile.rs create mode 100644 crates/svg-filters/src/types/nodes/primitives/turbulence.rs create mode 100644 crates/svg-filters/src/types/nodes/standard_input.rs diff --git a/Cargo.lock b/Cargo.lock index 5cd0ff9..a8b1f50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -237,6 +237,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "csscolorparser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf" +dependencies = [ + "phf", +] + [[package]] name = "deranged" version = "0.3.11" @@ -273,6 +282,12 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "eval" version = "0.1.0" @@ -308,6 +323,12 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.28" @@ -363,6 +384,12 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.4.1" @@ -388,6 +415,16 @@ dependencies = [ "tiff", ] +[[package]] +name = "indexmap" +version = "2.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +dependencies = [ + "equivalent", + "hashbrown", +] + [[package]] name = "ir" version = "0.1.0" @@ -491,6 +528,12 @@ dependencies = [ "logos-codegen", ] +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -552,6 +595,58 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "png" version = "0.17.10" @@ -589,6 +684,16 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quote" version = "1.0.33" @@ -598,6 +703,21 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + [[package]] name = "rayon" version = "1.8.0" @@ -705,6 +825,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "smallvec" version = "1.11.2" @@ -726,6 +852,16 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "svg-filters" +version = "0.1.0" +dependencies = [ + "csscolorparser", + "indexmap", + "petgraph", + "quick-xml", +] + [[package]] name = "syn" version = "2.0.41" diff --git a/Cargo.toml b/Cargo.toml index 82e4afd..2ca8bdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [ "crates/app", "crates/eval", "crates/ir", - "crates/lang", + "crates/lang", "crates/svg-filters", ] resolver = "2" diff --git a/crates/svg-filters/Cargo.toml b/crates/svg-filters/Cargo.toml new file mode 100644 index 0000000..fbe3aaf --- /dev/null +++ b/crates/svg-filters/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "svg-filters" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +csscolorparser = "0.6.2" +indexmap = "2.2.5" +petgraph = "0.6.4" +quick-xml = { version = "0.31.0", features = ["serialize"] } + +[lints] +workspace = true diff --git a/crates/svg-filters/src/lib.rs b/crates/svg-filters/src/lib.rs new file mode 100644 index 0000000..11b6708 --- /dev/null +++ b/crates/svg-filters/src/lib.rs @@ -0,0 +1,16 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +pub mod types; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/svg-filters/src/types.rs b/crates/svg-filters/src/types.rs new file mode 100644 index 0000000..94ecb4b --- /dev/null +++ b/crates/svg-filters/src/types.rs @@ -0,0 +1,20 @@ +use std::collections::HashMap; + +use petgraph::graphmap::DiGraphMap; + +pub mod length; +pub mod nodes; + +use self::{ + length::{Coordinate, Length}, + nodes::Node, +}; + +pub struct Filter<'a> { + graph: DiGraphMap, +} +pub enum Edge<'a> { + Named(&'a str, u8), + /// For standard inputs such as SourceGraphic etc., which we'll just be representing as nodes for simplicity + Unnamed(u8), +} diff --git a/crates/svg-filters/src/types/length.rs b/crates/svg-filters/src/types/length.rs new file mode 100644 index 0000000..4db3fd9 --- /dev/null +++ b/crates/svg-filters/src/types/length.rs @@ -0,0 +1,14 @@ +pub struct Length(f32, Unit); +pub type Coordinate = Length; + +pub enum Unit { + None, + Em, + Ex, + Px, + In, + Cm, + Mm, + Pt, + Pc, +} diff --git a/crates/svg-filters/src/types/nodes.rs b/crates/svg-filters/src/types/nodes.rs new file mode 100644 index 0000000..3571e76 --- /dev/null +++ b/crates/svg-filters/src/types/nodes.rs @@ -0,0 +1,13 @@ +use self::{primitives::Primitive, standard_input::StandardInput}; + +use super::length::{Coordinate, Length}; + +pub mod standard_input; + +pub mod primitives; + +pub enum Node { + /// We represent those as Nodes because they're essentially magical nodes + StandardInput(StandardInput), + Primitive(Primitive), +} diff --git a/crates/svg-filters/src/types/nodes/primitives.rs b/crates/svg-filters/src/types/nodes/primitives.rs new file mode 100644 index 0000000..433f190 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives.rs @@ -0,0 +1,51 @@ +use crate::types::length::{Coordinate, Length}; + +mod blend; +mod color_matrix; +mod component_transfer; +mod composite; +mod convolve_matrix; +mod diffuse_lighting; +mod displacement_map; +mod flood; +mod gaussian_blur; +mod image; +mod merge; +mod morphology; +mod offset; +mod specular_lighting; +mod tile; +mod turbulence; + +pub struct Primitive { + primitive: FePrimitive, + common_attrs: CommonAttrs, +} + +struct CommonAttrs { + x: Coordinate, + y: Coordinate, + width: Length, + height: Length, +} + +/// svg filter effects primitives +enum FePrimitive { + // 2 inputs + Blend(blend::Blend), + ColorMatrix(color_matrix::ColorMatrix), + ComponentTransfer(component_transfer::ComponentTransfer), + Composite(composite::Composite), + ConvolveMatrix(convolve_matrix::ConvolveMatrix), + DiffuseLighting(diffuse_lighting::DiffuseLighting), + DisplacementMap(displacement_map::DisplacementMap), + Flood(flood::Flood), + GaussianBlur(gaussian_blur::GaussianBlur), + Image(image::Image), + Merge(merge::Merge), + Morphology(morphology::Morphology), + Offset(offset::Offset), + SpecularLighting(specular_lighting::SpecularLighting), + Tile(tile::Tile), + Turbulence(turbulence::Turbulence), +} diff --git a/crates/svg-filters/src/types/nodes/primitives/blend.rs b/crates/svg-filters/src/types/nodes/primitives/blend.rs new file mode 100644 index 0000000..c8972de --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/blend.rs @@ -0,0 +1,25 @@ +/// [feBlend](https://www.w3.org/TR/SVG11/filters.html#feBlendElement) +pub struct Blend { + mode: BlendMode, +} + +/// as according to https://drafts.fxtf.org/compositing-1/#blending +enum BlendMode { + Normal, + Multiply, + Screen, + Overlay, + Darken, + Lighten, + ColorDodge, + ColorBurn, + HardLight, + SoftLight, + Difference, + Exclusion, + + Hue, + Saturation, + Color, + Luminosity, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/color_matrix.rs b/crates/svg-filters/src/types/nodes/primitives/color_matrix.rs new file mode 100644 index 0000000..bdc945e --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/color_matrix.rs @@ -0,0 +1,19 @@ +/// [feColorMatrix](https://www.w3.org/TR/SVG11/filters.html#feColorMatrixElement) +pub struct ColorMatrix { + cm_type: ColorMatrixType, +} + +enum ColorMatrixType { + Matrix { + values: [f32; 20], + }, + Saturate { + // is the values attribute anyway tho + value: f32, + }, + HueRotate { + // also the values attribute + degrees: f32, + }, + LuminanceToAlpha, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/component_transfer.rs b/crates/svg-filters/src/types/nodes/primitives/component_transfer.rs new file mode 100644 index 0000000..6c58d87 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/component_transfer.rs @@ -0,0 +1,27 @@ +/// [feComponentTransfer](https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement) +pub struct ComponentTransfer { + func_r: TransferFunction, + func_g: TransferFunction, + func_b: TransferFunction, + func_a: TransferFunction, +} + +/// [transfer functions](https://www.w3.org/TR/SVG11/filters.html#transferFuncElements) +enum TransferFunction { + Identity, + Table { + table_values: Vec, + }, + Discrete { + table_values: Vec, + }, + Linear { + slope: f32, + intercept: f32, + }, + Gamma { + amplitude: f32, + exponent: f32, + offset: f32, + }, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/composite.rs b/crates/svg-filters/src/types/nodes/primitives/composite.rs new file mode 100644 index 0000000..ae95447 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/composite.rs @@ -0,0 +1,13 @@ +/// [feComposite](https://www.w3.org/TR/SVG11/filters.html#feCompositeElement) +pub struct Composite { + operator: CompositeOperator, +} + +enum CompositeOperator { + Over, + In, + Out, + Atop, + Xor, + Arithmetic { k1: f32, k2: f32, k3: f32, k4: f32 }, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/convolve_matrix.rs b/crates/svg-filters/src/types/nodes/primitives/convolve_matrix.rs new file mode 100644 index 0000000..a619ac9 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/convolve_matrix.rs @@ -0,0 +1,18 @@ +pub struct ConvolveMatrix { + order: (u16, u16), + // must be checked to be `order.0 * order.1` + kernel_matrix: Vec, + divisor: f32, + bias: f32, + target_x: i32, + target_y: i32, + edge_mode: EdgeMode, + kernel_unit_length: (f32, f32), + preserve_alpha: bool, +} + +enum EdgeMode { + None, + Duplicate, + Wrap, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/diffuse_lighting.rs b/crates/svg-filters/src/types/nodes/primitives/diffuse_lighting.rs new file mode 100644 index 0000000..18a0485 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/diffuse_lighting.rs @@ -0,0 +1,2 @@ +// TODO +pub struct DiffuseLighting; diff --git a/crates/svg-filters/src/types/nodes/primitives/displacement_map.rs b/crates/svg-filters/src/types/nodes/primitives/displacement_map.rs new file mode 100644 index 0000000..e59a520 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/displacement_map.rs @@ -0,0 +1,13 @@ +/// [feDisplacementMap](https://www.w3.org/TR/SVG11/filters.html#feDisplacementMapElement) +pub struct DisplacementMap { + scale: f32, + x_channel_selector: Channel, + y_channel_selector: Channel, +} + +enum Channel { + A, + R, + G, + B, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/flood.rs b/crates/svg-filters/src/types/nodes/primitives/flood.rs new file mode 100644 index 0000000..6858c71 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/flood.rs @@ -0,0 +1,7 @@ +use csscolorparser::Color; + +/// [feFlood](https://www.w3.org/TR/SVG11/filters.html#feFloodElement) +pub struct Flood { + flood_color: Color, + flood_opacity: f32, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/gaussian_blur.rs b/crates/svg-filters/src/types/nodes/primitives/gaussian_blur.rs new file mode 100644 index 0000000..5ad8047 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/gaussian_blur.rs @@ -0,0 +1,4 @@ +/// [feGaussianBlur](https://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement) +pub struct GaussianBlur { + std_deviation: (f32, f32), +} diff --git a/crates/svg-filters/src/types/nodes/primitives/image.rs b/crates/svg-filters/src/types/nodes/primitives/image.rs new file mode 100644 index 0000000..d068c89 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/image.rs @@ -0,0 +1,2 @@ +// TODO +pub struct Image; diff --git a/crates/svg-filters/src/types/nodes/primitives/merge.rs b/crates/svg-filters/src/types/nodes/primitives/merge.rs new file mode 100644 index 0000000..a65df6e --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/merge.rs @@ -0,0 +1,2 @@ +// TODO +pub struct Merge; diff --git a/crates/svg-filters/src/types/nodes/primitives/morphology.rs b/crates/svg-filters/src/types/nodes/primitives/morphology.rs new file mode 100644 index 0000000..6fd50e1 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/morphology.rs @@ -0,0 +1,10 @@ +/// [feMorphology](https://www.w3.org/TR/SVG11/filters.html#feMorphologyElement) +pub struct Morphology { + operator: Operator, + radius: (f32, f32), +} + +enum Operator { + Erode, + Dilate, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/offset.rs b/crates/svg-filters/src/types/nodes/primitives/offset.rs new file mode 100644 index 0000000..1473b0e --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/offset.rs @@ -0,0 +1,5 @@ +/// [feOffset](https://www.w3.org/TR/SVG11/filters.html#feOffsetElement) +pub struct Offset { + dx: f32, + dy: f32, +} diff --git a/crates/svg-filters/src/types/nodes/primitives/specular_lighting.rs b/crates/svg-filters/src/types/nodes/primitives/specular_lighting.rs new file mode 100644 index 0000000..ab41f49 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/specular_lighting.rs @@ -0,0 +1,2 @@ +// TODO +pub struct SpecularLighting; diff --git a/crates/svg-filters/src/types/nodes/primitives/tile.rs b/crates/svg-filters/src/types/nodes/primitives/tile.rs new file mode 100644 index 0000000..b943271 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/tile.rs @@ -0,0 +1,2 @@ +/// [feTile](https://www.w3.org/TR/SVG11/filters.html#feTileElement) +pub struct Tile; diff --git a/crates/svg-filters/src/types/nodes/primitives/turbulence.rs b/crates/svg-filters/src/types/nodes/primitives/turbulence.rs new file mode 100644 index 0000000..998b472 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/primitives/turbulence.rs @@ -0,0 +1,18 @@ +/// [feTurbulence](https://www.w3.org/TR/SVG11/filters.html#feTurbulenceElement) +pub struct Turbulence { + base_frequency: (f32, f32), + num_octaves: (u16), + seed: u32, + stich_tiles: StitchTiles, + // attr name: type + noise_type: NoiseType, +} + +enum StitchTiles { + Stitch, + NoStitch, +} +enum NoiseType { + Turbulence, + FractalNoise, +} diff --git a/crates/svg-filters/src/types/nodes/standard_input.rs b/crates/svg-filters/src/types/nodes/standard_input.rs new file mode 100644 index 0000000..e1ae7d1 --- /dev/null +++ b/crates/svg-filters/src/types/nodes/standard_input.rs @@ -0,0 +1,10 @@ +/// [svg filter effect standard input](https://www.w3.org/TR/SVG11/filters.html#FilterPrimitiveInAttribute) +/// technically not a node, but for implementation simplicity... yeah +pub enum StandardInput { + SourceGraphic, + SourceAlpha, + BackgroundImage, + BackgroundAlpha, + FillPaint, + StrokePaint, +}