mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-12-05 19:12:08 -10:00
Rename the 'Image to Channels' node to 'Into Channels' and defer its channels on any graphic
This commit is contained in:
1 parent
c465a3ebea
commit
12daaf8ab0
16 files changed
+279
-48
No files matched your search
@@ -1755,7 +1755,7 @@ fn svg_expresses_adjustment(adjustment: &Adjustment) -> bool {
|
||||
use graphic_types::adjustment::DesaturateMethod;
|
||||
|
||||
match adjustment {
|
||||
Adjustment::Threshold { .. } | Adjustment::GradientMap { .. } | Adjustment::ChannelMixer(_) | Adjustment::ColorOverlay { .. } => true,
|
||||
Adjustment::Threshold { .. } | Adjustment::GradientMap { .. } | Adjustment::ChannelMixer(_) | Adjustment::ColorOverlay { .. } | Adjustment::AlphaToGray => true,
|
||||
Adjustment::Desaturate { method } => matches!(
|
||||
method,
|
||||
DesaturateMethod::LuminanceRec709 | DesaturateMethod::ChannelsAverage | DesaturateMethod::LumaRec709 | DesaturateMethod::LumaRec601
|
||||
@@ -2095,6 +2095,10 @@ impl SvgFilterPrimitives {
|
||||
};
|
||||
self.push("feColorMatrix", &format!(r#"in="{image}" color-interpolation-filters="{space}" {}"#, matrix([weights; 3])), "")
|
||||
}
|
||||
Adjustment::AlphaToGray => {
|
||||
let values = "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0";
|
||||
self.push("feColorMatrix", &format!(r#"{} type="matrix" values="{values}""#, in_gamma(image)), "")
|
||||
}
|
||||
// TODO: Express the other cross-channel adjustments, which no SVG primitive covers exactly
|
||||
_ => image.to_string(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user