From b0e2c71f3ed3f49771d5243315152550f3121106 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 13 Mar 2025 17:28:13 +0100 Subject: [PATCH] WIP - Fonts: rename ImFontAtlasBuildClearTexture() to ImFontAtlasBuildClear() --- imgui.cpp | 2 +- imgui_draw.cpp | 2 +- imgui_internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 6f47fee04..7ea3e7341 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -21318,7 +21318,7 @@ void ImGui::ShowFontAtlas(ImFontAtlas* atlas) ImFontAtlasBuildGrowTexture(atlas); SameLine(); if (Button("Clear Output")) - ImFontAtlasBuildClearTexture(atlas); + ImFontAtlasBuildClear(atlas); for (int tex_n = 0; tex_n < atlas->TexList.Size; tex_n++) { diff --git a/imgui_draw.cpp b/imgui_draw.cpp index b3b62bb65..9d40a2b52 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -4094,7 +4094,7 @@ ImVec2i ImFontAtlasBuildGetTextureSizeEstimate(ImFontAtlas* atlas) } // Clear all output. Invalidates all AddCustomRectXXX return values. -void ImFontAtlasBuildClearTexture(ImFontAtlas* atlas) +void ImFontAtlasBuildClear(ImFontAtlas* atlas) { ImVec2i new_tex_size = ImFontAtlasBuildGetTextureSizeEstimate(atlas); ImFontAtlasBuildDestroy(atlas); diff --git a/imgui_internal.h b/imgui_internal.h index 54c88a0b6..562387a5a 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -4048,11 +4048,11 @@ IMGUI_API void ImFontAtlasBuildMain(ImFontAtlas* atlas); IMGUI_API void ImFontAtlasBuildSetupFontLoader(ImFontAtlas* atlas, const ImFontLoader* font_loader); IMGUI_API void ImFontAtlasBuildUpdatePointers(ImFontAtlas* atlas); IMGUI_API void ImFontAtlasBuildRenderBitmapFromString(ImFontAtlas* atlas, int x, int y, int w, int h, const char* in_str, char in_marker_char); +IMGUI_API void ImFontAtlasBuildClear(ImFontAtlas* atlas); // Clear output and custom rects IMGUI_API ImTextureData* ImFontAtlasBuildAddTexture(ImFontAtlas* atlas, int w, int h); IMGUI_API void ImFontAtlasBuildMakeSpace(ImFontAtlas* atlas); IMGUI_API void ImFontAtlasBuildRepackTexture(ImFontAtlas* atlas, int w, int h); -IMGUI_API void ImFontAtlasBuildClearTexture(ImFontAtlas* atlas); IMGUI_API void ImFontAtlasBuildGrowTexture(ImFontAtlas* atlas, int old_w = -1, int old_h = -1); IMGUI_API void ImFontAtlasBuildCompactTexture(ImFontAtlas* atlas); IMGUI_API ImVec2i ImFontAtlasBuildGetTextureSizeEstimate(ImFontAtlas* atlas);