From f389048e4338dc2725234ae60936605a23739f0a Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sun, 19 Nov 2023 14:49:23 -0800 Subject: [PATCH] Outline drawing is now fixed to always be inside --- src/context.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/context.rs b/src/context.rs index 140fb62..107ef90 100644 --- a/src/context.rs +++ b/src/context.rs @@ -545,12 +545,10 @@ impl<'context, 'window, 'clip, 'gfx, 'pass> GraphicsContext<'context, 'window, ' Unit: ScreenScale + Zero, { if color.alpha() > 0 { - let mut options = options.colored(color).into_px(self.gfx.scale()); - options.line_width = options.line_width.round(); - let inset = options.line_width / 2; + let options = options.colored(color).into_px(self.gfx.scale()); let visible_rect = Rect::new( - Point::squared(inset), - self.gfx.region().size - Point::squared(inset), + Point::squared(options.line_width / 2), + self.gfx.region().size - Point::squared(options.line_width), ); let radii = self.get(&CornerRadius);