From c1983d5c3face4e41fcaae9cd6b6920c7bdd8ec2 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 30 Sep 2015 21:48:36 +0200 Subject: [PATCH] Draw: Fixed rectangle rendering glitches with width/height <= 1/2 and rounding enabled. --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index de0ff8711..dcf30d9ba 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -713,7 +713,7 @@ void ImDrawList::PathRect(const ImVec2& a, const ImVec2& b, float rounding, int r = ImMin(r, fabsf(b.x-a.x) * ( ((rounding_corners&(1|2))==(1|2)) || ((rounding_corners&(4|8))==(4|8)) ? 0.5f : 1.0f ) - 1.0f); r = ImMin(r, fabsf(b.y-a.y) * ( ((rounding_corners&(1|8))==(1|8)) || ((rounding_corners&(2|4))==(2|4)) ? 0.5f : 1.0f ) - 1.0f); - if (r == 0.0f || rounding_corners == 0) + if (r <= 0.0f || rounding_corners == 0) { PathLineTo(a); PathLineTo(ImVec2(b.x,a.y));