mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix regression causing pasted images to have a zero-size transform (#2238)
* Use the identity matrix as the default for an image frame * Fix all usages to be equivalent to their pre-refactor versions, opting to keep ZERO not IDENTITY as the default image size --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -272,7 +272,7 @@ fn brush(_: Footprint, image: ImageFrameTable<Color>, bounds: ImageFrameTable<Co
|
||||
let opaque_image = ImageFrame {
|
||||
image: Image::new(bbox.size().x as u32, bbox.size().y as u32, Color::WHITE),
|
||||
transform: background_bounds,
|
||||
..Default::default()
|
||||
alpha_blending: Default::default(),
|
||||
};
|
||||
let mut erase_restore_mask = opaque_image;
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ fn mandelbrot(footprint: Footprint) -> ImageFrameTable<Color> {
|
||||
..Default::default()
|
||||
},
|
||||
transform: DAffine2::from_translation(offset) * DAffine2::from_scale(size),
|
||||
..Default::default()
|
||||
alpha_blending: Default::default(),
|
||||
};
|
||||
|
||||
ImageFrameTable::new(result)
|
||||
|
||||
@@ -87,7 +87,8 @@ fn decode_image(_: (), data: Arc<[u8]>) -> ImageFrameTable<Color> {
|
||||
height: image.height(),
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
transform: glam::DAffine2::IDENTITY,
|
||||
alpha_blending: Default::default(),
|
||||
};
|
||||
|
||||
ImageFrameTable::new(image)
|
||||
|
||||
Reference in New Issue
Block a user