Skip to content

Commit c2d6d26

Browse files
rokupsocornut
authored andcommitted
ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags
1 parent 8b9fedb commit c2d6d26

File tree

8 files changed

+136
-88
lines changed

8 files changed

+136
-88
lines changed

docs/CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ Breaking Changes:
5252
disable those default functions for MinGW. MinGW users should: either link with -limm32, either set their
5353
imconfig file with '#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS'. (#2590, #738) [@actboy168]
5454
- Backends: Win32: Pragma linking with dwmapi.lib (Vista-era, ~9 kb). MinGW users will need to link with -ldwmapi.
55+
- ImDrawList: Merged ImDrawCornerFlags to ImDrawFlags. Hardcoded use of 0x0F or ~0 as ImDrawCornerFlags should be
56+
replaced with ImDrawFlags_None or 0. [@rokups]
5557

5658
Other Changes:
5759

imgui.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,8 +2813,8 @@ void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border,
28132813
const float border_size = g.Style.FrameBorderSize;
28142814
if (border && border_size > 0.0f)
28152815
{
2816-
window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
2817-
window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);
2816+
window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0, border_size);
2817+
window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0, border_size);
28182818
}
28192819
}
28202820

@@ -2825,8 +2825,8 @@ void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
28252825
const float border_size = g.Style.FrameBorderSize;
28262826
if (border_size > 0.0f)
28272827
{
2828-
window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
2829-
window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);
2828+
window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, 0, border_size);
2829+
window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, 0, border_size);
28302830
}
28312831
}
28322832

@@ -2852,13 +2852,13 @@ void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFl
28522852
bool fully_visible = window->ClipRect.Contains(display_rect);
28532853
if (!fully_visible)
28542854
window->DrawList->PushClipRect(display_rect.Min, display_rect.Max);
2855-
window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, ImDrawCornerFlags_All, THICKNESS);
2855+
window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, 0, THICKNESS);
28562856
if (!fully_visible)
28572857
window->DrawList->PopClipRect();
28582858
}
28592859
if (flags & ImGuiNavHighlightFlags_TypeThin)
28602860
{
2861-
window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, ~0, 1.0f);
2861+
window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, 1.0f);
28622862
}
28632863
}
28642864

@@ -5446,7 +5446,7 @@ static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
54465446
float rounding = window->WindowRounding;
54475447
float border_size = window->WindowBorderSize;
54485448
if (border_size > 0.0f && !(window->Flags & ImGuiWindowFlags_NoBackground))
5449-
window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);
5449+
window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, 0, border_size);
54505450

54515451
int border_held = window->ResizeBorderHeld;
54525452
if (border_held != -1)
@@ -5504,22 +5504,22 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
55045504
}
55055505
if (override_alpha)
55065506
bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(alpha) << IM_COL32_A_SHIFT);
5507-
window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight()), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot);
5507+
window->DrawList->AddRectFilled(window->Pos + ImVec2(0, window->TitleBarHeight()), window->Pos + window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? 0 : ImDrawFlags_NoRoundCornerT);
55085508
}
55095509

55105510
// Title bar
55115511
if (!(flags & ImGuiWindowFlags_NoTitleBar))
55125512
{
55135513
ImU32 title_bar_col = GetColorU32(title_bar_is_highlight ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg);
5514-
window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawCornerFlags_Top);
5514+
window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawFlags_NoRoundCornerB);
55155515
}
55165516

55175517
// Menu bar
55185518
if (flags & ImGuiWindowFlags_MenuBar)
55195519
{
55205520
ImRect menu_bar_rect = window->MenuBarRect();
55215521
menu_bar_rect.ClipWith(window->Rect()); // Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
5522-
window->DrawList->AddRectFilled(menu_bar_rect.Min + ImVec2(window_border_size, 0), menu_bar_rect.Max - ImVec2(window_border_size, 0), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawCornerFlags_Top);
5522+
window->DrawList->AddRectFilled(menu_bar_rect.Min + ImVec2(window_border_size, 0), menu_bar_rect.Max - ImVec2(window_border_size, 0), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawFlags_NoRoundCornerB);
55235523
if (style.FrameBorderSize > 0.0f && menu_bar_rect.Max.y < window->Pos.y + window->Size.y)
55245524
window->DrawList->AddLine(menu_bar_rect.GetBL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_Border), style.FrameBorderSize);
55255525
}
@@ -6136,7 +6136,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
61366136
bb.Expand(-g.FontSize - 1.0f);
61376137
rounding = window->WindowRounding;
61386138
}
6139-
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, ~0, 3.0f);
6139+
window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_NavWindowingHighlight, g.NavWindowingHighlightAlpha), rounding, 0, 3.0f);
61406140
}
61416141

