новые иконки в OpenBoard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
OpenBoard/src/frameworks/UBGeometryUtils.h

34 lines
942 B

/*
* UBGeometryUtils.h
*
* Created on: Sep 20, 2008
* Author: luc
*/
#ifndef UBGEOMETRYUTILS_H_
#define UBGEOMETRYUTILS_H_
#include <QtGui>
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<QPointF> crashPointList(const QVector<QPointF> points);
};
#endif /* UBGEOMETRYUTILS_H_ */