mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Recategorize the node catalog
This commit is contained in:
@@ -441,10 +441,10 @@ fn hue_shift_color_node(color: Color, hue_shift: f64, saturation_shift: f64, lig
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct InvertRGBNode;
|
||||
pub struct InvertNode;
|
||||
|
||||
#[node_macro::node_fn(InvertRGBNode)]
|
||||
fn invert_image(color: Color) -> Color {
|
||||
#[node_macro::node_fn(InvertNode)]
|
||||
fn invert_node(color: Color) -> Color {
|
||||
let color = color.to_gamma_srgb();
|
||||
|
||||
let color = color.map_rgb(|c| color.a() - c);
|
||||
@@ -453,7 +453,7 @@ fn invert_image(color: Color) -> Color {
|
||||
}
|
||||
|
||||
// TODO replace with trait based implementation
|
||||
impl<'i> Node<'i, &'i Color> for InvertRGBNode {
|
||||
impl<'i> Node<'i, &'i Color> for InvertNode {
|
||||
type Output = Color;
|
||||
|
||||
fn eval(&'i self, color: &'i Color) -> Self::Output {
|
||||
|
||||
@@ -483,7 +483,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
||||
)],*/
|
||||
raster_node!(graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>, params: [Color, f64, f64, f64, f64, f64, f64]),
|
||||
raster_node!(graphene_core::raster::HueSaturationNode<_, _, _>, params: [f64, f64, f64]),
|
||||
raster_node!(graphene_core::raster::InvertRGBNode, params: []),
|
||||
raster_node!(graphene_core::raster::InvertNode, params: []),
|
||||
raster_node!(graphene_core::raster::ThresholdNode<_, _, _>, params: [f64, f64, LuminanceCalculation]),
|
||||
raster_node!(graphene_core::raster::GradientMapNode<_, _>, params: [GradientStops, bool]),
|
||||
raster_node!(graphene_core::raster::VibranceNode<_>, params: [f64]),
|
||||
|
||||
Reference in New Issue
Block a user