MCPcopy Create free account
hub / github.com/RenderKit/embree / AddImageRounded

Method AddImageRounded

tutorials/common/imgui/imgui_draw.cpp:1633–1657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1631}
1632
1633void ImDrawList::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)
1634{
1635 if ((col & IM_COL32_A_MASK) == 0)
1636 return;
1637
1638 flags = FixRectCornerFlags(flags);
1639 if (rounding < 0.5f || (flags & ImDrawFlags_RoundCornersMask_) == ImDrawFlags_RoundCornersNone)
1640 {
1641 AddImage(user_texture_id, p_min, p_max, uv_min, uv_max, col);
1642 return;
1643 }
1644
1645 const bool push_texture_id = user_texture_id != _CmdHeader.TextureId;
1646 if (push_texture_id)
1647 PushTextureID(user_texture_id);
1648
1649 int vert_start_idx = VtxBuffer.Size;
1650 PathRect(p_min, p_max, rounding, flags);
1651 PathFillConvex(col);
1652 int vert_end_idx = VtxBuffer.Size;
1653 ImGui::ShadeVertsLinearUV(this, vert_start_idx, vert_end_idx, p_min, p_max, uv_min, uv_max, true);
1654
1655 if (push_texture_id)
1656 PopTextureID();
1657}
1658
1659
1660//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

FixRectCornerFlagsFunction · 0.85

Tested by

no test coverage detected