From 01a0f6b5409c945361b4291311504eeee25da1b2 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 2 Sep 2024 11:13:31 +0200 Subject: [PATCH] QskVertex::Line API enhanced --- src/nodes/QskVertex.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/nodes/QskVertex.h b/src/nodes/QskVertex.h index 528f9c17..967d2382 100644 --- a/src/nodes/QskVertex.h +++ b/src/nodes/QskVertex.h @@ -115,6 +115,11 @@ namespace QskVertex p2.set( x2, y2 ); } + inline void setLine( const QPointF& p1, const QPointF& p2 ) noexcept + { + setLine( p1.x(), p1.y(), p2.x(), p2.y() ); + } + inline void setHLine( float x1, float x2, float y ) noexcept { setLine( x1, y, x2, y ); @@ -125,6 +130,15 @@ namespace QskVertex setLine( x, y1, x, y2 ); } + inline void setLine( const QPointF& p1, const QPointF& p2, Color ) noexcept + { + /* The color parameter makes no sense, but is useful + when being used from templated code + */ + + setLine( p1.x(), p1.y(), p2.x(), p2.y() ); + } + inline void setLine( float x1, float y1, float x2, float y2, Color ) noexcept { /* The color parameter makes no sense, but is useful