MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / DrawRectangle

Function DrawRectangle

projects/uDesigner/source/main.cpp:220–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218};
219
220void DrawRectangle(const u32 x, const u32 y, const u32 width, const u32 height, const ImU32 color) {
221 auto draw_list = ImGui::GetWindowDrawList();
222 const auto canvas_pos = ImGui::GetCursorScreenPos();
223
224 const auto pos_a = ImVec2(canvas_pos.x + x * g_Scale, canvas_pos.y + y * g_Scale);
225 const auto pos_b = ImVec2(pos_a.x + width * g_Scale, pos_a.y + height * g_Scale);
226 draw_list->AddRectFilled(pos_a, pos_b, color);
227}
228
229void ProcessText(const std::string &text, const ul::design::FontSize font_size, u32 &out_width, u32 &out_height, ImFont *&out_font, float &out_font_size) {
230 switch(static_cast<ul::design::FontSize>(font_size)) {

Callers 1

DrawItemMenuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected