You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AddRectFilled() with rounding is simply PathRect() + PathFillConvex(), and PathRect() is simply 4 calls to PathArcToFast().
So you can easily implement your own in 5 lines of code:
And then you can adjust the radius however you want.
It doesn't need a new function for this.....
However if you need to DISABLE rounding for certain corners we already have flags for this too and you can use e.g. ImDrawFlags_RoundCornersAll & ~ImDrawFlags_RoundCornersRight to disable rounding on the two right corners.
Version/Branch of Dear ImGui:
Version 1.78, master
Back-ends:
imgui.net
Compiler, OS:
windows 10
Full config/build information:
No response
Details:
My Issue/Question:
Would it be possible to draw a rectangle with a different corner radius for each corner?
I'm frequently using...
... but I would love to implement a segmented button that has no rounded corners at the joint. Something like this:
I’m aware that extensive styling is probably outside the scope of the master branch. However, there is...
... so adding an override for
AddRectFilled
with four different corner radii wouldn't be too much of a feature creep.Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: