mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-27 16:29:02 +08:00
ProgressBar: Fixed a minor tesselation issue when rendering rounded progress bars.
Incidentally, the auto-tesselation path of PathArcTo() wasn't much tested.
This commit is contained in:
parent
d3f1a7165c
commit
3b6d924acd
@ -53,6 +53,8 @@ Other changes:
|
||||
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.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -3997,8 +3997,8 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im
|
||||
}
|
||||
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 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im
|
||||
}
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user