| 939 | } |
| 940 | |
| 941 | void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col) |
| 942 | { |
| 943 | ImGuiWindow* window = GetCurrentWindow(); |
| 944 | if (window->SkipItems) |
| 945 | return; |
| 946 | |
| 947 | ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); |
| 948 | if (border_col.w > 0.0f) |
| 949 | bb.Max += ImVec2(2, 2); |
| 950 | ItemSize(bb); |
| 951 | if (!ItemAdd(bb, 0)) |
| 952 | return; |
| 953 | |
| 954 | if (border_col.w > 0.0f) |
| 955 | { |
| 956 | window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(border_col), 0.0f); |
| 957 | window->DrawList->AddImage(user_texture_id, bb.Min + ImVec2(1, 1), bb.Max - ImVec2(1, 1), uv0, uv1, GetColorU32(tint_col)); |
| 958 | } |
| 959 | else |
| 960 | { |
| 961 | window->DrawList->AddImage(user_texture_id, bb.Min, bb.Max, uv0, uv1, GetColorU32(tint_col)); |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | // frame_padding < 0: uses FramePadding from style (default) |
| 966 | // frame_padding = 0: no framing |
nothing calls this directly
no test coverage detected