61426142
// UPDATE RECTANGLES (2- THOSE AFFECTED BY SCROLLING)
@@ -9918,7 +9918,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop
99189918
r.Expand(3.5f);
99199919
bool push_clip_rect = !window->ClipRect.Contains(r);
99209920
if (push_clip_rect) window->DrawList->PushClipRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1));
9921-
window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, ~0, 2.0f);
9921+
window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f);
99229922
if (push_clip_rect) window->DrawList->PopClipRect();
99239923
}
99249924

@@ -10902,7 +10902,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
1090210902

1090310903
BulletText("Table 0x%08X (%d columns, in '%s')", table->ID, table->ColumnsCount, table->OuterWindow->Name);
1090410904
if (IsItemHovered())
10905-
GetForegroundDrawList()->AddRect(table->OuterRect.Min - ImVec2(1, 1), table->OuterRect.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~0, 2.0f);
10905+
GetForegroundDrawList()->AddRect(table->OuterRect.Min - ImVec2(1, 1), table->OuterRect.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
1090610906
Indent();
1090710907
char buf[128];
1090810908
for (int rect_n = 0; rect_n < TRT_Count; rect_n++)
@@ -10917,7 +10917,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
1091710917
ImFormatString(buf, IM_ARRAYSIZE(buf), "(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) Col %d %s", r.Min.x, r.Min.y, r.Max.x, r.Max.y, r.GetWidth(), r.GetHeight(), column_n, trt_rects_names[rect_n]);
1091810918
Selectable(buf);
1091910919
if (IsItemHovered())
10920-
GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~0, 2.0f);
10920+
GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
1092110921
}
1092210922
}
1092310923
else
@@ -10926,7 +10926,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
1092610926
ImFormatString(buf, IM_ARRAYSIZE(buf), "(%6.1f,%6.1f) (%6.1f,%6.1f) Size (%6.1f,%6.1f) %s", r.Min.x, r.Min.y, r.Max.x, r.Max.y, r.GetWidth(), r.GetHeight(), trt_rects_names[rect_n]);
1092710927
Selectable(buf);
1092810928
if (IsItemHovered())
10929-
GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, ~0, 2.0f);
10929+
GetForegroundDrawList()->AddRect(r.Min - ImVec2(1, 1), r.Max + ImVec2(1, 1), IM_COL32(255, 255, 0, 255), 0.0f, 0, 2.0f);
1093010930
}
1093110931
}
1093210932
Unindent();
@@ -11132,7 +11132,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
1113211132
ImRect r = Funcs::GetTableRect(table, cfg->ShowTablesRectsType, column_n);
1113311133
ImU32 col = (table->HoveredColumnBody == column_n) ? IM_COL32(255, 255, 128, 255) : IM_COL32(255, 0, 128, 255);
1113411134
float thickness = (table->HoveredColumnBody == column_n) ? 3.0f : 1.0f;
11135-
draw_list->AddRect(r.Min, r.Max, col, 0.0f, ~0, thickness);
11135+
draw_list->AddRect(r.Min, r.Max, col, 0.0f, 0, thickness);
1113611136
}
1113711137
}
1113811138
else

