diff --git a/include/pd/lithium/drawlist.hpp b/include/pd/lithium/drawlist.hpp index 21a752f..dfdcdd9 100644 --- a/include/pd/lithium/drawlist.hpp +++ b/include/pd/lithium/drawlist.hpp @@ -98,6 +98,8 @@ class PD_API Drawlist { void DrawText(const fvec2& p, const char* text, const PD::Color& color); void DrawTextEx(const fvec2& p, const char* text, const PD::Color& color, LiTextFlags flags, const fvec2& box = fvec2(0.f)); + void DrawLine(const fvec2& a, const fvec2& b, const PD::Color& color, + int thickness = 1); void DrawPolyLine(const Pool& points, const PD::Color& color, LiDrawFlags flags = LiDrawFlags_None, int t = 1); diff --git a/source/lithium/drawlist.cpp b/source/lithium/drawlist.cpp index 8d12693..7075042 100644 --- a/source/lithium/drawlist.cpp +++ b/source/lithium/drawlist.cpp @@ -232,6 +232,13 @@ PD_API void Drawlist::DrawTextEx(const fvec2& p, const char* text, pFont->CmdTextEx(*this, p, color, pFontScale, text, flags, box); } +PD_API void Drawlist::DrawLine(const fvec2& a, const fvec2& b, + const PD::Color& color, int thickness) { + this->PathAdd(a); + this->PathAdd(b); + this->PathStroke(color, thickness); +} + PD_API void Drawlist::DrawPolyLine(const Pool& points, const PD::Color& color, LiDrawFlags flags, int t) {