DrawList: new ImDrawFlags API (yet unused in this commit)

This commit is contained in:
ocornut
2026-06-05 19:09:14 +02:00
parent 873afffd8f
commit 2c5adecc11
3 changed files with 68 additions and 40 deletions

View File

@@ -10453,7 +10453,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
ImGui::ColorEdit4("Stroke Color", &colf_stroke.x);
ImGui::ColorEdit4("Fill Color", &colf_fill.x);
static ImDrawFlags stroke_flags = ImDrawFlags_AAEnds;
static ImDrawFlags stroke_flags = ImDrawFlags_AALineEnds;
static ImDrawFlags other_flags = ImDrawFlags_None;
ImGui::Text("Stroke Flags:");
ImGui::RadioButton("Default", &stroke_flags, ImDrawFlags_None); ImGui::SameLine();
@@ -10464,7 +10464,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
ImGui::RadioButton("Legacy", &stroke_flags, ImDrawFlags_StrokeLegacy);
ImGui::CheckboxFlags("MiterOnly", &other_flags, ImDrawFlags_MiterOnly); ImGui::SameLine();
ImGui::CheckboxFlags("SquareCap", &other_flags, ImDrawFlags_SquareCap); ImGui::SameLine();
ImGui::CheckboxFlags("AAEnds", &other_flags, ImDrawFlags_AAEnds);
ImGui::CheckboxFlags("AALineEnds", &other_flags, ImDrawFlags_AALineEnds);
ImGui::Spacing();
const ImDrawFlags flags = stroke_flags | other_flags;