mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-27 16:34:05 +00:00
Clean up code by using Iterator::collect() when constructing instance tables (#2918)
* instances: `Iterator::collect()` instances * instances: adjust nodes to use iterators * fix warnings on master * Bump MSRV * Port the remaining usages --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
032f9bdf72
commit
890da6a3c3
18 changed files with 964 additions and 985 deletions
|
@ -292,15 +292,12 @@ where
|
|||
|
||||
let rasterized = context.get_image_data(0., 0., resolution.x as f64, resolution.y as f64).unwrap();
|
||||
|
||||
let mut result = RasterDataTable::default();
|
||||
let image = Image::from_image_data(&rasterized.data().0, resolution.x as u32, resolution.y as u32);
|
||||
result.push(Instance {
|
||||
RasterDataTable::new_instance(Instance {
|
||||
instance: Raster::new_cpu(image),
|
||||
transform: footprint.transform,
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
result
|
||||
})
|
||||
}
|
||||
|
||||
#[node_macro::node(category(""))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue