1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-14 19:17:48 +01:00
Commit Graph

614 Commits

Author SHA1 Message Date
omar
5b699517d4 Internals: PaintVerts** renamed to ShadeVerts**, moved to imgui_draw.cpp and exposed in imgui_internal.h (+1 squashed commits) 2017-10-19 19:42:19 +02:00
omar
e32569dd5a ImDrawList: Fixed a bug in ChannelsMerge() leading to an extraneous draw call being created, which unexpectly led to more dramatic condition but to faulty draw command merging code. (#1172, #1368) 2017-10-15 21:07:22 +02:00
Dominik Tugend
7a8eb5bdc9 Rendering issue fix
Fixes ocornut/imgui#1172
2017-10-15 19:27:53 +02:00
Anthony Pesch
c38526d14b Completely clear font when rebuilding atlas.
Previously, IndexLookup was not cleared on each font, causing FindGlyph to return old glyphs when using MergeMode.
2017-10-01 23:40:29 -04:00
omar
09f6f564d9 ImFontAtlas: Fixed calling Clear() and rebuilding (broken in 3fe2ecfd4c) thanks @pdoane @mikesart 2017-09-27 11:21:42 +02:00
omar
3fe2ecfd4c ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas / and map them as font glyphs 2017-09-26 20:24:27 +02:00
omar
9e1ad7295f ImFont: Renamed (supposedly internal) fields (e.g. XAdvance to AdvanceX). Custom text renderers might be affected if they didn't use the GetCharAdvance() helper function. 2017-09-26 20:05:16 +02:00
omar
10bb9524eb ImFont: Renamed ImFont::Glyph to ImFontGlyph (for consistency and so ImFontAtlas types can use it without ordering half of the file). Left a redirection type. 2017-09-26 19:54:30 +02:00
omar
072d6d8cb5 ImFontAtlas: Refactored internals API to 1) avoid building lookup table multiple times for merged fonts + 2) allow the mapping of custom icons inside fonts (wip, uncommited) 2017-09-26 19:26:16 +02:00
omar
2170b0b278 ImFontAtlas: Comments and minor reorganization of declaration in header file. 2017-09-26 19:10:29 +02:00
omar
529ca279a4 ImFont: Split some building code into a AddGlyph() helper (that custom rect code and imgui_freetype can use) 2017-09-26 18:41:21 +02:00
omar
ba12d37719 Merge pull request #1324 from waywardmonkeys/improve-clang-warnings
FIxes zealous Clang warning.
2017-09-19 18:18:53 +02:00
omar
709653c330 Merge branch 'master' into styles 2017-09-18 15:03:25 +02:00
Bruce Mitchener
4c794be41d Improve warning configuration for clang.
Clang 4.0 introduced -Wdouble-promotion, so check for and disable
that on clang as we do on gcc.

The old style casts warning is already disabled globally in this file
for clang, so it doesn't need to be re-disabled within this scope.
2017-09-14 10:28:18 +07:00
omar
65632d2682 Fixed alloca include for SunOS (#1319) 2017-09-12 11:55:13 +02:00
Daniel Loffgren
cf6ba9dd2d Don't do a bunch of OS gymnastics. alloca.h is only for glibc, everyone else uses stdlib.h 2017-09-11 00:15:43 -07:00
omar
0ba3cadb88 RenderRectFilledRangeH() can't use cheap acosf() approximation for now. (#1296) 2017-08-29 15:25:05 +08:00
omar
01d4bf299a Added overcomplicated RenderRectFilledRangeH() to fix rounded progress bar, which will also help for range widgets and perhaps sliders grabs over rounded areas. (#1296, #76) 2017-08-29 15:22:30 +08:00
omar
f0fa17b5e0 ImDrawList: Minor renaming 2017-08-29 15:10:03 +08:00
omar
808d631e35 imDrawList: PathArcTo() returns when passed zero radius. 2017-08-28 16:02:25 +08:00
omar
e1d81f4dc5 ImDrawList: Minor tidying up. 2017-08-28 14:12:55 +08:00
omar
1f51e8f39d Internals: Renamed some ImGuiCorner enums. 2017-08-28 14:11:11 +08:00
omar
f72ca6d22c ImFontConfig: Added RasterizerMultiply option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some. Added RasterizerFlags for custom rasterizer flags (aka imgui_freetype) 2017-08-26 14:11:56 +08:00
omar
304de0ee1b ImFontConfig: Comments, const. 2017-08-26 14:11:41 +08:00
omar
40f608ce9b Version 1.52 WIP 2017-08-25 15:12:12 +08:00
omar
55a6209931 Version 1.51 2017-08-25 00:29:59 +08:00
omar
bc78535bbf Merge branch 'master' of https://github.com/ggtucker/imgui into ggtucker-master
# Conflicts:
#	imgui.cpp
#	imgui.h
2017-08-20 18:22:34 +08:00
omar
1065a7b95b ImFontAtlas::AddFontDefault: Made it possible to override size (even if it isn't really recommended) 2017-08-20 15:38:05 +08:00
omar
8be7a60f20 ImFontAtlas: Re-arranging code to simplify implementation of imgui_freetype. (#618) 2017-08-17 21:19:54 +08:00
omar
1086c87767 ImFontAtlas: Re-arranging code to simplify implementation of imgui_freetype. (#618) 2017-08-17 21:13:14 +08:00
omar
4075cc58e9 ImFontAtlas; Re-arranging code to simplify implementation of imgui_freetype (#618) 2017-08-17 20:44:44 +08:00
omar
d970957e2d ImFontAtlas: Draft of an api to submit custom rectangle (not exposed). Atlas default texture chunk using it. (WIP: we are still storing mouse UV outside in GImGui) 2017-08-17 19:36:48 +08:00
omar
24a78767d2 Merge branch 'master' into styles
# Conflicts:
#	TODO.txt
2017-08-17 17:24:33 +08:00
omar
4a7e1ff4d4 ImFontAtlas: Some shallow renaming + added an assert for clarification 2017-08-17 15:35:59 +08:00
omar
0be4f66d89 ImFontAtlas: Shuffling some code inside Build() to make upcoming diffs less confusing (nb: we might break compat with forks of Build() like #618) 2017-08-17 11:46:25 +08:00
James Wallis
9239e91dc9 Whitespace fix to previous 2017-08-15 14:12:32 +01:00
James Wallis
718f00d651 Make font atlas packing padding configurable 2017-08-15 14:11:04 +01:00
omar
18b50f8eba Comments 2017-08-15 11:41:36 +08:00
omar
f8f382221c ImVector: added resize() variant with initialization value 2017-08-15 11:41:00 +08:00
omar
7b7845d764 ImFont::CalcWordWrapPositionA: minor optimization 2017-08-14 21:00:44 +08:00
omar
d258287c92 Revert d2c219d #826 + tidying up ImFont::RenderChar() 2017-08-14 16:53:38 +08:00
omar
d2c219df84 Merge pull request #826 from swetland/patch
ImFont: add RenderGlyph() to allow rendering of individual glyphs post-query
2017-08-14 16:50:20 +08:00
omar
6a4064e5f2 PathArcToFast: Minor renaming for clarification. Comments. 2017-08-14 12:25:35 +08:00
omar
4fd148f4f9 Added ImFontAtlas::GlyphRangesBuilder helper + doc 2017-08-09 22:42:03 +08:00
omar
e63ebd997f Use ~IM_COL32_A_MASK instead of IM_COL32(255,255,255,0) 2017-07-31 12:25:27 +08:00
omar
df56879883 imDrawList::PathRect() uses ImGuiCorner_ enums. Should fully promote this to imgui.h at some point. 2017-07-26 14:53:15 +08:00
omar
1987e23ce5 ImDrawList::PrimReserve() minor renaming of locals to make things clearer 2017-07-15 17:52:52 +08:00
omar
afae9398cb Comments. Removed sort-of duplicate access to GImGui->Font in ImDrawList::AddText() so it's only in one place. 2017-07-14 17:49:42 +08:00
omar
12d265fa31 Version 1.51 WIP tag 2017-06-13 11:30:22 +02:00
omar
a2f7c40e30 Fixed comment (#1178) 2017-06-13 11:29:21 +02:00
omar
5e1caaaef3 Version 1.50 2017-06-02 12:22:34 +02:00
omar
9da53bcecd ImFontConfig: Removed MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset. (Breaking change) 2017-05-26 13:42:36 +02:00
omar
c5c77a3476 ImFontConfig: Added GlyphOffset to explicitely offset glyphs at font build time, useful for merged fonts. May remove MergeGlyphCenterV soon. 2017-05-26 13:36:52 +02:00
omar
0828a1fd6c Fixed computation of ImFont::MetricsTotalSurface not taking oversampling into account 2017-05-14 16:27:10 +02:00
omar
a0a6c8a2ef Renamed ImDrawList::PathFill() to ImDrawList::PathFillConvex() for clarity. (breaking API) 2017-05-01 12:36:46 +02:00
omar
6517d68cdf ImDrawList::AddImage* renamed uv_ parameters to be more consistent. Fix AddImageQuad to use IM_COL32_A_MASK (#1009) 2017-05-01 12:34:32 +02:00
Peter
659b3fd259 Add ImDrawList::AddImageQuad
Adds a function
  AddImageQuad(user_texture_id, a, b, c, d, uva, uvb, uvc, uvd, col)
that shows a texture on a full quad. This allows showing arbitrary
rotations of a texture.
2017-04-28 10:04:20 +02:00
omar
670775ac22 Added assert/comment about using MergeMode (#1100) 2017-04-13 20:01:24 +02:00
omar
e10ceebd36 ImFont: Store the texture surface used to get an idea of how costly each font is. 2017-03-17 21:29:57 +01:00
omar
b84eac53d8 ImFont: Reorder field initialization to match declaration order 2017-03-17 21:29:28 +01:00
omar
b8043d3ee5 Internal: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name (#917) 2017-01-14 13:47:16 +01:00
ocornut
68df09cf47 Fixed word-wrapping which would never wrap after a 1 character word. (thanks @sronsse) 2017-01-01 20:11:40 +01:00
Geoffrey Tucker
66c4281290 Began improvements to columns API by splitting the Columns() function into BeginColumns() and EndColumns() and adding additional flags. The columns data still needs to be placed into a stack. 2016-11-13 23:58:09 -08:00
ocornut
8553bab241 Ignoring overzealous GCC warnings (#883) 2016-11-11 20:17:35 +01:00
ocornut
620497e466 Font: Font name include size 2016-11-06 22:21:21 +01:00
ocornut
b2f0ea6c0d Font: Default font given explicit name "ProggyClean.ttf" 2016-11-06 21:51:20 +01:00
ocornut
907dd2ed20 Comments (#896) 2016-11-06 15:25:28 +01:00
ocornut
d567595dde ImDrawList: AddRect(), PathRect() default rounded_corner 0x0F->~0/-1 so it appears less obscure in IDE completions 2016-10-09 10:35:01 +02:00
ocornut
e07d45709f ImDrawList: Uses IM_COL32_A_MASK macro instead of hardcoded zero alpha testing (#844) 2016-10-07 09:49:52 +02:00
Jeongseok Lee
1d7e05327b Fix clang warning: unknown warning group '-Wreserved-id-macro' 2016-10-06 14:48:47 -04:00
ocornut
68c81739bf Minor tidying up following merge BGRA color PR (#844) 2016-10-01 14:29:12 +02:00
Michał Cichoń
1999c01db8 Apply Omar feedback and convert remaining 0xAABBGGRR's into IM_COL32(RR,GG,BB,AA) format. 2016-09-26 12:00:33 +02:00
ocornut
35c6fd682f Inhibiting a ??e sequence in the embedded font. Shouldn't be treated as a trigraph but consistent with encoder (#839) 2016-09-23 09:09:07 +02:00
ocornut
87d99fce6b ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character. (followup to 86666489df) 2016-09-19 09:32:21 +02:00
Brian Swetland
5a47346f5a ImFont: add RenderGlyph() to allow rendering of individual glyphs 2016-09-10 18:21:49 -07:00
ocornut
8efd05a148 Tab->Spaces, missing spaces, typos 2016-07-20 11:39:38 +02:00
Adisorn Aeksatean
4141144b21 Added GetGlyphRangesThai() 2016-07-20 11:37:08 +02:00
ocornut
4961b2ea18 Speculative build fix for FreeBSD+GLIBC configuration
See
a1f9b62dd0
2016-07-16 11:44:10 +02:00
ocornut
d79186931e ImDrawList: Fixed a (rarely occuring) bug with merging with previous command + unnecessary OverlayDrawList command 2016-06-11 15:42:10 +02:00
ocornut
65a525550e ImFont: Allowing to use up to 0xFFFE glyphs in same font (increased from previous 0x8000) 2016-06-07 09:14:54 +02:00
ocornut
5d4cf1c3f3 Version 1.50 WIP 2016-05-30 19:38:36 +02:00
ocornut
adb85d800d Version 1.49 2016-05-29 19:16:44 +02:00
ocornut
b4302187dd ImFontAtlas: Tweak to allow MergeMode to apply on a font that isn't the previous one, by setting the DstFont field. 2016-05-17 19:47:13 +02:00
Branimir Karadžić
a59a04f4d0 Fixed iOS/OSX build. 2016-05-10 01:10:31 +02:00
omar
8af76d56b4 Merge pull request #639 from sergof/conversion-warnings
Ignore various anal GCC warnings.
2016-05-07 21:08:43 +02:00
ocornut
8b428e8c74 Added CreateContext/DestroyContext/GetCurrentContext/SetCurrentContext() (#586, #269) 2016-05-07 19:54:27 +02:00
Sergej Reich
6e8579fc14 Ignore implicit conversion warnings 2016-05-07 18:49:24 +02:00
ocornut
f22b6e1e09 Fixed/silenced various absurd GCC warnings from outer space (#626) 2016-05-04 23:28:16 +02:00
ocornut
79ad22e1f2 Fixed various Clang -Weverything warnings (#626) 2016-05-04 23:17:53 +02:00
ocornut
7406d64c64 PushClipRect(): not altering passed values, leave it to caller responsibility to floor properly (followup #582) 2016-04-30 18:55:23 +02:00
ocornut
ea6b615179 Made ImGui::PushClipRect()/PopClipRect() public. Changed ImDrawList::PushClipRect() prototype. Fixed demo. (#610) 2016-04-26 11:03:51 +02:00
ocornut
4b6e9ac396 ImFont: Added AddRemapChar() helper (#609) 2016-04-26 10:08:06 +02:00
ocornut
727ca4bd17 ImFont: IndexLookup stores short instead of int, so typical ascii-set lookup fits in 256 bytes 2016-04-23 11:37:18 +02:00
ocornut
a20d69f9ce ImFont: Tweaking layout, shaving bit of alignment and simple hot/cot split 2016-04-23 11:29:42 +02:00
ocornut
44fb99542f ImFont: RenderText() useful directly without ImDrawList::AddText().. Changed prototype. Reserving vertices after skipping non-visible lead. 2016-04-23 11:09:56 +02:00
ocornut
fe73a23cf5 ImFont: Added RenderChar() helper. 2016-04-22 19:58:10 +02:00
ocornut
d92f1deff8 ImDrawList: Added AddQuad(), AddQuadFilled() helpers. 2016-04-18 19:04:47 +02:00
Sergej Reich
d5eb87d0a2 Fix font config propagation in FontFromMemoryCompressedTTF() 2016-04-13 02:01:18 +02:00
ocornut
1588eda1ac Version 1.49 WIP 2016-04-09 19:10:42 +02:00
ocornut
95cbcdca3f Version 1.48 2016-04-09 17:46:48 +02:00
omar
39c9bb73e8 Merge pull request #563 from mneumann/fix_dragonfly
Fix compilation on DragonFly BSD
2016-03-26 16:40:00 +01:00
ocornut
2b7eeba143 Trim trailing spaces 2016-03-26 15:38:52 +01:00
Michael Neumann
adb4d4d48b Fix compilation on DragonFly BSD 2016-03-24 19:37:11 +01:00
ocornut
5bed7144fe ImDrawList: Added AddTriangle() function 2016-03-22 20:10:06 +01:00
ocornut
9260d46c2c Comments 2016-03-21 22:51:51 +01:00
ocornut
b495a52fc0 ImDrawList: Allow AddText(ImFont* font, float font_size, ...) to take NULL/0.0f as default 2016-03-21 22:43:53 +01:00
ocornut
928832a5bc Various tidying up / comments, moved columns functions declarations, no functional changes 2016-03-21 22:11:43 +01:00
ocornut
9cbc6e196b ImDrawList: AddRect() added optional thickness parameter + updated demo 2016-03-21 21:56:23 +01:00
ocornut
86fb3a6a3c ImDrawList: AddCircle() takes optional thickness parameter 2016-03-21 21:48:05 +01:00
ocornut
2efaa9a86f ImDrawList: fixed index overflow check broken by AddText(). Added extra assert. (#514) 2016-01-30 17:01:10 +01:00
ocornut
595684e08c Remove dependency on <new> header (#484, #504)
(Now expecting something to fail somewhere..)
2016-01-25 21:26:53 +00:00
ocornut
b6fe5eb4b4 Cleaned up the top of imgui.h, documenting all types / forward declarations 2016-01-23 12:45:56 +00:00
ocornut
a81a5e5235 Commented Clang warning that's not compatible with all versions. Comments. 2016-01-21 21:40:22 +00:00
ocornut
e585204d82 ImFontAtlas: heuristic increase texture width up to 4096 with 4000+ glyphs. Various comments (#491) 2016-01-20 10:30:28 +00:00
ocornut
76ca7c42ca ImDrawList: Added PrimQuadUV() helper to ease custom rendering of textured quads 2016-01-08 14:57:25 +00:00
ocornut
d212401624 Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis., fixed Image(), ImageButton() as well (#457) 2015-12-27 21:31:43 +01:00
ocornut
6dbdc69131 ImDrawList: Fixed AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled() (followup #457 2015-12-27 20:18:43 +01:00
ocornut
dc4a07c49a Fixed various Clang -Weverything warnings 2015-12-26 14:59:07 +01:00
ocornut
e41568f87f Version number 1.48 WIP + Update binaries 2015-12-26 10:02:57 +01:00
ocornut
24d186753e Version number 1.47 2015-12-25 22:44:03 +01:00
ocornut
2849596069 Comments about ImDrawList::PushClipRect 2015-12-25 11:59:49 +01:00
ocornut
e4cf44e967 Minor rebranding "ImGui" -> "dear imgui" (#21) 2015-12-24 20:00:50 +01:00
ocornut
0b10bec71f ImDrawList: Simplified code and added check to avoid mis-recycling a callback command. 2015-12-16 01:13:36 +00:00
ocornut
0873da85ec ImDrawList: Fixed bug with PopClipRect() sometimes altering TextureId + fixed merging of draw calls with same TextureId 2015-12-16 01:01:34 +00:00
ocornut
3aebddc4ac Tweak GetGlyphRangesJapanese() to it is easier to modify 2015-11-29 11:55:54 +00:00
ocornut
f505a372fd Speculative build fix for old versions of Visual Studio compiler 2015-11-28 20:00:40 +00:00
ocornut
6b23fca1ff Speculative build fix for using alloca on PS4 & FreeBSD 2015-10-30 18:05:06 +01:00
ocornut
0a23e2c832 Tabs to spaces 2015-10-30 15:57:03 +01:00
ocornut
5f0db60a57 Version number 1.47 WIP 2015-10-18 20:13:01 +01:00
ocornut
72dde4d323 Version 1.46 2015-10-18 17:36:27 +01:00
ocornut
a5132286b7 ImDrawList: ChannelsSetCurrent() added an extra assert 2015-10-11 17:50:55 +02:00
ocornut
edf730b672 Missing tidying up (#358) 2015-10-08 20:44:13 +02:00
osman-brian
69e6f299f3 Update imgui_draw.cpp
Fix Decode85 on big-endian systems.
2015-10-01 14:57:31 -04:00
ocornut
c1983d5c3f Draw: Fixed rectangle rendering glitches with width/height <= 1/2 and rounding enabled. 2015-09-30 21:48:36 +02:00
omar
9d89e03346 Merge pull request #348 from zho7611/add_korean_support
ImFontAtlas: Added GetGlyphRangesKorean() for Korean.
2015-09-23 18:49:11 +02:00
Jiho Choi
cc53d31764 Add support for Korean. 2015-09-24 00:50:00 +09:00
ocornut
0abe668221 ImFontAtlas: Added TexDesiredWidth and tweaked default cheapo best-width choice(#327) 2015-09-11 16:50:00 +01:00
ocornut
bc8eb5e9cf ImDrawList, ImFontAtlas: comments, tweaks. moved less scary functions at the top of the file. 2015-09-11 16:35:37 +01:00
ocornut
7b1168eb30 Internal ImLoadFileToMemory() return void* instead of taking void** + allow optional int* file_size 2015-09-11 16:01:54 +01:00
ocornut
4d83519244 Comments (#328) 2015-09-11 15:52:03 +01:00
ocornut
8a3593257f Fixed warning with VS2015 in stb_truetype.h 2015-09-07 15:51:43 +01:00
ocornut
e34ad0a05a ImDrawList: fixed 1 leak per ImDrawList using the ChannelsSplit() API (via Columns) (fix #318) 2015-09-03 23:42:08 +01:00
ocornut
965fa3cb16 Version number 1.46 WIP 2015-09-02 19:09:19 +01:00
ocornut
c9e19f8953 Version number 1.45 2015-09-01 20:34:10 +01:00
ocornut
f195bf744f Tabs to spaces 2015-08-30 22:15:33 +01:00
ocornut
4ab43dce19 Comments 2015-08-30 22:10:49 +01:00
ocornut
90e5c97f13 AddBezier()->AddBezierCurve(). PathBezierTo()->PathBezierCurveTo(), and reads current point back, more standard (#311) 2015-08-28 13:48:14 +01:00
ocornut
80ad773c87 ImDrawList: added AddBezier(), PathBezierTo() for cubic bezier curves (#311) 2015-08-28 13:18:34 +01:00
ocornut
a36001212f ImDrawData: added ScaleClipRects() helper (#287) 2015-08-27 18:45:43 +01:00
ocornut
77b82ecad7 ImDrawList: Fixed issues with channels split/merge. Functional without manually adding a draw cmd. + Removed unnecessary parameter to Channe 2015-08-25 16:24:17 +01:00
ocornut
b1987d697f Trim trailing whitespace (#305) 2015-08-24 13:50:18 +02:00
omar
9a97ef673e Merge pull request #296 from tpoechtrager/master
Fixes for compiling Windows target with non-MSVC compiler.
2015-08-09 10:49:06 -06:00
ocornut
6a90ac2094 Tentative GCC/Clang warning fixes with unused functions (cf #296) 2015-08-09 10:45:58 -06:00
Thomas Pöchtrager
3604aecf8f Minor Windows adjustments 2015-08-09 17:24:10 +02:00
ocornut
14822609bd Version number 1.45 WIP 2015-08-08 12:18:37 -06:00
ocornut
a99ba42a39 Version number 1.44 2015-08-08 07:57:29 -06:00
ocornut
20cc65788d Build fix for Orbis / PS4 2015-08-07 21:52:57 -06:00
ocornut
815d1d9be4 Merge remote-tracking branch 'origin' into 2015-07-cleanup
Conflicts:
	imgui.cpp
2015-08-03 08:12:57 -06:00
ocornut
2d8c134747 Merge remote-tracking branch 'origin' into 2015-07-cleanup
Conflicts:
	imgui.cpp
2015-08-01 07:26:09 -06:00
ocornut
abf823c6f6 Tidying up 2015-07-30 22:49:10 -06:00
ocornut
a7e5945206 Merge 2015-07-30 21:37:59 -06:00
ocornut
709c4c3168 Merge remote-tracking branch 'origin' into 2015-07-cleanup
Conflicts:
	imgui.cpp
2015-07-30 20:42:12 -06:00
ocornut
e32f0931e8 Missing includes for imgui_draw.cpp (#219) 2015-07-21 17:08:20 -06:00
ocornut
dace68b6fd Big cleanup, split imgui.cpp into imgui_demo.cpp,imgui_draw.cpp imgui_internal.h (#219) 2015-07-21 17:00:28 -06:00