diff --git a/crates/svg-filters/src/main.rs b/crates/svg-filters/src/main.rs index c5684de..aff0c94 100644 --- a/crates/svg-filters/src/main.rs +++ b/crates/svg-filters/src/main.rs @@ -10,51 +10,8 @@ use svg_filters::{ }; fn main() { - // - // - // - // - - // - - // - // - // - - // - // - // - let mut doc = SvgDocument::new(); - let chromabb = doc.create_filter("chromabb_gen"); - - let chan_r = chromabb.color_matrix( - StandardInput::SourceGraphic, - ColorMatrixType::Matrix(Box::new([ - 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., - ])), - ); - let offset_r = chromabb.offset(chan_r, 25., 0.); - let blur_r = chromabb.gaussian_blur_xy(offset_r, 5, 0); - - let chan_b = chromabb.color_matrix( - StandardInput::SourceGraphic, - ColorMatrixType::Matrix(Box::new([ - 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., - ])), - ); - let offset_b = chromabb.offset(chan_b, -25., 0.); - let blur_b = chromabb.gaussian_blur_xy(offset_b, 5, 0); - - let composite_rb = chromabb.composite_arithmetic(blur_r, blur_b, 0., 1., 1., 0.); - - let chan_g = chromabb.color_matrix( - StandardInput::SourceGraphic, - ColorMatrixType::Matrix(Box::new([ - 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., - ])), - ); - chromabb.composite_arithmetic(composite_rb, chan_g, 0., 1., 1., 0.); + eprintln!("{}", doc.generate_svg_pretty()); println!("{}", doc.generate_svg()); } diff --git a/crates/svg-filters/src/types/nodes/primitives.rs b/crates/svg-filters/src/types/nodes/primitives.rs index f43c820..c7526fd 100644 --- a/crates/svg-filters/src/types/nodes/primitives.rs +++ b/crates/svg-filters/src/types/nodes/primitives.rs @@ -61,7 +61,6 @@ pub trait WriteElement { /// svg filter effects primitives #[derive(Debug)] pub enum FePrimitive { - // 2 inputs Blend(blend::Blend), ColorMatrix(color_matrix::ColorMatrix), ComponentTransfer(component_transfer::ComponentTransfer),