| 2937 | } |
| 2938 | |
| 2939 | void ImFont::RenderChar(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, ImWchar c) const |
| 2940 | { |
| 2941 | const ImFontGlyph* glyph = FindGlyph(c); |
| 2942 | if (!glyph || !glyph->Visible) |
| 2943 | return; |
| 2944 | float scale = (size >= 0.0f) ? (size / FontSize) : 1.0f; |
| 2945 | pos.x = IM_FLOOR(pos.x + DisplayOffset.x); |
| 2946 | pos.y = IM_FLOOR(pos.y + DisplayOffset.y); |
| 2947 | draw_list->PrimReserve(6, 4); |
| 2948 | draw_list->PrimRectUV(ImVec2(pos.x + glyph->X0 * scale, pos.y + glyph->Y0 * scale), ImVec2(pos.x + glyph->X1 * scale, pos.y + glyph->Y1 * scale), ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V1), col); |
| 2949 | } |
| 2950 | |
| 2951 | 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, bool cpu_fine_clip) const |
| 2952 | { |
no test coverage detected