From 4f81761e7c58a345a5758f3a40d741cf25c85178 Mon Sep 17 00:00:00 2001 From: Mars-Wave <57585293+Mars-Wave@users.noreply.github.com> Date: Wed, 22 Oct 2025 19:41:39 +0200 Subject: [PATCH] Fix the canvas extent of scaled and offset heads --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index ecc7d67..13fbb7a 100644 --- a/src/main.c +++ b/src/main.c @@ -122,12 +122,12 @@ static void update_canvas_size(struct wd_state *state) { wd_head_form_get_dimensions(form, &dim); int h = dim.h; int w = dim.w; - int x2 = dim.x + w; - int y2 = dim.x + h; if (dim.scale > 0.) { w /= dim.scale; h /= dim.scale; } + int x2 = dim.x + w; + int y2 = dim.y + h; xmin = MIN(xmin, dim.x); xmax = MAX(xmax, x2); ymin = MIN(ymin, dim.y);