Add the Selective Color adjustment node

This commit is contained in:
Keavon Chambers 2023-04-19 03:02:50 -07:00
parent 76c754d38a
commit 161bbc62b4
8 changed files with 411 additions and 32 deletions

View file

@ -39,6 +39,9 @@ pub enum TaggedValue {
Fill(graphene_core::vector::style::Fill),
Stroke(graphene_core::vector::style::Stroke),
VecF32(Vec<f32>),
RedGreenBlue(graphene_core::raster::RedGreenBlue),
RelativeAbsolute(graphene_core::raster::RelativeAbsolute),
SelectiveColorChoice(graphene_core::raster::SelectiveColorChoice),
LineCap(graphene_core::vector::style::LineCap),
LineJoin(graphene_core::vector::style::LineJoin),
FillType(graphene_core::vector::style::FillType),
@ -92,6 +95,9 @@ impl Hash for TaggedValue {
Self::Fill(fill) => fill.hash(state),
Self::Stroke(stroke) => stroke.hash(state),
Self::VecF32(vec_f32) => vec_f32.iter().for_each(|val| val.to_bits().hash(state)),
Self::RedGreenBlue(red_green_blue) => red_green_blue.hash(state),
Self::RelativeAbsolute(relative_absolute) => relative_absolute.hash(state),
Self::SelectiveColorChoice(selective_color_choice) => selective_color_choice.hash(state),
Self::LineCap(line_cap) => line_cap.hash(state),
Self::LineJoin(line_join) => line_join.hash(state),
Self::FillType(fill_type) => fill_type.hash(state),
@ -151,6 +157,9 @@ impl<'a> TaggedValue {
TaggedValue::Fill(x) => Box::new(x),
TaggedValue::Stroke(x) => Box::new(x),
TaggedValue::VecF32(x) => Box::new(x),
TaggedValue::RedGreenBlue(x) => Box::new(x),
TaggedValue::RelativeAbsolute(x) => Box::new(x),
TaggedValue::SelectiveColorChoice(x) => Box::new(x),
TaggedValue::LineCap(x) => Box::new(x),
TaggedValue::LineJoin(x) => Box::new(x),
TaggedValue::FillType(x) => Box::new(x),
@ -193,6 +202,9 @@ impl<'a> TaggedValue {
TaggedValue::Fill(_) => concrete!(graphene_core::vector::style::Fill),
TaggedValue::Stroke(_) => concrete!(graphene_core::vector::style::Stroke),
TaggedValue::VecF32(_) => concrete!(Vec<f32>),
TaggedValue::RedGreenBlue(_) => concrete!(graphene_core::raster::RedGreenBlue),
TaggedValue::RelativeAbsolute(_) => concrete!(graphene_core::raster::RelativeAbsolute),
TaggedValue::SelectiveColorChoice(_) => concrete!(graphene_core::raster::SelectiveColorChoice),
TaggedValue::LineCap(_) => concrete!(graphene_core::vector::style::LineCap),
TaggedValue::LineJoin(_) => concrete!(graphene_core::vector::style::LineJoin),
TaggedValue::FillType(_) => concrete!(graphene_core::vector::style::FillType),