From 9991961d8ff085699519d407c2f22e10ae03428b Mon Sep 17 00:00:00 2001 From: Moritz Baron Date: Sun, 9 Jun 2024 01:34:23 +0200 Subject: [PATCH] stroked --- src/app.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app.rs b/src/app.rs index fde6734..906bdc6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -371,8 +371,6 @@ impl TemplateApp { let canvas_width = bg_image.width() as f32; let canvas_height = bg_image.height() as f32; - //let r = real_height / real_width; - //let canvas_height = r * canvas_width as f32; let transform = RectTransform::from_to( from, Rect::from_min_max(pos2(0.0, 0.0), pos2(canvas_width, canvas_height)), @@ -440,9 +438,9 @@ impl TemplateApp { rect.height() as u32, |x, y| { if x < stroke_width as u32 - || x >= rect.width() as u32 - stroke_width as u32 + || x > (rect.width() - stroke_width) as u32 || y < stroke_width as u32 - || y >= rect.height() as u32 - stroke_width as u32 + || y > (rect.height() - stroke_width) as u32 { image::Rgba([ color.r(),