1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Fonts: add optional out parameter to AddCustomRect()

This commit is contained in:
ocornut 2025-03-31 22:18:42 +02:00
parent 074bf39e40
commit 1ea9ff3677
2 changed files with 10 additions and 4 deletions

View file

@ -3633,7 +3633,7 @@ struct ImFontAtlas
// - AddCustomRectRegular() --> Renamed to AddCustomRect()
// - AddCustomRectFontGlyph() --> Prefer using custom ImFontLoader inside ImFontConfig
// - ImFontAtlasCustomRect --> Renamed to ImFontAtlasRect
IMGUI_API ImFontAtlasRectId AddCustomRect(int width, int height); // Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error.
IMGUI_API ImFontAtlasRectId AddCustomRect(int width, int height, ImFontAtlasRect* out_r = NULL);// Register a rectangle. Return -1 (ImFontAtlasRectId_Invalid) on error.
IMGUI_API void RemoveCustomRect(ImFontAtlasRectId id); // Unregister a rectangle. Existing pixels will stay in texture until resized / garbage collected.
IMGUI_API bool GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const; // Get rectangle coordinates for current texture. Valid immediately, never store this (read above)!