mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user