Commit graph

361 commits

Author SHA1 Message Date
mivirl cb5f43be9b
Add image demo
Demo with multiple images at multiple sizes.
2025-06-24 18:50:08 +00:00
mivirl 16407ee028
Add image support
Added initial image support. Renders using characters with several
options (ascii, foreground, background, unicode, etc).

Note that each image object should only be used once (or at least with
only one size), otherwise the cached results will conflict for each
size and rendering will take longer and reduce responsiveness.
2025-06-24 17:52:15 +00:00
mivirl d487d5990b
Merge branch 'main' into HEAD
For image-related changes
2025-06-24 17:46:05 +00:00
mivirl 153028a53c
Replace malloc with tb_malloc
Use the same allocator as termbox.h, allows the user to change it
2025-06-24 17:45:05 +00:00
mivirl 6d25c03ae1
Clean up example code 2025-06-24 17:44:53 +00:00
Nic Barker 281f961e3d [Bindings/Odin] Update Odin bindings 2025-06-24 13:57:15 +10:00
Nic Barker 3433a53a8e [Core] Fix an alignment bug for scrolling container contents 2025-06-24 13:55:20 +10:00
wolfee 4a91cac1b2
[Renderers/SDL3] Fix border position calculated incorrectly (#446) 2025-06-23 10:43:08 +10:00
Nic Barker ff7917798c [Core] Avoid calling measure text function with length zero 2025-06-23 10:10:13 +10:00
wolfee f97cb9ea10
[Renderers/SDL] Font sizing is ignored (#444) 2025-06-23 09:30:14 +10:00
Nic Barker 74f0ffbe26 [Renderers/Cairo] Fix outdated image API usage in cairo example 2025-06-23 09:16:41 +10:00
Nic Barker a5e212b8de [Renderers/HTML] Fix a mouse overlap bug with external scroll handling 2025-06-20 10:59:44 +10:00
Nic Barker 0835781602 [Bindings/Odin] Update Odin Bindings 2025-06-18 09:55:32 +10:00
Nic Barker 13ecd80ee5 [Renderers/SDL3] Fix up outdated API usage in SDL3 example 2025-06-18 09:54:27 +10:00
Nic Barker c524485c46 [Core] Fix case where there could be 64 extra bytes of padding between arrays in clays internal arena 2025-06-17 13:07:56 +10:00
Nic Barker b9e27178c0 [Core] Align base arena memory to 64 byte cache line 2025-06-17 10:32:30 +10:00
Nic Barker 6f10bf4b3d [Core] Remove erroneous break statement when using external scroll handling 2025-06-13 10:35:31 +10:00
Nic Barker adb1bd620a [Examples/clay-official-website] Fix links on official website example 2025-06-13 09:59:07 +10:00
Nic Barker dca9f60a6c [Core] Add objective-c support 2025-06-12 12:16:29 +10:00
Nic Barker 3ccfa0f8fa [Core] Fix a bug where extra child gap was added to the dimensions of clipped containers 2025-06-11 10:41:01 +10:00
Nic Barker 35b45d939b Fix some typos in the readme 2025-06-11 10:15:51 +10:00
Nic Barker 6b03a215b7 [Core] Fix an out of bounds access for single newline characters 2025-06-10 11:38:56 +10:00
Nic Barker b25a31c1a1 [Bindings/Odin] Update Odin Bindings to latest 2025-06-06 11:01:42 +10:00
Nic Barker 8bbe14fbcc [Documentation] Fix README typo, bump version number to 0.14 2025-06-06 10:20:37 +10:00
Alan 58491394ca
[Renderers/Raylib] Fix element float distortion (#430) 2025-06-05 10:49:26 +10:00
Nic Barker 87575cb7c3 [Core] Fix handling of letter spacing 2025-06-05 10:38:53 +10:00
Nic Barker 80659eda04 [Renderers/Web] Fix clay official website example struct definitions for web renderers 2025-06-04 10:50:35 +10:00
Rats a3003cfa12
[Bindings/Odin] Update README to better match official website example. (#422) 2025-06-02 20:26:04 +10:00
Wes Lord 5eceb52abc
Set CMake FetchContent GIT_TAG for SDL_ttf (#423) 2025-06-02 13:00:45 +10:00
Michael Tanner 149833bdc0
[Core] Fix dimension calculation that would always result in 0 (#428) 2025-06-02 12:27:28 +10:00
Nic Barker 0431f862f4 [Core] Improve handling of aspect ratio scaling 2025-06-02 12:14:09 +10:00
Nic Barker d6f3957a60
[Core] Split aspect ratio scaling into its own config (#426) 2025-06-02 10:36:58 +10:00
Boreal 89ce22e894
[Core] Fix sign comparison warning (#427) 2025-05-29 13:10:05 +10:00
Wes Lord e80736892d
[Renderers/SDL2] Indent SDL2's CMakeLists.txt consistently (#424) 2025-05-28 09:50:00 +10:00
mivirl c09e4b71ab
Add blank setting for border characters 2025-05-26 23:42:53 +00:00
mivirl 2bf235447d
Remove termbox color buffer
Removed the internal termbox background color buffer (which was only
used for the text background color when transparency was disabled) to
instead only use the clay color buffer.

Previously used two internal color buffers so that there wouldn't be
a need to convert from the clay to termbox representations for every
cell of text, but the performance difference will be negligible for
most TUI applications (which usually update on user input, or only a
few frames per second at most), so just using one buffer is cleaner
2025-05-26 23:38:26 +00:00
Nic Barker ce2475ba73 [Compilers] Add missing struct name for image element config 2025-05-26 10:10:24 +10:00
Johann Muszynski 34ff7e1bea
[Compilers] Add struct names to public structs (#336) 2025-05-26 10:03:07 +10:00
mivirl 744a155fed
Add example for termbox2 renderer 2025-05-25 15:38:23 +00:00
mivirl bf8dcc7f15
Add termbox2 renderer 2025-05-23 16:05:37 +00:00
Emmanuel 65e813d4df
[Renderers/Terminal] Add initial implementation of terminal renderer (#91) 2025-05-22 12:45:52 +12:00
Nic Barker 7af50d0f48 [Bindings/Odin] Update odin bindings to include floating element clipTo 2025-05-20 11:40:25 +12:00
Matt Jennings e2f94f17f6
[Renderers/Playdate] Playdate console example (#404) 2025-05-19 11:46:39 +12:00
Zordan eb1d85f2a6
[Renderers/Cairo] Fix cairo renderer and example (#416) 2025-05-19 11:36:08 +12:00
Patricio Whittingslow 76351a0999
[Documentation] Add Go rewrites of clay to README (#411) 2025-05-19 11:33:38 +12:00
Simon Oelerich efbd680685
[Core] restore compatibility with C99 (#412) 2025-05-14 13:29:12 +12:00
Patrick Doane b656dc5253
[Core] Add Clay_FloatingClipToElement (#413) 2025-05-14 13:24:42 +12:00
João Matos b78fd66da8
[Core] Add Clay_GetPointerOverIds function to the public API. (#389) 2025-05-14 12:39:56 +12:00
Jeroen van Rijn 76265e4c3c
[Bindings/Odin] Add missing border macros to Odin bindings 2025-05-09 13:25:34 +12:00
Sam El-Borai c483269295
[Documentation] Fix anchor to Clay_CustomElementConfig (#403) 2025-05-06 12:41:33 +12:00