| 3748 | } |
| 3749 | |
| 3750 | void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width) |
| 3751 | { |
| 3752 | ImGuiContext& g = *GImGui; |
| 3753 | ImGuiWindow* window = g.CurrentWindow; |
| 3754 | |
| 3755 | if (!text_end) |
| 3756 | text_end = text + ImStrlen(text); // FIXME-OPT |
| 3757 | |
| 3758 | if (text != text_end) |
| 3759 | { |
| 3760 | window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width); |
| 3761 | if (g.LogEnabled) |
| 3762 | LogRenderedText(&pos, text, text_end); |
| 3763 | } |
| 3764 | } |
| 3765 | |
| 3766 | // Default clip_rect uses (pos_min,pos_max) |
| 3767 | // Handle clipping on CPU immediately (vs typically let the GPU clip the triangles that are overlapping the clipping rectangle edges) |