Instance tables refactor part 4: replace ArtboardGroups with multi-row Instances<Artboard> (#2265)

* Clean up dyn_any usages

* Migrate ArtboardGroup to ArtboardGroupTable (not yet flattened)

* Reorder graphical data imports

* Flatten and remove ArtboardGroup in favor of ArtboardGroupTable

* Fix test
This commit is contained in:
Keavon Chambers
2025-03-02 17:30:29 -08:00
parent 2f6c6e28f0
commit 19a140682e
32 changed files with 233 additions and 156 deletions

View File

@@ -47,7 +47,7 @@ fn sample_image(ctx: impl ExtractFootprint + Clone + Send, image_frame: ImageFra
// If the image would not be visible, return an empty image
if size.x <= 0. || size.y <= 0. {
return ImageFrameTable::empty();
return ImageFrameTable::one_empty_image();
}
let image_buffer = image::Rgba32FImage::from_raw(image.width, image.height, data).expect("Failed to convert internal image format into image-rs data type.");
@@ -257,8 +257,7 @@ fn mask_image<
#[node_macro::node(skip_impl)]
async fn blend_image_tuple<_P, MapFn, _Fg>(images: (ImageFrameTable<_P>, _Fg), map_fn: &'n MapFn) -> ImageFrameTable<_P>
where
_P: Alpha + Pixel + Debug + Send + dyn_any::StaticType,
_P::Static: Pixel,
_P: Alpha + Pixel + Debug + Send,
MapFn: for<'any_input> Node<'any_input, (_P, _P), Output = _P> + 'n + Clone,
_Fg: Sample<Pixel = _P> + Transform + Clone + Send + 'n,
GraphicElement: From<Image<_P>>,
@@ -513,7 +512,7 @@ fn noise_pattern(
// If the image would not be visible, return an empty image
if size.x <= 0. || size.y <= 0. {
return ImageFrameTable::empty();
return ImageFrameTable::one_empty_image();
}
let footprint_scale = footprint.scale();
@@ -639,7 +638,7 @@ fn mandelbrot(ctx: impl ExtractFootprint + Send) -> ImageFrameTable<Color> {
// If the image would not be visible, return an empty image
if size.x <= 0. || size.y <= 0. {
return ImageFrameTable::empty();
return ImageFrameTable::one_empty_image();
}
let scale = footprint.scale();