Skip to content

Commit fcf32b3

Browse files
authored
Fix PNG exports being off by 1 pixel (#3582)
use round() instead of as_uvec2() while exporting
1 parent 9cb856e commit fcf32b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

editor/src/node_graph_executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl NodeGraphExecutor {
201201
ExportBounds::Artboard(id) => document.metadata().bounding_box_document(id),
202202
}
203203
.ok_or_else(|| "No bounding box".to_string())?;
204-
let resolution = (bounds[1] - bounds[0]).as_uvec2();
204+
let resolution = (bounds[1] - bounds[0]).round().as_uvec2();
205205
let transform = DAffine2::from_translation(bounds[0]).inverse();
206206

207207
let render_config = RenderConfig {

0 commit comments

Comments
 (0)