Commit Graph

2957 Commits

Author SHA1 Message Date
Mikko Mononen
05730c3cd4 DrawList: path rendering optimizations.
- added ImRsqrtPrecise() which adds Newton-Raphson iteration for more precision
- change calculation of miter_scale_factor so that it does not have a branch
- renamed IM_POLYLINE_APPEND_* macros to IM_APPEND_* and also use them in fill convex poly
- changed the convex poly miter calculation to match the polyline to make debugging and changes easier
- split the convex poly to separate loop when ImDrawFlags_MiterOnly is specified for less branches in common case

# Conflicts:
#	imgui_draw.cpp
2026-08-05 21:24:51 +02:00
Mikko Mononen
4c017c67e9 DrawList: use dedicated larger texture for fractional thickness lines. 2026-08-05 21:24:51 +02:00
ocornut
753cb8474d DrawList: added _GetStrokePos() helper indirection, made flags=0 select default at runtime. 2026-08-05 21:24:49 +02:00
Mikko Mononen
456858d50f DrawList: Textured Round Corners: implemented faster render path for stroked rectangles. (1962)
- added check to render simpler geometry when (stroked) rectangle has integer coords
- render non.rounded with 4 non-AA rectangles
- added textures for corners of 1-3 thickness and 1-16 rounding
- use textured corners when possible, or fallback to generic one
2026-08-05 21:24:48 +02:00
Mikko Mononen
ba66bdab22 DrawList: Textured Round Corners: first version. (1962) 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
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
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
448ef2baa9 DragXXX, SliderXXX: fixed a regression in 1.92.9 where clicking a previously Ctrl+Clicked field would flick it to text edit mode for a frame. (#9476, #701) 2026-07-31 13:09:40 +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
f594633b54 Popups: added bool return value to OpenPopup(), OpenPopupOnItemClick() functions. (#9429)
Following on 795cf6fcb5.
2026-07-23 17:49:39 +02:00
ocornut
ca49eff398 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
2026-07-22 15:46:24 +02:00
ocornut
e4f7c5c722 Disabling ImGuiItemFlags_LiveEditOnInputScalar by default! (#9476, #701) 2026-07-20 14:26:57 +02:00
ocornut
93bd4f0adb Merge branch 'master' into docking
# Conflicts:
#	.github/workflows/build.yml
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl2.cpp
#	examples/example_apple_metal4/main.mm
#	imgui.cpp
2026-07-16 15:56:36 +02:00
ocornut
26b8292635 Split ImGuiItemFlags_LiveEdit into ImGuiItemFlags_LiveEditText, ImGuiItemFlags_LiveEditScalar. Added Demo contents. (#9476, #701)
cc #3936, #3946, #5904, #6284, #8149, #8065, #8665, #9117, #9299, #700, #1351, #1875, #2060, #2215, #2380, #2550, #3083, #3338, #3556, #4373, #4714, #4885, #5184,#5777, #6707, #6766, #8004, #8303, #8915, #9308
2026-07-16 15:46:47 +02:00
ocornut
c958f16059 EndGroup: fixed reporting combined Edit when it happens at the same time as tabbing to next ActiveId. (#9476, #701) 2026-07-16 15:46:43 +02:00
ocornut
4853f5c96b Internals: rename NextItemData.ItemFlags -> ItemFlagsSet 2026-07-16 15:46:40 +02:00
ocornut
18d63b12be Added ImGuiItemFlags_LiveEdit flag, and much-awaited support for disabling it. (#9476, #701)
cc #3936, #3946, #5904, #6284, #8149, #8065, #8665, #9117, #9299, #700, #1351, #1875, #2060, #2215, #2380, #2550, #3083, #3338, #3556, #4373, #4714, #4885, #5184,#5777, #6707, #6766, #8004, #8303, #8915, #9308
2026-07-16 15:39:53 +02:00
ocornut
2392a52660 InputText: tag InputTextDeactivatedState with an elapsing frame. Avoid unnecessary InputTextDeactivateHook() call on manual deactivation. InputTextDeactivateHook() only takes a record when Edited + callback marks edited. (#9476, #701)
for _NoLiveEdit it's easier than we don't use IsItemDeactivatedAfterEdit() in InputText()'s `if (g.InputTextDeactivatedState.ID == id)` block.
2026-07-16 15:39:52 +02:00
ocornut
a23e9fb1b5 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
2026-07-08 15:10:22 +02:00
ocornut
68fce9f3bd Settings: added DiscardAll option to CleanupIniSettings() / ImGuiSettingsCleanupArgs. (#9460)
+ Demo: tweak for scaling.
2026-07-08 15:03:19 +02:00
ocornut
112d6d9eab Settings: added a type name filter to CleanupIniSettings() / ImGuiSettingsCleanupArgs. Amends. (#9460)
Request hash because storing const char* strings in struct is not entirely zen. Amend 2c49da4.
2026-07-07 22:30:15 +02:00
ocornut
2c49da44be Settings: added a type name filter to CleanupIniSettings() / ImGuiSettingsCleanupArgs. (#9460) 2026-07-07 22:18:01 +02:00
ocornut
d1eb8d031c Settings: added explicit DiscardWhenMissingDate. (#9460, #9108) 2026-07-07 22:00:26 +02:00
ocornut
0e479b9554 (Breaking) ColorEdit: obsoleted SetColorEditOptions() function in favor of poking to style.ColorEditFlags. 2026-07-06 15:34:13 +02:00
ocornut
4be08b1ecf Docking: minor packing of AuthorityForXXX fields. 2026-07-03 17:07:17 +02:00
ocornut
d098bf9657 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
2026-07-03 16:59:31 +02:00
ocornut
5fb77dfde1 Settings: added io.ConfigIniSettingsAutoDiscardMonths, trimming tool in in Metrics->Settings + internal CleanupIniSettings(). (#9460)
cc #437 #2564
2026-07-03 16:36:46 +02:00
ocornut
f7e8343ee9 Settings, IO: added io.ConfigIniSettingsSaveLastUsedDate, platform_io.Platform_SessionDate, IMGUI_DISABLE_TIME_FUNCTIONS(). (#9460)
cc #437
2026-07-03 16:36:45 +02:00
ocornut
0edad6d097 Internals: track WasSelected/WasSoleSelected data for ActiveId. (#8337) 2026-07-01 18:53:27 +02:00
ocornut
76f5be2749 Settings: minor struct packing. 2026-06-25 22:59:51 +02:00
ocornut
5098ce161d Merge branch 'master' into docking 2026-06-25 15:48:42 +02:00
ocornut
60fbdbb8d8 Multi-Select: reworked ImGuiMultiSelectFlags_NoAutoSelect as it carried side-effects that were hardcoded/designed to use multi-selection on checkboxes. (#9391) 2026-06-25 14:13:13 +02:00
ocornut
0e355af09e RenderNavCursor: take rounding as input. Removed ImGuiNavRenderCursorFlags_NoRounding.
Toward #7589
2026-06-24 18:34:30 +02:00
ocornut
64a3e726a8 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
2026-06-24 16:03:19 +02:00
ocornut
ec69495ca8 Tables: fixed some cases of reconcile/load handling when using duplicate identifiers. (#9108) 2026-06-24 16:01:44 +02:00
ocornut
b522576054 Tables: tracking topology changes by default. Match by ID then in sequential order for remaining. (#9108, #4046)
Removed ImGuiTableFlags_TrackTopologyChanges.
2026-06-24 16:01:43 +02:00
ocornut
570c0e03b7 Tables: extract part of TableLoadSettingsForColumns() into TableLoadSettingsForColumn(). (#9108) 2026-06-24 15:52:16 +02:00
ocornut
2f94e7dc13 Tables: add support for ImGuiTableFlags_TrackTopologyChanges (#9108, #4046) 2026-06-24 15:50:17 +02:00
ocornut
13fc81fc82 Tables: fixes incorrect forward declaration for a missing function + fixed tooltip comment. (#9445, #9448) 2026-06-17 12:53:36 +02:00
ocornut
036bf939b6 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2026-06-16 15:26:09 +02:00
ocornut
138c0e6c7d Added IM_DEBUG_BREAK() handler for GCC+AArch64/ARM64. 2026-06-15 19:32:56 +02:00
ocornut
b46a37eac9 Tables: comments about misleading TableSetupColumn() user_id parameter, renamed to user_data.
ImGuiTableColumnSortSpecs::ColumnUserID should be changed to ColumnUserData.
2026-06-15 19:05:38 +02:00
ocornut
721da6a34c Tables: apply queued requests in TableUpdateLayout()
To allow calling TableQueueSetColumnDisplayOrder() between TableSetupColumn() and between TableUpdateLayout()

# Conflicts:
#	imgui_tables.cpp
2026-06-15 18:24:43 +02:00
ocornut
94a3dcc5fa Tables: tweaked debug tools + minor data packing in in ImGuiTableColumn 2026-06-15 16:15:39 +02:00