From 570215df9a5e4051659481b24d31e1918741a304 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 8 May 2020 17:10:25 +0200 Subject: [PATCH] Better debug rendering of expanded region --- emigui/src/region.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/emigui/src/region.rs b/emigui/src/region.rs index 792e88d8..d2a89e28 100644 --- a/emigui/src/region.rs +++ b/emigui/src/region.rs @@ -325,7 +325,7 @@ impl Region { fill_color: None, }); - let color = color::srgba(255, 0, 0, 128); + let color = color::srgba(200, 0, 0, 255); let width = 2.5; if too_wide { @@ -334,6 +334,11 @@ impl Region { color, width, )); + self.add_paint_cmd(PaintCmd::line_segment( + (rect.left_center(), rect.right_center()), + color, + width, + )); self.add_paint_cmd(PaintCmd::line_segment( (rect.right_top(), rect.right_bottom()), color, @@ -347,6 +352,11 @@ impl Region { color, width, )); + self.add_paint_cmd(PaintCmd::line_segment( + (rect.center_top(), rect.center_bottom()), + color, + width, + )); self.add_paint_cmd(PaintCmd::line_segment( (rect.left_bottom(), rect.right_bottom()), color,