mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 04:28:47 +02:00
Amend 0c93238a ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
This commit is contained in:
@ -41,9 +41,25 @@ Breaking Changes:
|
||||
- ImGui::SetScrollHere() --> use ImGui::SetScrollHereY()
|
||||
- ImDrawList: upgraded AddPolyline()/PathStroke()'s "bool closed" parameter to use "ImDrawFlags flags".
|
||||
The matching ImDrawFlags_Closed value is guaranteed to always stay == 1 in the future.
|
||||
- bool closed = false --> use ImDrawFlags_None, or 0
|
||||
- bool closed = true --> use ImDrawFlags_Closed
|
||||
- bool closed = false --> use ImDrawFlags_None, or 0
|
||||
- bool closed = true --> use ImDrawFlags_Closed
|
||||
Difference may not be noticeable for most but zealous type-checking tools may report a need to change.
|
||||
- ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags.
|
||||
The old ImDrawCornersFlags used an awkward default value of ~0 or 0xF (4 lower bits set) to signify "round all
|
||||
corners". We still support old flags, but note that the new named flags are opt-out instead of opt-in. [@rokups]
|
||||
- AddRect(..., rounding, ImDrawCornerFlags_TopLeft) --> AddRect(..., ImDrawFlags_NoRoundCorners ^ ImDrawFlags_NoRoundCornerTL)
|
||||
- Flags now sanely default to 0 instead of defaulting to ~0 or ImDrawCornerFlags_All, consistent with everywhere else.
|
||||
- In practice, this shouldn't have an effect as those flags were rarely used.
|
||||
- All meaningful old uses are supported:
|
||||
- Default flags will behave the same.
|
||||
- Use of old named flags will behave the same (but will be obsoleted later)
|
||||
- Use of hardcoded ~0 or 0xF, previously suggested as a convenience, will behave the same (but will be obsoleted later).
|
||||
- Not supported:
|
||||
- Use of hardcoded values between 0x01 and 0x0E not using named flags are NOT supported (will assert).
|
||||
- Use of new ImDrawFlags together with ImDrawCornerFlags in the same call (will assert).
|
||||
- Use of rounding > 0.0f along old flags explicitely set as hardcoded 0 would have previously overidden the
|
||||
rounding value back into "no rounding", whereas it will now behave as "round all corners".
|
||||
This is technically the only real breaking change which we can't solve automatically.
|
||||
- ImDrawList: clarified that PathArcTo()/PathArcToFast() won't render with radius < 0.0f. Previously it sorts
|
||||
of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
|
||||
- Style: renamed rarely used style.CircleSegmentMaxError (old default = 1.60f)
|
||||
@ -52,8 +68,6 @@ Breaking Changes:
|
||||
disable those default functions for MinGW. MinGW users should: either link with -limm32, either set their
|
||||
imconfig file with '#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS'. (#2590, #738) [@actboy168]
|
||||
- Backends: Win32: Pragma linking with dwmapi.lib (Vista-era, ~9 kb). MinGW users will need to link with -ldwmapi.
|
||||
- ImDrawList: Merged ImDrawCornerFlags to ImDrawFlags. Hardcoded use of 0x0F or ~0 as ImDrawCornerFlags should be
|
||||
replaced with ImDrawFlags_None or 0. [@rokups]
|
||||
|
||||
Other Changes:
|
||||
|
||||
|
Reference in New Issue
Block a user