| 3880 | } |
| 3881 | |
| 3882 | void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width) |
| 3883 | { |
| 3884 | ImGuiContext& g = *GImGui; |
| 3885 | ImGuiWindow* window = g.CurrentWindow; |
| 3886 | |
| 3887 | if (!text_end) |
| 3888 | text_end = text + ImStrlen(text); // FIXME-OPT (not reached by our internal calls) |
| 3889 | |
| 3890 | if (text != text_end) |
| 3891 | { |
| 3892 | window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width); |
| 3893 | if (g.LogEnabled) |
| 3894 | LogRenderedText(&pos, text, text_end); |
| 3895 | } |
| 3896 | } |
| 3897 | |
| 3898 | // Default clip_rect uses (pos_min,pos_max) |
| 3899 | // Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges) |