MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / AddRect

Method AddRect

extern/imgui/imgui_draw.cpp:1393–1402  ·  view source on GitHub ↗

p_min = upper-left, p_max = lower-right Note we don't render 1 pixels sized rectangles properly.

Source from the content-addressed store, hash-verified

1391// p_min = upper-left, p_max = lower-right
1392// Note we don't render 1 pixels sized rectangles properly.
1393void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness)
1394{
1395 if ((col & IM_COL32_A_MASK) == 0)
1396 return;
1397 if (Flags & ImDrawListFlags_AntiAliasedLines)
1398 PathRect(p_min + ImVec2(0.50f, 0.50f), p_max - ImVec2(0.50f, 0.50f), rounding, flags);
1399 else
1400 PathRect(p_min + ImVec2(0.50f, 0.50f), p_max - ImVec2(0.49f, 0.49f), rounding, flags); // Better looking lower-right corner and rounded non-AA shapes.
1401 PathStroke(col, ImDrawFlags_Closed, thickness);
1402}
1403
1404void ImDrawList::AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags)
1405{

Callers 15

TableDrawBordersMethod · 0.80
DebugNodeTableMethod · 0.80
RenderFrameMethod · 0.80
RenderFrameBorderMethod · 0.80
RenderNavHighlightMethod · 0.80
ItemHoverableMethod · 0.80
NavScoreItemMethod · 0.80
NavUpdateMethod · 0.80
AcceptDragDropPayloadMethod · 0.80

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected