![]() |
Prusa Slicer 2.6.0
|
#include <src/imgui/imgui.h>
Collaboration diagram for ImFont:Public Member Functions | |
| IMGUI_API | ImFont () |
| IMGUI_API | ~ImFont () |
| IMGUI_API const ImFontGlyph * | FindGlyph (ImWchar c) const |
| IMGUI_API const ImFontGlyph * | FindGlyphNoFallback (ImWchar c) const |
| float | GetCharAdvance (ImWchar c) const |
| bool | IsLoaded () const |
| const char * | GetDebugName () const |
| IMGUI_API ImVec2 | CalcTextSizeA (float size, float max_width, float wrap_width, const char *text_begin, const char *text_end=NULL, const char **remaining=NULL) const |
| IMGUI_API const char * | CalcWordWrapPositionA (float scale, const char *text, const char *text_end, float wrap_width) const |
| IMGUI_API void | RenderChar (ImDrawList *draw_list, float size, ImVec2 pos, ImU32 col, ImWchar c) const |
| IMGUI_API void | RenderText (ImDrawList *draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4 &clip_rect, const char *text_begin, const char *text_end, float wrap_width=0.0f, bool cpu_fine_clip=false) const |
| IMGUI_API void | BuildLookupTable () |
| IMGUI_API void | ClearOutputData () |
| IMGUI_API void | GrowIndex (int new_size) |
| IMGUI_API void | AddGlyph (const ImFontConfig *src_cfg, ImWchar c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) |
| IMGUI_API void | AddRemapChar (ImWchar dst, ImWchar src, bool overwrite_dst=true) |
| IMGUI_API void | SetGlyphVisible (ImWchar c, bool visible) |
| IMGUI_API void | SetFallbackChar (ImWchar c) |
| IMGUI_API bool | IsGlyphRangeUnused (unsigned int c_begin, unsigned int c_last) |
Public Attributes | |
| ImVector< float > | IndexAdvanceX |
| float | FallbackAdvanceX |
| float | FontSize |
| ImVector< ImWchar > | IndexLookup |
| ImVector< ImFontGlyph > | Glyphs |
| const ImFontGlyph * | FallbackGlyph |
| ImFontAtlas * | ContainerAtlas |
| const ImFontConfig * | ConfigData |
| short | ConfigDataCount |
| ImWchar | FallbackChar |
| ImWchar | EllipsisChar |
| bool | DirtyLookupTables |
| float | Scale |
| float | Ascent |
| float | Descent |
| int | MetricsTotalSurface |
| ImU8 | Used4kPagesMap [(IM_UNICODE_CODEPOINT_MAX+1)/4096/8] |
| ImFont::ImFont | ( | ) |
References Ascent, ConfigData, ConfigDataCount, ContainerAtlas, Descent, DirtyLookupTables, EllipsisChar, FallbackAdvanceX, FallbackChar, FallbackGlyph, FontSize, MetricsTotalSurface, Scale, and Used4kPagesMap.
| ImFont::~ImFont | ( | ) |
References ClearOutputData().
Here is the call graph for this function:| void ImFont::AddGlyph | ( | const ImFontConfig * | src_cfg, |
| ImWchar | c, | ||
| float | x0, | ||
| float | y0, | ||
| float | x1, | ||
| float | y1, | ||
| float | u0, | ||
| float | v0, | ||
| float | u1, | ||
| float | v1, | ||
| float | advance_x | ||
| ) |
References ImFontGlyph::AdvanceX, ImVector< T >::back(), ImFontGlyph::Codepoint, ImFontGlyph::Colored, ContainerAtlas, DirtyLookupTables, ImFontConfig::GlyphExtraSpacing, ImFontConfig::GlyphMaxAdvanceX, ImFontConfig::GlyphMinAdvanceX, Glyphs, IM_ROUND, ImClamp(), ImFloor(), MetricsTotalSurface, ImFontConfig::PixelSnapH, ImVector< T >::resize(), ImVector< T >::Size, ImFontAtlas::TexGlyphPadding, ImFontAtlas::TexHeight, ImFontAtlas::TexWidth, ImFontGlyph::U0, ImFontGlyph::U1, ImFontGlyph::V0, ImFontGlyph::V1, ImFontGlyph::Visible, ImVec2::x, ImFontGlyph::X0, ImFontGlyph::X1, ImFontGlyph::Y0, and ImFontGlyph::Y1.
Referenced by ImFontAtlasBuildFinish(), and ImFontAtlasBuildWithStbTruetype().
Here is the call graph for this function:
Here is the caller graph for this function:References ImVector< T >::Data, GrowIndex(), IM_ASSERT, IndexAdvanceX, IndexLookup, and ImVector< T >::Size.
Here is the call graph for this function:| void ImFont::BuildLookupTable | ( | ) |
References ImFontGlyph::AdvanceX, ImVector< T >::back(), ImVector< T >::clear(), ImFontGlyph::Codepoint, DirtyLookupTables, FallbackAdvanceX, FallbackChar, FallbackGlyph, FindGlyph(), FindGlyphNoFallback(), Glyphs, GrowIndex(), IM_ASSERT, IM_TABSIZE, ImMax(), IndexAdvanceX, IndexLookup, ImVector< T >::resize(), SetGlyphVisible(), ImVector< T >::Size, and Used4kPagesMap.
Referenced by SetFallbackChar().
Here is the call graph for this function:
Here is the caller graph for this function:| ImVec2 ImFont::CalcTextSizeA | ( | float | size, |
| float | max_width, | ||
| float | wrap_width, | ||
| const char * | text_begin, | ||
| const char * | text_end = NULL, |
||
| const char ** | remaining = NULL |
||
| ) | const |
References CalcWordWrapPositionA(), ImVector< T >::Data, FallbackAdvanceX, FontSize, ImCharIsBlankA(), ImMax(), ImTextCharFromUtf8(), IndexAdvanceX, scale(), ImVector< T >::Size, ImVec2::x, and ImVec2::y.
Referenced by ImGui::CalcTextSize(), and ImGui::RenderTextEllipsis().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * ImFont::CalcWordWrapPositionA | ( | float | scale, |
| const char * | text, | ||
| const char * | text_end, | ||
| float | wrap_width | ||
| ) | const |
References ImVector< T >::Data, FallbackAdvanceX, ImCharIsBlankW(), ImTextCharFromUtf8(), IndexAdvanceX, scale(), and ImVector< T >::Size.
Referenced by CalcTextSizeA(), and RenderText().
Here is the call graph for this function:
Here is the caller graph for this function:| void ImFont::ClearOutputData | ( | ) |
References Ascent, ImVector< T >::clear(), ContainerAtlas, Descent, DirtyLookupTables, FallbackAdvanceX, FallbackGlyph, FontSize, Glyphs, IndexAdvanceX, IndexLookup, and MetricsTotalSurface.
Referenced by ~ImFont(), and ImFontAtlasBuildSetupFont().
Here is the call graph for this function:
Here is the caller graph for this function:| const ImFontGlyph * ImFont::FindGlyph | ( | ImWchar | c | ) | const |
References ImVector< T >::Data, FallbackGlyph, Glyphs, IndexLookup, and ImVector< T >::Size.
Referenced by BuildLookupTable(), ImGui::InputTextEx(), RenderChar(), RenderText(), ImGui::RenderTextEllipsis(), and SetGlyphVisible().
Here is the caller graph for this function:| const ImFontGlyph * ImFont::FindGlyphNoFallback | ( | ImWchar | c | ) | const |
References ImVector< T >::Data, Glyphs, IndexLookup, and ImVector< T >::Size.
Referenced by BuildLookupTable(), ImFontAtlasBuildFinish(), and ShowFont().
Here is the caller graph for this function:
|
inline |
References ImVector< T >::Size.
Referenced by InputTextCalcTextSizeW(), ImGui::InputTextEx(), and ImStb::STB_TEXTEDIT_GETWIDTH().
Here is the caller graph for this function:
|
inline |
References ImFontConfig::Name.
Referenced by ImGui::ShowFontSelector().
Here is the caller graph for this function:| void ImFont::GrowIndex | ( | int | new_size | ) |
References IM_ASSERT, IndexAdvanceX, IndexLookup, ImVector< T >::resize(), and ImVector< T >::Size.
Referenced by AddRemapChar(), and BuildLookupTable().
Here is the call graph for this function:
Here is the caller graph for this function:| bool ImFont::IsGlyphRangeUnused | ( | unsigned int | c_begin, |
| unsigned int | c_last | ||
| ) |
References Used4kPagesMap.
Referenced by ShowFont().
Here is the caller graph for this function:
|
inline |
Referenced by Slic3r::GUI::ImGuiWrapper::contain_all_glyphs(), Slic3r::GUI::Emboss::StyleManager::create_imgui_font(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), ImFontAtlasBuildWithStbTruetype(), ImGui::NewFrame(), and ImGui::SetCurrentFont().
Here is the caller graph for this function:| void ImFont::RenderChar | ( | ImDrawList * | draw_list, |
| float | size, | ||
| ImVec2 | pos, | ||
| ImU32 | col, | ||
| ImWchar | c | ||
| ) | const |
References col(), ImFontGlyph::Colored, FindGlyph(), FontSize, IM_FLOOR, ImDrawList::PrimRectUV(), ImDrawList::PrimReserve(), scale(), ImFontGlyph::U0, ImFontGlyph::U1, ImFontGlyph::V0, ImFontGlyph::V1, ImFontGlyph::Visible, ImFontGlyph::X0, ImFontGlyph::X1, ImFontGlyph::Y0, and ImFontGlyph::Y1.
Referenced by ImGui::RenderTextEllipsis(), and ShowFont().
Here is the call graph for this function:
Here is the caller graph for this function:| void ImFont::RenderText | ( | ImDrawList * | draw_list, |
| float | size, | ||
| ImVec2 | pos, | ||
| ImU32 | col, | ||
| const ImVec4 & | clip_rect, | ||
| const char * | text_begin, | ||
| const char * | text_end, | ||
| float | wrap_width = 0.0f, |
||
| bool | cpu_fine_clip = false |
||
| ) | const |
References ImDrawList::_IdxWritePtr, ImDrawList::_VtxCurrentIdx, ImDrawList::_VtxWritePtr, ImFontGlyph::AdvanceX, CalcWordWrapPositionA(), ImDrawList::CmdBuffer, col(), ImDrawVert::col, ImFontGlyph::Colored, ImGui::ColorMarkerEnd, ImGui::ColorMarkerHovered, ImGui::ColorMarkerStart, ImVector< T >::Data, FindGlyph(), FontSize, ImGui::GetColorU32(), ImDrawList::IdxBuffer, IM_FLOOR, ImCharIsBlankA(), ImGuiCol_ButtonHovered, ImGuiCol_FrameBg, ImTextCharFromUtf8(), ImDrawVert::pos, ImDrawList::PrimReserve(), scale(), ImVector< T >::Size, ImFontGlyph::U0, ImFontGlyph::U1, ImDrawVert::uv, ImFontGlyph::V0, ImFontGlyph::V1, ImFontGlyph::Visible, ImDrawList::VtxBuffer, ImVec4::w, ImVec2::x, ImVec4::x, ImFontGlyph::X0, ImFontGlyph::X1, ImVec2::y, ImVec4::y, ImFontGlyph::Y0, ImFontGlyph::Y1, and ImVec4::z.
Referenced by ImDrawList::AddText().
Here is the call graph for this function:
Here is the caller graph for this function:References BuildLookupTable(), and FallbackChar.
Here is the call graph for this function:References FindGlyph().
Referenced by BuildLookupTable().
Here is the call graph for this function:
Here is the caller graph for this function:| float ImFont::Ascent |
Referenced by ImFont(), ClearOutputData(), ImFontAtlasBuildSetupFont(), ImFontAtlasBuildWithStbTruetype(), ImGui::InputTextEx(), and ShowFont().
| const ImFontConfig* ImFont::ConfigData |
Referenced by ImFont(), Slic3r::GUI::ImGuiWrapper::contain_all_glyphs(), ImFontAtlasBuildSetupFont(), and ShowFont().
| short ImFont::ConfigDataCount |
Referenced by ImFont(), ImFontAtlasBuildSetupFont(), and ShowFont().
| ImFontAtlas* ImFont::ContainerAtlas |
Referenced by ImFont(), AddGlyph(), ImDrawList::AddPolyline(), ImDrawList::AddText(), ImGui::Begin(), ClearOutputData(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), ImFontAtlasBuildFinish(), ImFontAtlasBuildSetupFont(), ImFontAtlasBuildWithStbTruetype(), ImGui::InputTextEx(), ImGui::NewFrame(), ImGui::PushFont(), ImGui::RenderMouseCursor(), and ImGui::SetCurrentFont().
| float ImFont::Descent |
Referenced by ImFont(), ClearOutputData(), ImFontAtlasBuildSetupFont(), ImGui::InputTextEx(), and ShowFont().
| bool ImFont::DirtyLookupTables |
Referenced by ImFont(), AddGlyph(), BuildLookupTable(), and ClearOutputData().
| ImWchar ImFont::EllipsisChar |
Referenced by ImFont(), ImFontAtlas::AddFont(), ImFontAtlasBuildFinish(), ImGui::RenderTextEllipsis(), and ShowFont().
| float ImFont::FallbackAdvanceX |
Referenced by ImFont(), BuildLookupTable(), CalcTextSizeA(), CalcWordWrapPositionA(), ClearOutputData(), and ImGui::InputTextEx().
| ImWchar ImFont::FallbackChar |
Referenced by ImFont(), BuildLookupTable(), SetFallbackChar(), and ShowFont().
| const ImFontGlyph* ImFont::FallbackGlyph |
Referenced by ImFont(), BuildLookupTable(), ClearOutputData(), FindGlyph(), and ImGui::InputTextEx().
| float ImFont::FontSize |
| ImVector<ImFontGlyph> ImFont::Glyphs |
Referenced by AddGlyph(), BuildLookupTable(), ClearOutputData(), FindGlyph(), FindGlyphNoFallback(), ImGui::InputTextEx(), and ShowFont().
| ImVector<float> ImFont::IndexAdvanceX |
Referenced by AddRemapChar(), BuildLookupTable(), CalcTextSizeA(), CalcWordWrapPositionA(), ClearOutputData(), GrowIndex(), and ImGui::InputTextEx().
Referenced by AddRemapChar(), BuildLookupTable(), ClearOutputData(), FindGlyph(), FindGlyphNoFallback(), GrowIndex(), and ImGui::InputTextEx().
| int ImFont::MetricsTotalSurface |
Referenced by ImFont(), AddGlyph(), ClearOutputData(), and ShowFont().
| float ImFont::Scale |
Referenced by ImFont(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), ImGui::InputTextEx(), ImGui::SetCurrentFont(), and ShowFont().
| ImU8 ImFont::Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8] |
Referenced by ImFont(), BuildLookupTable(), and IsGlyphRangeUnused().