mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-17 21:56:36 +00:00
AA branch: fixed frame rounding clamping glitch.
This commit is contained in:
parent
2b032004a9
commit
cf1554ebb5
@ -7022,8 +7022,8 @@ void ImDrawList::Stroke(ImU32 col, bool closed)
|
||||
void ImDrawList::Rect(const ImVec2& a, const ImVec2& b, float rounding, int rounding_corners)
|
||||
{
|
||||
float r = rounding;
|
||||
r = ImMin(r, fabsf(b.x-a.x) * ( ((rounding_corners&(1|2))==(1|2)) || ((rounding_corners&(4|8))==(4|8)) ? 0.5f : 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 ));
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user