mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-28 08:54:04 +00:00
Replace Instances<T>::empty() with Instances<T>::default() and make it return an empty table for vector data instead of one empty row (#2689)
Make Instances<T>::default() return an empty table for everything, even vector, and replace ::empty() with ::default()
This commit is contained in:
parent
cb4289169d
commit
2696abc6b3
18 changed files with 110 additions and 115 deletions
|
@ -179,7 +179,7 @@ where
|
|||
|
||||
if footprint.transform.matrix2.determinant() == 0. {
|
||||
log::trace!("Invalid footprint received for rasterization");
|
||||
return ImageFrameTable::empty();
|
||||
return ImageFrameTable::default();
|
||||
}
|
||||
|
||||
let mut render = SvgRender::new();
|
||||
|
@ -218,7 +218,7 @@ where
|
|||
|
||||
let rasterized = context.get_image_data(0., 0., resolution.x as f64, resolution.y as f64).unwrap();
|
||||
|
||||
let mut result = ImageFrameTable::empty();
|
||||
let mut result = ImageFrameTable::default();
|
||||
result.push(Instance {
|
||||
instance: Image::from_image_data(&rasterized.data().0, resolution.x as u32, resolution.y as u32),
|
||||
transform: footprint.transform,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue