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