Mikko Mononen
484da7ed55
DrawList: added StrokePos flags: ImDrawFlags_StrokeInside, ImDrawFlags_StrokeOutside, ImDrawFlags_StrokeCenter, ImDrawFlags_StrokeLegacy.
2026-08-05 21:24:48 +02:00
Mikko Mononen
76184b6308
(Breaking) DrawList: removed half pixel offset from ImDrawList::AddLine()
...
- removed half pixel offset from ImDrawList::AddLine()
- added ImDrawList::AddHorizontalLine() and ImDrawList::AddVerticalLine() which draw line to the side of the specified line
- Change uses of AddLine() which were obviously vertical and horizontal to use the v and h lines
- Fixed layouting issues from above changes
- Changed primitives demo to use vline and hline
- Fixed angled header to match original
- Fixed separator line to match original
- Fixed caret to match original
- Fix separator vertical alignment
- Added stroke pos, which controls how stroke is draw relative to the shape
- Kept legacy mode which does 1/2px inset
- Added stroke pos support for Rect, Circle, Ngon, and Ellipse
- add stroke pos to hline and vline
- Added drawflag ImDrawFlags_TruncateCoords which allows to hint the renderer that the input is snapped to pixels (can disable AA in some cases)
- Implemented 9-slice renderer for rounded corners
- Remove ImDrawFlags_TruncateCoords flag in favor of detecting truncated coords.
- Renamed to AddLineH(), AddLineV()
- Removed ImDrawStrokePos, folded into ImDrawFlags
2026-08-05 21:24:48 +02:00
ocornut
11bd4e7731
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2026-08-04 14:34:04 +02:00
ocornut
2de0a07cd4
Fixed PVS Studio false positive.
2026-08-04 14:33:31 +02:00
ocornut
5108603789
DrawList: apply current pixel density to DrawList's fringe scale. Added ImDrawList::_SetPixelDensity(). Reword FontRasterizerDensity as CurrentPixelDensity.
...
Amend 94a4322 .
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_draw.cpp
# imgui_internal.h
2026-08-04 13:15:05 +02:00
ocornut
fdc1152281
(Breaking) Style: obsoleted style.CurveTessellationTol in favor of style.CurveTesselationMaxError.
...
cc #3127 , #3664 , #3665
2026-08-03 17:05:44 +02:00
ocornut
b647af2100
Fonts: AddFontDefault() uses framebuffer scale.
...
If running before DisplaySize is set, assume a different default on Apple.
2026-08-03 15:01:23 +02:00
ocornut
ebd752a0ec
Version 1.93.0 WIP
2026-08-03 14:42:56 +02:00
ocornut
b48d1afbe8
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2026-07-31 16:25:00 +02:00
ocornut
f1cc2ae15e
Version 1.92.9b
2026-07-31 16:14:42 +02:00
ocornut
e47e6b0d9d
Fonts: made GetDefaultCompressedFontDataProggyClean()/GetDefaultCompressedFontDataProggyForever() undocumented non-static. ( #9493 )
2026-07-30 16:03:42 +02:00
ocornut
b334d19b66
ImDrawData: fixed a regression in 1.92.9 where legacy ImDrawData::CmdListsCount was always 0.
2026-07-26 15:46:38 +02:00
ocornut
a9e7a8c880
ImDrawData: fixed a regression in 1.92.9 where legacy ImDrawData::CmdListsCount was always 0.
2026-07-26 15:42:48 +02:00
ocornut
9b4eb24cee
Merge branch 'master' into docking
2026-07-25 13:45:27 +02:00
ocornut
01380c5797
Version 1.92.9
2026-07-25 13:28:06 +02:00
ocornut
f31f98f4cd
ImDrawData: fixed late initialized field. (Amend 6f41d13)
...
Would effectively be initialized on use but best to clear on constructor.
2026-07-23 17:56:02 +02:00
ocornut
ca49eff398
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2026-07-22 15:46:24 +02:00
ocornut
b335bf4328
Added ImTextureData::QueueUserData for staged-rendering texture queues e.g. imgui_threaded_rendering.h. ( #8597 , #9136 )
2026-07-22 15:14:45 +02:00
ocornut
548389359c
(Breaking) ImDrawData: marked draw_data->CmdListsCount as obsolete. Use draw_data->CmdLists.Size.
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
2026-07-20 16:58:45 +02:00
ocornut
2af6dd9694
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_opengl3.cpp
# imgui.cpp
2026-06-04 13:53:55 +02:00
ocornut
6acba3b47d
ImDrawListSharedData: rename CircleSegmentMaxError to CircleTessellationMaxError. Remove misleading ArcFastRadiusCutoff assignment.
...
cc 051ce0765 , f107693d9 (3808)
2026-06-04 13:51:57 +02:00
ocornut
14278db024
Fonts: better document the fact that ImFontAtlas::Clear()/ClearFonts() functions are unlikely to be useful nowadays + fix tex->Updates[] ever-growing if ClearFonts() is called between frames.
2026-06-03 15:27:02 +02:00
ocornut
3b99fc4883
ColorButton: small rendering tweak/optimization for the alpha checkerboard.
...
Inverting the pattern means that for our typical 3x3 grid we don't need to draw 1+4 rounded rectangles, only 1.
This also fix the slightly rounding mismatch when switching from a=255 to a<255 paths.
2026-06-01 14:23:29 +02:00
ocornut
cac16b0d16
DrawList: rename ImDrawListFlags_NoTextPixelSnap -> ImDrawListFlags_TextNoPixelSnap. ( #3437 , #9417 , #2291 )
...
Amend 1d33ea9
2026-05-29 18:39:17 +02:00
ocornut
1d33ea939f
DrawList: added ImDrawListFlags_NoTextPixelSnap to disable snapping of AddText() coordinates for a given scope. ( #3437 , #9417 , #2291 )
...
This may evolve into a per-call ImDrawFlags option as well.
+ clip_rect.Max.y early out may be applied before truncation.
2026-05-29 18:12:11 +02:00
ocornut
12b7977555
Tweak CalcTextSize() awkward width rounding/ceiling code to reduce floating-point imprecisions altering the result by 1 even at relatively small width. ( #791 ) + apply same fudge factor to less important roundings.
...
ceilf() is still measurable e.g. ballpark +0.5 for 200k calls.
2026-05-28 19:19:11 +02:00
ocornut
4cb21e4a1e
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_win32.cpp
2026-05-28 15:46:34 +02:00
ocornut
33bb693b4c
DrawList: skip PathLineTo/PathStroke calls for common AddLine(), AddLineH(), AddLineV() functions. ( #4091 )
2026-05-28 15:37:29 +02:00
ocornut
783eba926f
Docs: retroactively amend 1.92.8 changelog about ImDrawFlags_Closed value.
...
Amend 6df50a0
2026-05-28 11:37:37 +02:00
qwer
ac07da2b5b
Fonts: Added macros to disable ProggyClean/ProggyVector separately. ( #9407 )
2026-05-27 16:50:53 +02:00
ocornut
fbcf95193f
ImFontAtlas: moved common TexData calls into a same helper functions, so adding new ones is easier.
2026-05-22 20:03:30 +02:00
ocornut
068e055510
Textures: extract ImTextureDataUpdateNewFrame() out of ImFontAtlasUpdateNewFrame(). ( #8465 )
2026-05-15 16:38:45 +02:00
ocornut
5a76f2adf1
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2026-05-15 15:14:52 +02:00
ocornut
c7767926ce
Version 1.92.9 WIP
2026-05-15 13:28:32 +02:00
ocornut
e0f5f9a14c
Amend AddRect(), AddPolyline() error detection to safely return an trigger error handling mechanism.
...
Amend 6df50a0667
2026-05-12 17:40:28 +02:00
ocornut
b61e56346a
Merge branch 'master' into docking
...
# Conflicts:
# imgui_demo.cpp
2026-05-12 16:43:34 +02:00
ocornut
8936b58fe2
Version 1.92.8
...
Include minor bits: adjust activeid logging, tweak comments.
2026-05-12 16:30:30 +02:00
ocornut
73afb6b6e6
Fonts: clarify that ClearFonts() be useful over calling Clear().
2026-05-11 17:45:59 +02:00
ocornut
b8f6c51af7
Fonts: move ClearFonts(), ClearInputData(), ClearTexData() implementation (no other changes)
2026-05-11 17:42:08 +02:00
ocornut
eb453f2be6
Checkbox, Style: added ImGuiCol_CheckboxSelectedBg. ( #9392 )
2026-05-11 14:30:34 +02:00
ocornut
c51f1a6e47
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# imgui.cpp
2026-05-07 16:59:11 +02:00
ocornut
6df50a0667
(Breaking) DrawList: swapped the last two arguments of AddRect(), AddPolyline(), PathStroke(). thickness<>flags.
...
Added inline redirection functions when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is off.
Marked the old functions are =delete when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is on, to allow for better type-checking.
The aim is to be able to use/add flags to more ImDrawList functions, and making existing functions consistents was deemed very desirable.
2026-05-07 16:37:57 +02:00
ocornut
976c5c0f3a
Textures: extract ImTextureDataQueueUpload() out of ImFontAtlasTextureBlockQueueUpload() ( #8465 )
...
Not atlas specific, in support of texture system.
2026-05-06 16:19:39 +02:00
ocornut
310f3c8370
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_metal.h
# backends/imgui_impl_metal.mm
# imgui.cpp
2026-05-06 12:30:38 +02:00
Mikko Mononen
691b89baae
ImDrawList: added AddLineH(), AddLineV() helpers. ( #9360 )
...
This commit is aimed to be a lossless transform. Further layout fixes in subsequent commits.
2026-04-28 17:04:54 +02:00
ocornut
a31071573b
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_dx10.cpp
# backends/imgui_impl_dx11.cpp
# backends/imgui_impl_dx12.cpp
# backends/imgui_impl_dx9.cpp
# backends/imgui_impl_metal.h
# backends/imgui_impl_metal.mm
# backends/imgui_impl_opengl2.cpp
# backends/imgui_impl_opengl3.cpp
# backends/imgui_impl_sdl3.cpp
# backends/imgui_impl_sdlgpu3.cpp
# backends/imgui_impl_sdlrenderer2.cpp
# backends/imgui_impl_sdlrenderer2.h
# backends/imgui_impl_vulkan.cpp
# imgui.cpp
2026-04-23 22:11:04 +02:00
ocornut
82f46a73f8
(Breaking) Moved ImDrawCallback_ResetRenderState -> ImGui::GetPlatformIO().DrawCallback_ResetRenderState + added room in ImGuiPlatformIO for more standard backend-agnostic draw callbacks. ( #9378 )
2026-04-23 21:50:41 +02:00
ocornut
329c5a6b3b
Merge branch 'master' into docking
...
# Conflicts:
# backends/imgui_impl_metal.mm
# backends/imgui_impl_sdl2.cpp
2026-04-16 15:29:57 +02:00
ocornut
3cd8683061
Fonts: assert when using MergeMode with an explicit size over a target font with an implicit size, as scale factor are likely erroneous. ( #9361 )
2026-04-13 16:45:18 +02:00
ocornut
f83a378d62
TabBar: changed edge's TabItem ClipRect to not pass an inverted PushClipRect().
...
While not currently a problem, it would be if ImRect::Overlaps() is changed to use <= instead of < (cc: #3976 which deal with Contains but sort of similar topic).
Changing ImDrawList::PushClipRect()'s intersect_with_current_clip_rect path to use ClipRectFull() would also fix this, but it may ambiguous there which behavior would be correct.
Amend 1ec464eb9 .
2026-04-13 14:11:19 +02:00