DrawList: added improved polyline rendering. (2183, 7972)

- added 2 variants of polyline rendering
- one handles integersized thickness using one strip of triangles along the line
- second handles any thickness using 2 strips of triangles long the line
This commit is contained in:
Mikko Mononen
2026-04-21 10:46:18 +03:00
committed by ocornut
parent d0bf1f316c
commit ce44b4e8be
3 changed files with 726 additions and 3 deletions

View File

@@ -10419,7 +10419,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
static int curve_segments_override_v = 8;
static ImVec4 colf = ImVec4(1.0f, 1.0f, 0.4f, 1.0f);
ImGui::DragFloat("Size", &sz, 0.2f, 2.0f, 100.0f, "%.0f");
ImGui::DragFloat("Thickness", &thickness, 0.05f, 1.0f, 8.0f, "%.02f");
ImGui::DragFloat("Thickness", &thickness, 0.05f, 0.0f, 32.0f, "%.02f");
ImGui::SliderInt("N-gon sides", &ngon_sides, 3, 12);
ImGui::Checkbox("##circlesegmentoverride", &circle_segments_override);
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);