|
1 | 1 | use core_types::Context; |
2 | | -use core_types::list::{ATTR_FILL_GRAPHIC, ATTR_STROKE_GRAPHIC, List}; |
| 2 | +use core_types::list::List; |
3 | 3 | use core_types::registry::types::{Fraction, Percentage, PixelSize}; |
4 | 4 | use core_types::transform::Footprint; |
5 | 5 | use core_types::{Color, Ctx, num_traits}; |
6 | 6 | use glam::{DAffine2, DVec2}; |
7 | 7 | use graphic_types::raster_types::{CPU, GPU, Raster}; |
8 | | -use graphic_types::{Artboard, Graphic, IntoGraphicList, Vector}; |
| 8 | +use graphic_types::{Artboard, Graphic, Vector}; |
9 | 9 | use log::warn; |
10 | 10 | use math_parser::ast; |
11 | 11 | use math_parser::context::{EvalContext, NothingMap, ValueProvider}; |
@@ -985,52 +985,6 @@ fn normalize(_: impl Ctx, vector: DVec2) -> DVec2 { |
985 | 985 | vector.normalize_or_zero() |
986 | 986 | } |
987 | 987 |
|
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 | | - |
1034 | 988 | #[cfg(test)] |
1035 | 989 | mod test { |
1036 | 990 | use super::*; |
|
0 commit comments