ProgressBar: Fixed a minor tesselation issue when rendering rounded progress bars.
Incidentally, the auto-tesselation path of PathArcTo() wasn't much tested.
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index cd48179..c393981 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -53,6 +53,8 @@
for auto-resizing of columns. (#6917)
- Tables: Angled headers: fixed TableAngledHeadersRow() incorrect background fill
drawn too low, particularly visible with tables that have no scrolling. (#6917)
+- ProgressBar: Fixed a minor tesselation issue when rendering rounded progress bars,
+ where in some situations the rounded section wouldn't follow regular tesselation rules.
-----------------------------------------------------------------------
diff --git a/imgui_draw.cpp b/imgui_draw.cpp
index 2be8202..8470095 100644
--- a/imgui_draw.cpp
+++ b/imgui_draw.cpp
@@ -3997,8 +3997,8 @@
}
else
{
- draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b, 3); // BL
- draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e, 3); // TR
+ draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b); // BL
+ draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e); // TR
}
if (p1.x > rect.Min.x + rounding)
{
@@ -4017,8 +4017,8 @@
}
else
{
- draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b, 3); // TR
- draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e, 3); // BR
+ draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b); // TR
+ draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e); // BR
}
}
draw_list->PathFillConvex(col);