Commit Graph

533 Commits

Author SHA1 Message Date
ocornut b5a2bd1a5b Backends: amends to 1db1066 + merge minor bits from docking incl SetActiveIdUsingNavAndKeys().
No need to clear fields before deletion. DX12: renamed to match docking branch.
2021-06-29 15:25:19 +02:00
ocornut 95db098477 ImFontAtlas: move implicit AddFontDefault call to Build() function + remove unnecessary asserts in backend. 2021-06-25 17:27:17 +02:00
ocornut 9440974f66 Fonts: Add U+FFFD ("replacement character") to default asian glyphs ranges. Remove SetFallbackChar() (amend 0ffd99d31). (#4269) 2021-06-25 15:47:42 +02:00
ocornut 38165f420f Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269) 2021-06-25 15:44:14 +02:00
ocornut e534c56485 Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels. 2021-06-24 17:15:14 +02:00
ocornut dc676236f0 Minor optimization, removing do/while(0) patterns in some cases as they translate to runtime
(e.g. translate to xor + test + jne in VS x84, unnecessary)
2021-06-15 17:05:25 +02:00
ocornut 0cca0d1617 Internals/experimental: BeginComboPreview(), EndComboPreview(). (#4168, #1658)
(amended)
2021-06-15 15:27:28 +02:00
ocornut d0c6dd9baf ImVector: added clear_delete(), clear_destruct() helpers. 2021-06-09 16:57:47 +02:00
ocornut e31d13fa76 Version 1.84 WIP 2021-05-25 13:36:53 +02:00
ocornut ad5d1a8429 Version 1.83 2021-05-24 17:39:25 +02:00
Bartosz Taudul 4c9f0cec27 Add and use SSE-enabled ImRsqrt() in place of 1.0f / ImSqrt(). (#4091)
Squashed 3 commits.
2021-05-06 17:27:19 +02:00
ocornut 89162a04f4 Fixes for PVS Studio and MSVC static analyzers. Using a macro to suppress single-use MSVC false positives. (#3938, #4073) 2021-04-29 21:20:32 +02:00
ocornut d28535f351 Fixes for Visual Studio 2019 static analyzers. (#3938, #4073) + two minor edge case were invalid scalar input (e.g. a sign only) would return buffer as modified. 2021-04-29 17:10:27 +02:00
Nick Lange 04e98fbe6b
Remove const qualifier on ImTextureID local (#4060)
When defining ImTextureID to a type such as Texture*, the const-qualifier here stops us from using the texture ID. const Texture* is not valid to be pushed as a texture ID anymore.
2021-04-26 10:15:55 +02:00
ocornut 25fbff2156 ImDrawList: Revert alteration of normal scaling threshold, for now prioritize preserving property of limiting extents. (#4053, #3366, #2964, #2868, #2518, #2183)
Amend fdda8b8
2021-04-19 14:58:54 +02:00
ocornut fdda8b8c12 ImDrawList: Fixed/improved thickness of thick strokes with sharp angles. (#4053, #3366, #2964, #2868, #2518, #2183) 2021-04-19 14:03:21 +02:00
thedmd 690a90bd35 Make PathArcTo accept counter-clockwise angles (#4030, #3491) 2021-04-15 16:09:38 +02:00
ocornut 7c9c5dbe9a Internals: Added ImFloorSigned() + use our own ImFloorSigned() for stb_truetype, compared as matching output for variety of font data. (#2884) 2021-04-15 14:27:45 +02:00
ocornut b957300260 Documentation tweaks (#4042) 2021-04-14 15:46:55 +02:00
ocornut a1a39c632a Version 1.83 WIP 2021-03-16 14:45:30 +01:00
ocornut 35b1148efb Version 1.82 2021-03-15 20:26:48 +01:00
ocornut 033dfd9d35 ImDrawFlags: rework/revert c2d6d26 + 39432bf in a way that is closer to old version and back to opt-in but with default 0 = all corners. 2021-03-12 16:31:46 +01:00
ocornut 39432bfd9c Amend 0c93238a ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:45 +01:00
Rokas Kupstys c2d6d26139 ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:32 +01:00
thedmd e45847d99a Add version of PathArcTo() and PathArcToFast() with adaptive rendering quality. (#3491) 2021-03-11 11:23:55 +01:00
ocornut 8ed34af6f8 ImDrawList: clarified that PathArcTo()/PathArcToFast() cannot take radius < 0.0f. (#3491) + changed poor-man ceiling in _CalcCircleAutoSegmentCount() to use 0.999999f to reduce gaps
Previously it sorts of accidentally worked but would lead to counter-clockwise paths which and have an effect on anti-aliasing.
2021-03-11 10:51:20 +01:00
Rokas Kupstys 01a2bac7d5 DrawList: Replace "bool close" in drawing functions with flags. 2021-03-10 12:57:01 +01:00
ocornut 3e6dfd3c1a ImDrawList: AddImageRounded() compare texid from cmdheader as with other functions. + Made the ImGuiMemAllocFunc / ImGuiMemFreeFunc consistent with our other typedefs (#3836) 2021-03-04 14:29:01 +01:00
ocornut 23ab4978e4 ImFontAtlas: Added 'bool TexPixelsUseColors' output to help backend decide of underlying texture format. (#3369, #3844) 2021-03-02 15:04:34 +01:00
ocornut fb15d8c858 Improve on automatic circle segment count calculation. (#3808) Amends 2021-02-17 14:22:31 +01:00
thedmd f107693d9b Improve on automatic circle segment count calculation. (#3808) 2021-02-17 12:55:39 +01:00
ocornut 30b7545841 Version 1.82 WIP 2021-02-15 18:10:14 +01:00
ocornut 4df57136e9 Version 1.81 2021-02-10 21:16:58 +01:00
ocornut 56f7bdae99 ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert. Fixed PathArcToFast() handling of a_min > a_max. 2021-02-08 16:37:51 +01:00
ocornut 03038df1cc ImDrawList: fix divide by zero (for which result was unused but triggering on some archs/setup) added by f144c67676 (#3738) 2021-02-08 14:03:24 +01:00
ocornut 24be26e00e imgui_freetype: Add support for colored glyphs. Font: add support for untinted glyphs (#3369)
Amend 9499afd with missing static inline.
2021-02-01 16:32:26 +01:00
Petr Shurgalin 24aa6654df imgui_freetype: add support for colored glyphs with ImGuiFreeTypeBuilderFlags_LoadColor (#3369)
(squashed 4 commits)
2021-02-01 16:32:23 +01:00
ocornut 9499afdf5e imgui_freetype: clarify breaking changes, and add BuildFontAtlas() to be consistent with planned obsolescence. Rename mislabelled internal helper. Demo: clarify labels in nested table demo. (#3765) 2021-01-28 20:53:53 +01:00
ocornut 3867c6c5f0 Fonts: (Breaking) Rename ImGuiFreeType:: flags to ImGuiFreeTypeBuilderFlags_XXX. Remove ImGuiFreeType::BuildFontAtlas() flags. Rename ImFontConfig::RasterizerFlags to FontBuilderFlags. Add ImFontBuilderIO (opaque). Amend 53d59f3 with a dozen of small fixes. 2021-01-26 17:25:09 +01:00
Louis Schnellbach 9417acc20f Fonts: if IMGUI_ENABLE_FREETYPE, use library by default for font rasterization
Also renamed IMGUI_DISABLE_STB_TRUETYPE to IMGUI_ENABLE_STB_TRUETYPE
2021-01-26 17:23:11 +01:00
ocornut 2ed47e5822 Version 1.81 WIP 2021-01-25 16:30:44 +01:00
ocornut f144c67676 ImDrawList: fixed AddCircle, AddCircleFilled buffer read overflow with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
Amend 051ce076. Maximum cached count becomes 63 instead of 64.
2021-01-25 14:59:09 +01:00
ocornut 58075c4414 Version 1.80 2021-01-21 20:36:18 +01:00
thedmd 94a432275b ImDrawList: Internals: Add ability to scale anti-alias fringe. This enable users to keep geometry sharp while scaling vertex buffer content. 2021-01-05 16:34:11 +01:00
ocornut 9bcf77eb81 Fixed using IsItemEdited() after Combo() not matching the return value from Combo(). (#2034) + fix some PVS warnings, fix typo, blanks.
Amend e28b1078
2021-01-04 19:15:20 +01:00
ocornut b015ea93fd Style tweaks, disabled default window rounding by default, reduced size of resize grip, made less prominent, increased WindowBg alpha in classic style.
TestEngine: Fixed Checkbox() not reporting its checkable state when clipped.
2020-12-24 18:31:51 +01:00
ocornut 4d8e839ddf Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(), ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). (#3127, #3664, #3665)
Renamed corresponding internal functions as well.
2020-12-21 17:13:36 +01:00
ocornut 550bfcfc59 Amend defce31 Add ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() (#3127, #3664, #3665) 2020-12-21 16:30:10 +01:00
Aiekick defce31c2e Add ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() (#3127, #3664, #3665) 2020-12-21 16:25:14 +01:00
ocornut 6e38026627 Tables: changelog. removed TableGetHoveredColumn() from public API in favor of using TableGetColumnFlags(). renamed ImGuiTableSortSpecsColumn to ImGuiTableColumnSortSpecs. 2020-12-04 19:15:27 +01:00