Skip to content

Commit

Permalink
QskVertex::Line API enhanced
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Sep 2, 2024
1 parent 36ac8d9 commit 01a0f6b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/nodes/QskVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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
Expand Down

0 comments on commit 01a0f6b

Please sign in to comment.