mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
New node: 'Split Segments'
This commit is contained in:
@@ -441,30 +441,6 @@ fn color_value(_: impl Ctx, _primary: (), #[default(Color::BLACK)] color: Option
|
||||
color
|
||||
}
|
||||
|
||||
// // Aims for interoperable compatibility with:
|
||||
// // https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=%27grdm%27%20%3D%20Gradient%20Map
|
||||
// // https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=Gradient%20settings%20(Photoshop%206.0)
|
||||
// #[node_macro::node(category("Raster: Adjustment"))]
|
||||
// async fn gradient_map<T: Adjust<Color>>(
|
||||
// _: impl Ctx,
|
||||
// #[implementations(
|
||||
// Color,
|
||||
// RasterDataTable<CPU>,
|
||||
// GradientStops,
|
||||
// )]
|
||||
// mut image: T,
|
||||
// gradient: GradientStops,
|
||||
// reverse: bool,
|
||||
// ) -> T {
|
||||
// image.adjust(|color| {
|
||||
// let intensity = color.luminance_srgb();
|
||||
// let intensity = if reverse { 1. - intensity } else { intensity };
|
||||
// gradient.evaluate(intensity as f64)
|
||||
// });
|
||||
|
||||
// image
|
||||
// }
|
||||
|
||||
/// Gets the color at the specified position along the gradient, given a position from 0 (left) to 1 (right).
|
||||
#[node_macro::node(category("Color"))]
|
||||
fn sample_gradient(_: impl Ctx, _primary: (), gradient: GradientStops, position: Fraction) -> Color {
|
||||
|
||||
Reference in New Issue
Block a user