From b91cd9148d54dc10b7ba99dc25d2379c846a4704 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 19 Jun 2021 16:22:50 +0200 Subject: [PATCH] Add 2-segment line drawing wrapper. --- server/TracyImGui.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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