2953 Commits

Author SHA1 Message Date
ocornut
657f560510 ImStrv: marked with IM_NODEBUGSTEP.
Reduce cognitive/debug-stepping load.
2026-10-26 13:59:41 +01:00
ocornut
3626e2df2b ImStrv: detect and fixed misuses of CalcTextSize() old signature. (9321) 2026-10-26 13:59:41 +01:00
ocornut
e3854498fa ImStrv: made length() returns an int as it simplify the most common case (of passing %.*s to printf) 2026-10-26 13:59:40 +01:00
ocornut
0bf9a6ac49 ImStrv: allow constructing from two null pointers. 2026-10-26 13:59:40 +01:00
ocornut
71ce91097a ImStrv: Combo(), ListBox(): seems better to not introduce the ImStrv [] versions?
As 1) user is unlikely to store that on their end. 2) nowadays with lambdas isn't an easy user-side conversion.
Then we limit explosion of an already messy API.
2026-10-26 13:59:40 +01:00
ocornut
81c9a72e9f ImStrv: convert Combo()/ListBox() to use ImStrv in their getters.
Didn't convert Combo() "const char* items_separated_by_zeros" as this doesn't translate well when used via a ImStrv constructor, may actually aim to obsolete.
Fixed for shadowing local variable warning on 2025/06/25.
2026-10-26 13:59:40 +01:00
ocornut
b57179a046 ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2026-10-26 13:59:40 +01:00
ocornut
09f7ec1ba5 ImStrv: backtracked for now on supporting ImStrv for format strings.
It's widely incomplete and slow, requires a printf function taking non-zero-terminated format string to work.
Might do it eventually but it's much less a problem than labels. Format string are more frequently inlined in code and tend to be small, so existing solutions at call site can work better for now.
2026-10-26 13:59:40 +01:00
ocornut
1845eabf86 ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings. 2026-10-26 13:59:40 +01:00
ocornut
3de2c4b14c ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()
This is mostly for the benefit of cimgui parser, ideally we would do without.
2026-10-26 13:59:40 +01:00
ocornut
ac9042899f ImStrv: Step 2 - change ImStrv typedef to struct, perform all other logic conversion.
Squashed commits (initially a commit from rokups + many rework by ocornut. keeping them separate commits made rebasing unnecessarily tricking so merged from 2024/02)
ImStrv: many fixes (see details), added imconfig class extension example, added natvis description.
ImStrv: rework toward ensuring End is always set to constant can be compile time calculated
ImStrv: using length(), fix ambiguous empty() function, fix altered behaviors, removed unused operators.
ImStrv: various tweaks and fixes. removed ImGuiTextRange from ImGuiTextFilter, fix test engine hooks, removed constructor only used twice.
2026-10-26 13:59:40 +01:00
Rokas Kupstys
652998ed0b ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2026-10-26 13:59:39 +01:00
ocornut
49a1450360 DrawList: added missing ImDrawFlags_RoundCornersMask_ -> ImDrawFlags_RoundMask_ legacy redirect.
Amend 0e756a6.
2026-10-15 18:53:04 +02:00
ocornut
1ff218165d (Breaking) Commented out legacy names/functions which were obsoleted in 1.91.1 (Sept 2024). 2026-10-15 14:56:24 +02:00
ocornut
93a14c8fda (Breaking) Commented out legacy names/functions which were obsoleted from 1.90.7 (May 2024) to 1.91.0 (Sept 2024). 2026-10-15 14:51:48 +02:00
ocornut
cbe3d5fb88 Version 1.93.1 WIP 2026-10-15 14:34:31 +02:00
ocornut
6d32174508 Allow IM_NODEBUGSTEP to be defined by user. (#9584)
Amend e2e9533991
2026-10-15 14:03:51 +02:00
ocornut
c1aaac65e8 Version 1.93.0 2026-10-14 17:55:08 +02:00
ocornut
2859f6723c Docs: fixed various comments. 2026-10-07 19:50:23 +02:00
ocornut
cbf4f05419 DrawList: added io.ConfigDebugDrawListDefaultsToStrokeLegacy. (#9504) 2026-10-07 18:53:55 +02:00
ocornut
cb66fcdaac DrawList: rename ImDrawFlags_MiterOnly->ImDrawFlags_JoinMiter, ImDrawFlags_SquareCap->ImDrawFlags_CapSquare. 2026-10-07 18:53:55 +02:00
ocornut
475b793baa Docs: reworked Changelog, comments. 2026-10-07 18:53:55 +02:00
ocornut
0e756a649d (Breaking) DrawList: renamed ImDrawFlags_RoundCornersXXX to ImDrawFlags_RoundXXX. (#9504) 2026-10-07 18:53:55 +02:00
ocornut
c52f84c719 DrawList: rework _SelectFringeTexture() for use by third-party extensions + rename to _SelectLineTexture(). 2026-10-07 18:53:55 +02:00
ocornut
dee0e34504 DrawList: amend PushDrawFlag() to report reaching capacity. 2026-10-07 18:53:55 +02:00
ocornut
451e107b3f DrawList: removed ImDrawFlags_UseTexForStrokeLegacy as it doesn't have any use now that legacy code is out of the way. 2026-10-07 18:53:54 +02:00
Mikko Mononen
91dc4f456a DrawList: fixed rendering issues on small and degenerate shapes.
The "does stroke cover the whole shape" used to be overly pessimistic to stroking artifacts. This was due to the fringe, where the geometry would mess up before visually closing the shape.
Fixed the issue by adding max inner offest for the AddPolyline(), which limits the inner offset and also adjusts the texture coords.
Second part of the fix was to calculate the pass the max inner offset from the common shapes (circle, ngon, ellipse, rect).
While this does not fix all the ellipse rendering issues, it limits the issue a lot.
e.g. AddRect() w/ size=5, thickness=2 used to trigger AddRectFilled() fallback because threshold was pessimistic to prevent the AddPolyline() issues.
2026-10-07 18:53:54 +02:00
ocornut
deb9c70ace DrawList: ImDrawFlags_AALineEnds also requires ImDrawFlags_AALine, which makes it easier for widgets to opt-in AAEnds. 2026-10-07 18:53:54 +02:00
ocornut
20f17eeb6f DrawList: fixed using ImDrawFlags_UseTexForRoundCorners when ImFontAtlasFlags_NoBakedRoundCorners has also been set. 2026-10-07 18:53:54 +02:00
ocornut
7a510274ce DrawList: Comments. Atlas's NoBakedLines automatically disable AA at Style level. Fix passing non-Legacy stroke mask to PushDrawFlag(). Demo: Custom Rendering: use LiveEdit everywhere. 2026-10-07 18:53:54 +02:00
ocornut
eb02a7f24c DrawList: support altering RoundCorners flags in scope as an undocumented trick/hack. (#9489)
Not documented because it could become troublesome if treated as a guaranteed styling feature.
2026-10-07 18:53:53 +02:00
ocornut
46e4c26095 DrawList: removed AddPolylineLegacy(), AddConvexPolyFilledLegacy(). 2026-10-07 18:53:53 +02:00
ocornut
67bcd9d545 DrawList: moved no-AA handling into _SelectFringeTexture(). 2026-10-07 18:53:53 +02:00
ocornut
2fdcf895c8 DrawList: moved _GetStrokePos() to a local inline function. 2026-10-07 18:53:53 +02:00
ocornut
f2cd901be6 DrawList: added PushDrawFlag(), PopDrawFlag(), ImSmallStack_<>. (#9504) 2026-10-07 18:53:53 +02:00
ocornut
7e87cb984d DrawList: consistently support scope flags (ImDrawFlags::Flags) + primitive flags.
ImDrawFlags_AAEnds and ImDrawFlags_StrokeLegacy ok. (the most important ones).
ImDrawFlags_UseTexForRoundCorners ok.
ImDrawFlags_AAFill, ImDrawFlags_AAStrokes: for primitives: only for selected ones taking flags params. Haven't added the flag to all functions because it feels like a fringe use case.
ImDrawFlags_TextNoPixelSnap supported in RenderText(), per-prim (9417)
2026-10-07 18:53:53 +02:00
ocornut
008e0990b3 DrawList: comment about ImFontAtlasFlags_NoBakedLines. Demo: amend test bed to exercices more flags. 2026-10-07 18:53:53 +02:00
ocornut
7ccc8348bc (Breaking) Obsoleted style.AntiAliasedLinesUseTex which now only makes sense for legacy strokes. Added style.AntiAliasedLineEnds.
# Conflicts:
#	imgui.cpp
2026-10-07 18:53:53 +02:00
ocornut
02adb46a9f (Breaking) DrawList: removed ImDrawListFlags_in favor of using ImDrawFlags.
# Conflicts:
#	imgui.cpp
2026-10-07 18:53:53 +02:00
ocornut
cf85b48e55 DrawList: new ImDrawFlags API (yet unused in this commit) 2026-10-07 18:53:52 +02:00
ocornut
eb75c8056e DrawList: inverted ImDrawFlags_NoAAEnds into ImDrawFlags_AAEnds. 2026-10-07 18:53:52 +02:00
ocornut
230249ad58 ImFontAtlas: moved TexUv buffers and configurable defines to internals. 2026-10-07 18:53:52 +02:00
Mikko Mononen
f272141a4d DrawList: merged _AddPolyline back into AddPolyline.
- AddPolyline used to call different versions of _AddPolyline, the separation is not needed anymore, one less function call in debug mode
2026-10-07 18:53:52 +02:00
Mikko Mononen
ec510539c7 DrawList: increase detailed line textures from 3px to 4px to better hide the texture change.
+ amend: align #defines.
2026-10-07 18:53:52 +02:00
Mikko Mononen
130be3be42 DrawList: Optimization: added specialized 2 point polyline _AddLine(). 2026-10-07 18:53:51 +02:00
Mikko Mononen
6856b3e06b DrawList: added _InvFringeScale to use in cases of 1/_FringeScale. 2026-10-07 18:53:51 +02:00
ocornut
c59367efcb DrawList: renamed ImDrawFlags_StrokeCenterAligned to ImDrawFlags_StrokeCenterBiased. 2026-10-07 18:53:51 +02:00
ocornut
d453a59b9c DrawList: avoid using output references in _SelectFringeTexture() + misc tweaks, comments.
Matching coding style and more consistent for matching with other languages.
2026-10-07 18:53:51 +02:00
Mikko Mononen
ed8ed8bb71 DrawList: fixed thin lines appearing too bright.
- fixed how super sampled line textures are generated (and documented wrong assumption)
- switched to more samples and smaller thickness range
- tweaked super sampled texture selection to hide the texture changed better
2026-10-07 18:53:51 +02:00
Mikko Mononen
90e45bdde0 DrawList: extend the detailed stroke textures up stroke thickness 4. 2026-10-07 18:53:51 +02:00