2940 Commits

Author SHA1 Message Date
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
Mikko Mononen
91e769fbba DrawList: fixed visual pop in stroke rendering when thickness is between 1 and 2 pixels.
- added animated thickness to demo to make it easier to evaluate thickness visual progression
- added super sampled textures in thickness range [1..3] to avoid visual pop
2026-10-07 18:53:51 +02:00
Mikko Mononen
81f316a3bf DrawList: fixed and optimized _AddRectTinyRounding.
- fixed bug where fringe size was not properly applied in _AddRectTinyRounding
- optimized _AddRectTinyRounding to use less vertices
- changed _AddRectTinyRounding to use similar texturing logic as lines
- remove unused fractional line width texture
2026-10-07 18:53:51 +02:00
ocornut
4d5fcdd4ba DrawList: Textured Round Corners: use same array for fill and strokes.
Feels like a little less book-keeping.
2026-10-07 18:53:50 +02:00
ocornut
e3fb7657ba DrawList: renamed ImDrawFlags_StrokeCenterPixelAligned to ImDrawFlags_StrokeCenterAligned. 2026-10-07 18:53:50 +02:00
Mikko Mononen
170a374f59 DrawList: added ImDrawFlags_NoAAEnds which allows to disable line end AA. 2026-10-07 18:53:50 +02:00
ocornut
5d9b691248 DrawList: misc fixes, amends (replace uses of GetColorU32, macros fixes, default flags). Demo: added rotating square, added MiterOnly checkbox. 2026-10-07 18:53:50 +02:00
Mikko Mononen
c2e029fb98 DrawList: added stroke position to path rendering.
- added generic stroke position to all path rendering
- removed stroke folding in favor of limiting the miter width (simplifies the geometry cases)
- removed fractional stroke rendering in favor of using the integer sized rendering for everything
  - the rationale is that the in-between sizes are a bit blurry anyways, and the error we get from scaling is visually acceptable
- added stroke position option for the demo
- updated the degenerate shape handling
- remove AddLine() stroke pos handling
- removed up commented out code.
2026-10-07 18:53:50 +02:00
Mikko Mononen
d1d2f5aead DrawList: use dedicated larger texture for fractional thickness lines. 2026-10-07 18:53:50 +02:00
Mikko Mononen
ea2e5c79c0 DrawList: added square cap rendering.
- Added square cap rendering to the DrawPolyline, which can be turned on by ImDrawFlags_SquareCap
- Added draw flags to AddBezierCubic() and AddBezierQuadratic()
2026-10-07 18:53:50 +02:00
Mikko Mononen
858b2b2952 DrawList: added more robust AddConvexPolyFilled(). (#2183, #7972)
- add bevel handling for sharp corners
- add limit to the miter distance to avoid inner shape spikes
- add support for ImDrawFlags_MiterOnly to keep well behaved rendering fast
2026-10-07 18:53:50 +02:00
Mikko Mononen
049f1a799a DrawList: added special case rendering for the stroked rects when the raounding radius gets really small compared to the stroke thickness. 2026-10-07 18:53:50 +02:00
Mikko Mononen
6c7b083e0e DrawList: improved handling of rounded stroked rectangles, where rounding is less than stroke thickness. 2026-10-07 18:53:50 +02:00
Mikko Mononen
a5b8a920c3 DrawList: added better handling for rendering degenerate geometry. (#2183, #7972)
- Add ImDrawFlags_MiterOnly which is used to indicate that a path contains simple geometry and can be rendered using mitered corners
- Added handling of degenerated shapes for stroked rectangle, circle, ngon, and ellipse
- Render shapes filled when outline covers the whole shape
- Clamp very small circles and ngons, and use alpha fade below one pixel
- Added correct offset for ellipse
2026-10-07 18:53:50 +02:00