111 inline void setLine(
float x1,
float y1,
float x2,
float y2 )
noexcept
117 inline void setLine(
const QPointF& p1,
const QPointF& p2 )
noexcept
119 setLine( p1.x(), p1.y(), p2.x(), p2.y() );
122 inline void setHLine(
float x1,
float x2,
float y )
noexcept
124 setLine( x1, y, x2, y );
127 inline void setVLine(
float x,
float y1,
float y2 )
noexcept
129 setLine( x, y1, x, y2 );
132 inline void setLine(
const QPointF& p1,
const QPointF& p2,
Color )
noexcept
138 setLine( p1.x(), p1.y(), p2.x(), p2.y() );
141 inline void setLine(
float x1,
float y1,
float x2,
float y2,
Color )
noexcept
146 setLine( x1, y1, x2, y2 );
149 inline float x1()
const noexcept {
return p1.x; }
150 inline float y1()
const noexcept {
return p1.y; }
152 inline float x2()
const noexcept {
return p2.x; }
153 inline float y2()
const noexcept {
return p2.y; }
155 inline float dx()
const noexcept {
return p2.x - p1.x; }
156 inline float dy()
const noexcept {
return p2.y - p1.y; }
158 QSGGeometry::Point2D p1;
159 QSGGeometry::Point2D p2;
165 inline void setLine(
float x1,
float y1,
Color c1,
166 float x2,
float y2,
Color c2 )
noexcept
168 p1.set( x1, y1, c1.r, c1.g, c1.b, c1.a );
169 p2.set( x2, y2, c2.r, c2.g, c2.b, c2.a );
172 inline void setLine(
float x1,
float y1,
float x2,
float y2,
Color color )
noexcept
174 setLine( x1, y1, color, x2, y2, color );
177 inline void setLine(
const QPointF& p1,
const QPointF& p2,
Color color )
noexcept
179 setLine( p1.x(), p1.y(), color, p2.x(), p2.y(), color );
182 inline void setLine(
const QLineF& line,
Color color )
noexcept
184 setLine( line.x1(), line.y1(), color, line.x2(), line.y2(), color );
187 inline void setHLine( qreal x1, qreal x2, qreal y,
Color color )
noexcept
189 setLine( x1, y, color, x2, y, color );
192 inline void setVLine( qreal x, qreal y1, qreal y2,
Color color )
noexcept
194 setLine( x, y1, color, x, y2, color );
197 inline float x1()
const noexcept {
return p1.x; }
198 inline float y1()
const noexcept {
return p1.y; }
200 inline float x2()
const noexcept {
return p2.x; }
201 inline float y2()
const noexcept {
return p2.y; }
203 inline float dx()
const noexcept {
return p2.x - p1.x; }
204 inline float dy()
const noexcept {
return p2.y - p1.y; }
206 QSGGeometry::ColoredPoint2D p1;
207 QSGGeometry::ColoredPoint2D p2;