Fix PNG exports being off by 1 pixel (#3582)

use round() instead of as_uvec2() while exporting
This commit is contained in:
Ayush Amawate
2026-01-06 13:50:32 +00:00
committed by GitHub
parent 9cb856eee4
commit fcf32b3cff
+1 -1
View File
@@ -201,7 +201,7 @@ impl NodeGraphExecutor {
ExportBounds::Artboard(id) => document.metadata().bounding_box_document(id), ExportBounds::Artboard(id) => document.metadata().bounding_box_document(id),
} }
.ok_or_else(|| "No bounding box".to_string())?; .ok_or_else(|| "No bounding box".to_string())?;
let resolution = (bounds[1] - bounds[0]).as_uvec2(); let resolution = (bounds[1] - bounds[0]).round().as_uvec2();
let transform = DAffine2::from_translation(bounds[0]).inverse(); let transform = DAffine2::from_translation(bounds[0]).inverse();
let render_config = RenderConfig { let render_config = RenderConfig {