/* * UBGeometryUtils.h * * Created on: Sep 20, 2008 * Author: luc */ #ifndef UBGEOMETRYUTILS_H_ #define UBGEOMETRYUTILS_H_ #include class UBGeometryUtils { private: UBGeometryUtils(); virtual ~UBGeometryUtils(); public: static QPolygonF lineToPolygon(const QLineF& pLine, const qreal& pWidth); static QRectF lineToInnerRect(const QLineF& pLine, const qreal& pWidth); static QPolygonF arcToPolygon(const QLineF& startRadius, qreal spanAngle, qreal width); static QPolygonF lineToPolygon(const QPointF& pStart, const QPointF& pEnd, const qreal& pStartWidth, const qreal& pEndWidth); static QPointF pointConstrainedInRect(QPointF point, QRectF rect); static QPoint pointConstrainedInRect(QPoint point, QRect rect); static QVector crashPointList(const QVector points); }; #endif /* UBGEOMETRYUTILS_H_ */