p_min = upper-left, p_max = lower-right Note we don't render 1 pixels sized rectangles properly.
| 1382 | // p_min = upper-left, p_max = lower-right |
| 1383 | // Note we don't render 1 pixels sized rectangles properly. |
| 1384 | void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness) |
| 1385 | { |
| 1386 | if ((col & IM_COL32_A_MASK) == 0) |
| 1387 | return; |
| 1388 | if (Flags & ImDrawListFlags_AntiAliasedLines) |
| 1389 | PathRect(p_min + ImVec2(0.50f, 0.50f), p_max - ImVec2(0.50f, 0.50f), rounding, flags); |
| 1390 | else |
| 1391 | 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. |
| 1392 | PathStroke(col, ImDrawFlags_Closed, thickness); |
| 1393 | } |
| 1394 | |
| 1395 | void ImDrawList::AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags) |
| 1396 | { |
no test coverage detected