Commit graph

732 commits

Author SHA1 Message Date
ocornut
52bea181f6 Shadows: Fix broken shadows due to zero-clear added in 9417acc2 2025-03-03 19:04:33 +01:00
ocornut
c9729b4388 Shadows: Fix to support for colored-only font atlas. (4202) 2025-03-03 19:04:33 +01:00
ocornut
694792db77 Shadows: Fix for latest, reuse ImDrawList, remove ImDrawShadowFlags. 2025-03-03 19:04:33 +01:00
ocornut
0133b62781 Shadows: Fixes + two fixes for PVS Studio static analyzer. 2025-03-03 19:04:33 +01:00
omar
ea0f0d81cd Shadows: Shallow styling tweaks and renaming for consistency. 2025-03-03 19:04:33 +01:00
omar
ed16f8fe6b Shadows: Re-added AddShadowNGon(). 2025-03-03 19:04:33 +01:00
omar
ef807b6671 Shadows: Added ImDrawShadowFlags, simplified API surface, reordered parameters
+ fix minor warnings
+ removed NGon variant for now.
2025-03-03 19:04:33 +01:00
Ben Carter
0e83ee2c63 Shadows: Convex shape shadow improvement/fixes
Fixed pixel cracking on convex shadow edges
Added convex shadow offset support
Fixed some convex shadow fringing issues
Added convex shadow demo code

# Conflicts:
#	imgui_demo.cpp
2025-03-03 19:04:33 +01:00
omar
ee4fb609eb Shadows: Tweak demo to use AddShadowCircle() functions + fix warnings.
(+ stripped old polygon generation code from commits)
# Conflicts:
#	imgui_demo.cpp
2025-03-03 19:04:32 +01:00
Ben Carter
e1fb724234 Shadows: Added initial version of convex shape shadow code.
(+stripped out of original polygon generation demo, moved to imgui_dev)
2025-03-03 19:04:32 +01:00
ocornut
9f3087b5e7 Shadows: Demo code in Custom Rendering section. Added AddShadowRectFilled() variant. BeginMainMenuBar() disable shadows. 2025-03-03 19:04:32 +01:00
Ben Carter
35f1982b86 Shadows: Added experimental texture-based shadows (stripped of dynamic tex config and back-end code)
(merged 10 commits, removing dynamic tex config, moved tex config to internal structs, removed back-end changes)

Shadows: Added  IMGUI_HAS_SHADOWS
2025-03-03 19:04:32 +01:00
ocornut
4c0604ec2e Font: shallow refactor, rename ConfigData[] fields to Sources[], ConfigDataCount to SourcesCount.
In theory this is all internal stuff.
2025-02-25 17:41:29 +01:00
ocornut
6dc376f676 ImFontAtlas: added software/drawlist version of ImGuiMouseCursor_Wait/ImGuiMouseCursor_Progress + moved GetMouseCursorTexData() to internals. 2025-02-20 12:17:21 +01:00
ocornut
85c488ee12 Hot-fix for broken MouseDrawCursor support for ImGuiMouseCursor_Wait/ImGuiMouseCursor_Progress/ImGuiMouseCursor_NotAllowed.
Amend 8a35386, eec097f.
2025-02-20 11:46:56 +01:00
ocornut
78ec1272e9 ImDrawList: added InitialFringeScale in ImDrawListSharedData. Default to 1.0f.
This is to allow some DPI mods with less changes. Only the initial value in SetupDrawListSharedData() will need change.
2025-02-17 11:28:35 +01:00
ocornut
474305c476 ImFont: simpler constructor. 2025-02-14 16:15:09 +01:00
ocornut
914fbcf2e5 Fonts: removed unnecessary const qualifier from ImFont::FindGlyph()
Amend 0bde57c
2025-02-07 16:26:20 +01:00
ocornut
cfed18afc7 Add ImFontConfig::GlyphExtraAdvanceX as a replacement for GlyphExtraSpacing.x (#242)
Partly restore 1a31e31.
2025-02-06 12:34:37 +01:00
ocornut
1a31e31ae9 (Breaking) Fonts: removed ImFontConfig::GlyphExtraSpacing option which seems largely obsolete and unused. (#242) 2025-02-03 17:55:35 +01:00
ocornut
de962e83d0 ImFont: remove SetGlyphVisible()
Which was never marked public. Added by d284a6cff. (#2149, #515)
Making room by removing stuff that are inconvenient to implement in our scaling system.
If you were using this function please post an issue to report it.
2025-02-03 17:50:12 +01:00
ocornut
f820bf7cd4 Version 1.91.9 WIP 2025-02-03 12:33:40 +01:00
ocornut
dbb5eeaadf Version 1.91.8 2025-01-31 16:08:17 +01:00
ocornut
96e3b147f0 Fixed build with IMGUI_ENABLE_FREETYPE (#8346) 2025-01-25 01:14:46 +01:00
ocornut
afb6e9a879 Fonts: OversampleH auto-selection uses 36 as heuristic for now. 2025-01-24 20:03:04 +01:00
ocornut
8a1613a382 Fonts: OversampleH/OversampleV value defaults to 0 for automatic selection. 2025-01-24 19:32:30 +01:00
ocornut
9eafb7bbfb ImFont: IndexLookup[] table hold 16-bit values even in ImWchar32 mode. 2025-01-24 16:54:59 +01:00
ocornut
10199341b1 ImFontAtlas: made calling ClearFonts() call ClearInputData(). (#8174, #6556, #6336, #4723) 2025-01-23 11:31:32 +01:00
ocornut
e8779a67b1 Font: direct AddText()/RenderText() calls don't need to call strlen() if below clipping region.
Unlikely to meaningful affect anyone but still..
2025-01-20 18:00:03 +01:00
ocornut
487d7f9a29 Font: Internals: make used page maps smaller. Since it's extremely rarely used and for iterations only. ~34->16 bytes with ImWchar32. 2025-01-16 22:30:43 +01:00
ocornut
c59a2267d0 Version 1.91.8 WIP 2025-01-15 11:58:47 +01:00
ocornut
5c1d2d1e4c Version 1.91.7 2025-01-14 13:29:25 +01:00
ocornut
c7983115e9 Fonts: Further tweaks for Ellipsis ("...") character width when automatically created from a single comma character: use AdvanceX as min. 2025-01-08 18:27:01 +01:00
ocornut
90094a871a Fonts: Fixed miscalculation of Ellipsis ("...") character width when automatically created from a single comma character. 2025-01-08 18:13:53 +01:00
ocornut
006721fbd6 Added ImFontAtlas section index in comments + minor tweaks to DX12 backends. 2024-12-20 22:56:05 +01:00
ocornut
457fae24e7 Silence more zealous GCC warning. (#8241) 2024-12-18 18:13:55 +01:00
Raffaello Bertini
cd6c83cdcc Fixes GCC warnings (#8241) 2024-12-18 17:58:19 +01:00
ocornut
1d069cf435 Fonts: store 0 for unset EllipsisChar/FallbackChar. Pull config in BuildLookupTable(). 2024-12-11 16:43:29 +01:00
ocornut
f25665f360 Version 1.91.7 WIP 2024-12-11 15:37:16 +01:00
ocornut
993fa34749 Version 1.91.6 2024-12-11 15:05:36 +01:00
ocornut
19a1f2a5d2 Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted in surface area. (#8107) 2024-11-29 18:58:01 +01:00
ocornut
20360e00ce Merge miscellaneous small changes to reduce drift with texture update branch.
- ImGuiDebugLogFlags_EventFont is yet unused.
2024-11-20 21:46:47 +01:00
ocornut
551b6c4d66 Tools: binary_to_compressed_c: added -u8/-u32/-base85 export options. 2024-11-20 14:32:44 +01:00
ocornut
d0e870aad2 Misc: changed embedded ProggyClean encoding to save a bit of binary space (~12kb to 9.5kb). (#8161)
Encoding as char to ensure compatibility with big endian (#81)
2024-11-20 14:16:34 +01:00
chuikingshek
5ae3dd52a0 Fonts: added IMGUI_DISABLE_DEFAULT_FONT macro. (#8161) 2024-11-20 13:45:42 +01:00
ocornut
3381ab423b Version 1.91.6 WIP + fixed typo in tooltip. 2024-11-12 11:56:21 +01:00
ocornut
f401021d5a Version 1.91.5 2024-11-07 19:57:33 +01:00
ocornut
31b967f098 Fix 01d27a4 (sorry I cherry-picked from wrong branch) 2024-11-07 19:35:00 +01:00
ocornut
01d27a4acd Internals: added IM_LIKELY(), IM_UNLIKELY() helper macros (yet unused). Added ImFontGetCharAdvanceX() macro. 2024-11-07 19:33:25 +01:00
ocornut
17bd417a3d AddCustomRectFontGlyph: added storage for Colored bool in ImFontAtlasCustomRect. (#8133) 2024-11-07 14:58:15 +01:00