diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2021-06-19 17:22:50 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2021-06-19 17:22:50 +0300 |
commit | b91cd9148d54dc10b7ba99dc25d2379c846a4704 (patch) | |
tree | 8431c5e2ba15f670139cc750f5e06448381cd4d8 /server/TracyImGui.hpp | |
parent | 188320db48359ec72153b193cf454affbc7d3a63 (diff) |
Add 2-segment line drawing wrapper.
Diffstat (limited to 'server/TracyImGui.hpp')
-rw-r--r-- | server/TracyImGui.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index e9379c15..f5283d90 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -245,6 +245,12 @@ static const ImVec4 SyntaxColorsDimmed[] = { draw->AddPolyline( data, 2, col, 0, thickness ); } +[[maybe_unused]] static tracy_force_inline void DrawLine( ImDrawList* draw, const ImVec2& v1, const ImVec2& v2, const ImVec2& v3, uint32_t col, float thickness = 1.0f ) +{ + const ImVec2 data[3] = { v1, v2, v3 }; + draw->AddPolyline( data, 3, col, 0, thickness ); +} + } #endif |