mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
ImDrawList: Added AddTriangle() function
This commit is contained in:
@ -823,6 +823,17 @@ void ImDrawList::AddRectFilledMultiColor(const ImVec2& a, const ImVec2& c, ImU32
|
||||
PrimWriteVtx(ImVec2(a.x, c.y), uv, col_bot_left);
|
||||
}
|
||||
|
||||
void ImDrawList::AddTriangle(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col, float thickness)
|
||||
{
|
||||
if ((col >> 24) == 0)
|
||||
return;
|
||||
|
||||
PathLineTo(a);
|
||||
PathLineTo(b);
|
||||
PathLineTo(c);
|
||||
PathStroke(col, true, thickness);
|
||||
}
|
||||
|
||||
void ImDrawList::AddTriangleFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col)
|
||||
{
|
||||
if ((col >> 24) == 0)
|
||||
|
Reference in New Issue
Block a user