mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-25 21:17:01 +00:00
ImDrawList: Better looking non-AA rectangle (lower-right corner and rounding). (#1646)
This commit is contained in:
parent
d7f97922b8
commit
403b2d7d59
@ -982,7 +982,10 @@ void ImDrawList::AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float roun
|
|||||||
{
|
{
|
||||||
if ((col & IM_COL32_A_MASK) == 0)
|
if ((col & IM_COL32_A_MASK) == 0)
|
||||||
return;
|
return;
|
||||||
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.5f,0.5f), rounding, rounding_corners_flags);
|
if (Flags & ImDrawListFlags_AntiAliasedLines)
|
||||||
|
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.50f,0.50f), rounding, rounding_corners_flags);
|
||||||
|
else
|
||||||
|
PathRect(a + ImVec2(0.5f,0.5f), b - ImVec2(0.49f,0.49f), rounding, rounding_corners_flags); // Better looking lower-right corner and rounded non-AA shapes.
|
||||||
PathStroke(col, true, thickness);
|
PathStroke(col, true, thickness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user