Added GetFontTexUvWhitePixel() helper.

This commit is contained in:
ocornut 2016-03-21 22:30:32 +01:00
parent a274a09955
commit 37d50dccf9
2 changed files with 6 additions and 0 deletions

View File

@ -4838,6 +4838,11 @@ float ImGui::GetFontSize()
return GImGui->FontSize;
}
ImVec2 ImGui::GetFontTexUvWhitePixel()
{
return GImGui->FontTexUvWhitePixel;
}
void ImGui::SetWindowFontScale(float scale)
{
ImGuiState& g = *GImGui;

View File

@ -171,6 +171,7 @@ namespace ImGui
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