mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 01:28:11 +08:00
Fix PNG exports being off by 1 pixel (#3582)
use round() instead of as_uvec2() while exporting
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user