Skip to content

Commit 16a1431

Browse files
committed
Remove debug nodes
1 parent cfacdf5 commit 16a1431

1 file changed

Lines changed: 2 additions & 48 deletions

File tree

  • node-graph/nodes/math/src

node-graph/nodes/math/src/lib.rs

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use core_types::Context;
2-
use core_types::list::{ATTR_FILL_GRAPHIC, ATTR_STROKE_GRAPHIC, List};
2+
use core_types::list::List;
33
use core_types::registry::types::{Fraction, Percentage, PixelSize};
44
use core_types::transform::Footprint;
55
use core_types::{Color, Ctx, num_traits};
66
use glam::{DAffine2, DVec2};
77
use graphic_types::raster_types::{CPU, GPU, Raster};
8-
use graphic_types::{Artboard, Graphic, IntoGraphicList, Vector};
8+
use graphic_types::{Artboard, Graphic, Vector};
99
use log::warn;
1010
use math_parser::ast;
1111
use math_parser::context::{EvalContext, NothingMap, ValueProvider};
@@ -985,52 +985,6 @@ fn normalize(_: impl Ctx, vector: DVec2) -> DVec2 {
985985
vector.normalize_or_zero()
986986
}
987987

988-
/// Sets the `fill_graphic` attribute on each item of the input vector list.
989-
/// Used for testing of clipping-based fill rendering until the proper Fill node refactor lands.
990-
#[node_macro::node(category("Debug"))]
991-
fn fill_graphic<P: IntoGraphicList + 'n + Send>(
992-
_: impl Ctx,
993-
mut vectors: List<Vector>,
994-
#[implementations(
995-
List<Graphic>,
996-
List<Vector>,
997-
List<Raster<CPU>>,
998-
List<Raster<GPU>>,
999-
List<Color>,
1000-
List<GradientStops>,
1001-
)]
1002-
fill_graphic: P,
1003-
) -> List<Vector> {
1004-
let paint_list = fill_graphic.into_graphic_list();
1005-
for row_idx in 0..vectors.len() {
1006-
vectors.set_attribute(ATTR_FILL_GRAPHIC, row_idx, paint_list.clone());
1007-
}
1008-
vectors
1009-
}
1010-
1011-
/// Sets the `stroke_graphic` attribute on each item of the input vector list.
1012-
/// Used for testing of gradient and clipping-based stroke rendering until the proper Stroke node refactor lands.
1013-
#[node_macro::node(category("Debug"))]
1014-
fn stroke_graphic<P: IntoGraphicList + 'n + Send>(
1015-
_: impl Ctx,
1016-
mut vectors: List<Vector>,
1017-
#[implementations(
1018-
List<Graphic>,
1019-
List<Vector>,
1020-
List<Raster<CPU>>,
1021-
List<Raster<GPU>>,
1022-
List<Color>,
1023-
List<GradientStops>,
1024-
)]
1025-
stroke_graphic: P,
1026-
) -> List<Vector> {
1027-
let paint_list = stroke_graphic.into_graphic_list();
1028-
for row_idx in 0..vectors.len() {
1029-
vectors.set_attribute(ATTR_STROKE_GRAPHIC, row_idx, paint_list.clone());
1030-
}
1031-
vectors
1032-
}
1033-
1034988
#[cfg(test)]
1035989
mod test {
1036990
use super::*;

0 commit comments

Comments
 (0)