diff --git a/imgui.cpp b/imgui.cpp index 7593bd4..5bfa19d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4838,6 +4838,11 @@ return GImGui->FontSize; } +ImVec2 ImGui::GetFontTexUvWhitePixel() +{ + return GImGui->FontTexUvWhitePixel; +} + void ImGui::SetWindowFontScale(float scale) { ImGuiState& g = *GImGui; diff --git a/imgui.cpp b/imgui.cpp index 7593bd4..5bfa19d 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -4838,6 +4838,11 @@ return GImGui->FontSize; } +ImVec2 ImGui::GetFontTexUvWhitePixel() +{ + return GImGui->FontTexUvWhitePixel; +} + void ImGui::SetWindowFontScale(float scale) { ImGuiState& g = *GImGui; diff --git a/imgui.h b/imgui.h index df23e7b..55f1869 100644 --- a/imgui.h +++ b/imgui.h @@ -171,6 +171,7 @@ IMGUI_API void PopStyleVar(int count = 1); IMGUI_API ImFont* GetFont(); // get current font IMGUI_API float GetFontSize(); // get current font size (= height in pixels) of current font with current scale applied + IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f); // retrieve given style color with style alpha applied and optional extra alpha multiplier IMGUI_API ImU32 GetColorU32(const ImVec4& col); // retrieve given color with style alpha applied