MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / AddRectFilledMultiColor

Method AddRectFilledMultiColor

Source/3rdParty/imgui/imgui_draw.cpp:1535–1548  ·  view source on GitHub ↗

p_min = upper-left, p_max = lower-right

Source from the content-addressed store, hash-verified

1533
1534// p_min = upper-left, p_max = lower-right
1535void ImDrawList::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)
1536{
1537 if (((col_upr_left | col_upr_right | col_bot_right | col_bot_left) & IM_COL32_A_MASK) == 0)
1538 return;
1539
1540 const ImVec2 uv = _Data->TexUvWhitePixel;
1541 PrimReserve(6, 4);
1542 PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx + 1)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx + 2));
1543 PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx + 2)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx + 3));
1544 PrimWriteVtx(p_min, uv, col_upr_left);
1545 PrimWriteVtx(ImVec2(p_max.x, p_min.y), uv, col_upr_right);
1546 PrimWriteVtx(p_max, uv, col_bot_right);
1547 PrimWriteVtx(ImVec2(p_min.x, p_max.y), uv, col_bot_left);
1548}
1549
1550void ImDrawList::AddQuad(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness)
1551{

Callers 3

ColorPicker4Method · 0.80
RenderColorBarFunction · 0.80

Calls 1

ImVec2Function · 0.85

Tested by

no test coverage detected