MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / RenderCheckMark

Method RenderCheckMark

extern/imgui/imgui_draw.cpp:3801–3814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3799}
3800
3801void ImGui::RenderCheckMark(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz)
3802{
3803 float thickness = ImMax(sz / 5.0f, 1.0f);
3804 sz -= thickness * 0.5f;
3805 pos += ImVec2(thickness * 0.25f, thickness * 0.25f);
3806
3807 float third = sz / 3.0f;
3808 float bx = pos.x + third;
3809 float by = pos.y + sz - third * 0.5f;
3810 draw_list->PathLineTo(ImVec2(bx - third, by - third));
3811 draw_list->PathLineTo(ImVec2(bx, by));
3812 draw_list->PathLineTo(ImVec2(bx + third * 2.0f, by - third * 2.0f));
3813 draw_list->PathStroke(col, 0, thickness);
3814}
3815
3816// Render an arrow. 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is length on each side.
3817void ImGui::RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col)

Callers

nothing calls this directly

Calls 4

ImMaxFunction · 0.85
ImVec2Function · 0.85
PathLineToMethod · 0.80
PathStrokeMethod · 0.80

Tested by

no test coverage detected