WIP: lunasvg implementation, things stopped working

This commit is contained in:
2026-03-03 14:01:22 -05:00
parent 19bf78d635
commit 2703bbd901
80 changed files with 38694 additions and 12 deletions

23
src/ui/ui_icons.h Normal file
View File

@@ -0,0 +1,23 @@
#pragma once
// ui_icons.h - SVG icon definitions and atlas rasterization via lunasvg
#include "base/base_inc.h"
enum UI_IconID {
UI_ICON_CLOSE,
UI_ICON_CHECK,
UI_ICON_CHEVRON_DOWN,
UI_ICON_COUNT
};
struct UI_IconInfo {
F32 u0, v0, u1, v1; // UV coordinates in icon atlas
F32 w, h; // pixel dimensions at rasterized size
};
extern UI_IconInfo g_icons[UI_ICON_COUNT];
// Rasterizes all icons into an R8 atlas bitmap.
// Returns malloc'd data (caller frees). Sets *out_w, *out_h to atlas dimensions.
// icon_size is the pixel height to rasterize each icon at.
U8 *ui_icons_rasterize_atlas(S32 *out_w, S32 *out_h, S32 icon_size);