imgui.h

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ typedef int ImGuiMouseCursor; // -> enum ImGuiMouseCursor_ // Enum: A
162162
typedef int ImGuiSortDirection; // -> enum ImGuiSortDirection_ // Enum: A sorting direction (ascending or descending)
163163
typedef int ImGuiStyleVar; // -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling
164164
typedef int ImGuiTableBgTarget; // -> enum ImGuiTableBgTarget_ // Enum: A color target for TableSetBgColor()
165-
typedef int ImDrawCornerFlags; // -> enum ImDrawCornerFlags_ // Flags: for ImDrawList functions: AddRect(), AddRectFilled() etc.
166165
typedef int ImDrawFlags; // -> enum ImDrawFlags_ // Flags: for ImDrawList functions: AddPolyline(), PathStroke() etc.
167166
typedef int ImDrawListFlags; // -> enum ImDrawListFlags_ // Flags: for ImDrawList instance
168167
typedef int ImFontAtlasFlags; // -> enum ImFontAtlasFlags_ // Flags: for ImFontAtlas build
@@ -2278,25 +2277,33 @@ struct ImDrawListSplitter
22782277
IMGUI_API void SetCurrentChannel(ImDrawList* draw_list, int channel_idx);
22792278
};
22802279

2281-
enum ImDrawCornerFlags_
2282-
{
2283-
ImDrawCornerFlags_None = 0,
2284-
ImDrawCornerFlags_TopLeft = 1 << 0, // 0x1
2285-
ImDrawCornerFlags_TopRight = 1 << 1, // 0x2
2286-
ImDrawCornerFlags_BotLeft = 1 << 2, // 0x4
2287-
ImDrawCornerFlags_BotRight = 1 << 3, // 0x8
2288-
ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight, // 0x3
2289-
ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight, // 0xC
2290-
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft, // 0x5
2291-
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight, // 0xA
2292-
ImDrawCornerFlags_All = 0xF // In your function calls you may use ~0 (= all bits sets) instead of ImDrawCornerFlags_All, as a convenience
2293-
};
2294-
22952280
// Flags for some ImDrawList functions
22962281
enum ImDrawFlags_
22972282
{
22982283
ImDrawFlags_None = 0,
2299-
ImDrawFlags_Closed = 1 << 0 // PathStroke(), AddPolyline(): specify that (LEGACY: this must always stay == 1 to be backward compatible with old API using a bool)
2284+
ImDrawFlags_Closed = 1 << 0, // PathStroke(), AddPolyline(): specify that (LEGACY: this must always stay == 1 to be backward compatible with old API using a bool)
2285+
// (bits 1..3 unused to facilitate handling of legacy behavior and detection of Flags = 0x0F)
2286+
ImDrawFlags_NoRoundCornerTL = 1 << 4,
2287+
ImDrawFlags_NoRoundCornerTR = 1 << 5,
2288+
ImDrawFlags_NoRoundCornerBL = 1 << 6,
2289+
ImDrawFlags_NoRoundCornerBR = 1 << 7,
2290+
ImDrawFlags_NoRoundCornerT = ImDrawFlags_NoRoundCornerTL | ImDrawFlags_NoRoundCornerTR,
2291+
ImDrawFlags_NoRoundCornerR = ImDrawFlags_NoRoundCornerTR | ImDrawFlags_NoRoundCornerBR,
2292+
ImDrawFlags_NoRoundCornerL = ImDrawFlags_NoRoundCornerTL | ImDrawFlags_NoRoundCornerBL,
2293+
ImDrawFlags_NoRoundCornerB = ImDrawFlags_NoRoundCornerBL | ImDrawFlags_NoRoundCornerBR,
2294+
ImDrawFlags_NoRoundCorners = ImDrawFlags_NoRoundCornerTL | ImDrawFlags_NoRoundCornerTR | ImDrawFlags_NoRoundCornerBL | ImDrawFlags_NoRoundCornerBR,
2295+
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
2296+
ImDrawCornerFlags_None = ImDrawFlags_NoRoundCorners,
2297+
ImDrawCornerFlags_TopLeft = 1 << 28, // Order is identical to ImDrawFlags_NoRoundCorner* flag order and is exploited by FixImDrawCornerFlags() for support of legacy code.
2298+
ImDrawCornerFlags_TopRight = 1 << 29,
2299+
ImDrawCornerFlags_BotLeft = 1 << 30,
2300+
ImDrawCornerFlags_BotRight = 1 << 31,
2301+
ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight,
2302+
ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight,
2303+
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
2304+
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
2305+
ImDrawCornerFlags_All = 0x0F
2306+
#endif
23002307
};
23012308

23022309
// Flags for ImDrawList instance. Those are set automatically by ImGui:: functions from ImGuiIO settings, and generally not manipulated directly.
@@ -2359,8 +2366,8 @@ struct ImDrawList
23592366
// In future versions we will use textures to provide cheaper and higher-quality circles.
23602367
// Use AddNgon() and AddNgonFilled() functions if you need to guaranteed a specific number of sides.
23612368
IMGUI_API void AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness = 1.0f);
2362-
IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size), rounding_corners_flags: 4 bits corresponding to which corner to round
2363-
IMGUI_API void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All); // a: upper-left, b: lower-right (== upper-left + size)
2369+
IMGUI_API void AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0, float thickness = 1.0f); // a: upper-left, b: lower-right (== upper-left + size)
2370+
IMGUI_API void AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding = 0.0f, ImDrawFlags flags = 0); // a: upper-left, b: lower-right (== upper-left + size)
23642371
IMGUI_API void AddRectFilledMultiColor(const ImVec2& p_min, const ImVec2& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
23652372
IMGUI_API void AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness = 1.0f);
23662373
IMGUI_API void AddQuadFilled(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col);
@@ -2383,7 +2390,7 @@ struct ImDrawList
23832390
// - "uv_min" and "uv_max" represent the normalized texture coordinates to use for those corners. Using (0,0)->(1,1) texture coordinates will generally display the entire texture.
23842391
IMGUI_API void AddImage(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min = ImVec2(0, 0), const ImVec2& uv_max = ImVec2(1, 1), ImU32 col = IM_COL32_WHITE);
23852392
IMGUI_API void AddImageQuad(ImTextureID user_texture_id, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1 = ImVec2(0, 0), const ImVec2& uv2 = ImVec2(1, 0), const ImVec2& uv3 = ImVec2(1, 1), const ImVec2& uv4 = ImVec2(0, 1), ImU32 col = IM_COL32_WHITE);
2386-
IMGUI_API void AddImageRounded(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All);
2393+
IMGUI_API void AddImageRounded(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0);
23872394

23882395
// Stateful path API, add points then finish with PathFillConvex() or PathStroke()
23892396
inline void PathClear() { _Path.Size = 0; }
@@ -2395,7 +2402,7 @@ struct ImDrawList
23952402
IMGUI_API void PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle
23962403
IMGUI_API void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0); // Cubic Bezier (4 control points)
23972404
IMGUI_API void PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments = 0); // Quadratic Bezier (3 control points)
2398-
IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawCornerFlags rounding_corners = ImDrawCornerFlags_All);
2405+
IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = 0);
23992406

24002407
// Advanced
24012408
IMGUI_API void AddCallback(ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.

imgui_demo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7205,9 +7205,9 @@ static void ShowExampleAppCustomRendering(bool* p_open)
72057205
const ImVec2 p = ImGui::GetCursorScreenPos();
72067206
const ImU32 col = ImColor(colf);
72077207
const float spacing = 10.0f;
7208-
const ImDrawCornerFlags corners_none = 0;
7209-
const ImDrawCornerFlags corners_all = ImDrawCornerFlags_All;
7210-
const ImDrawCornerFlags corners_tl_br = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotRight;
7208+
const ImDrawFlags corners_none = ImDrawFlags_NoRoundCorners;
7209+
const ImDrawFlags corners_all = 0;
7210+
const ImDrawFlags corners_tl_br = ImDrawFlags_NoRoundCornerTR | ImDrawFlags_NoRoundCornerBL;
72117211
const float rounding = sz / 5.0f;
72127212
const int circle_segments = circle_segments_override ? circle_segments_override_v : 0;
72137213
const int curve_segments = curve_segments_override ? curve_segments_override_v : 0;

0 commit comments

Comments
 (0)