30 #include "scribusapi.h"
46 FPoint() : xp(0), yp(0) {};
47 FPoint(
double x,
double y) : xp(x), yp(y) {};
48 FPoint(
const QPoint & p) : xp(p.x()), yp(p.y()) {};
51 FPoint(
const double x,
const double y,
const double dx,
const double dy,
const double rot,
const double sx,
const double sy,
const bool invert=
false);
58 void setXY(
double x,
double y);
59 bool operator==(
const FPoint &rhs)
const;
60 bool operator!=(
const FPoint &rhs)
const;
65 friend inline const FPoint operator*(
const FPoint &,
const double & );
66 friend inline const FPoint operator*(
const double &,
const FPoint & );
67 friend inline double operator*(
const FPoint &a,
const FPoint &b );
69 void transform(
const double dx,
const double dy,
const double rot,
const double sx,
const double sy,
const bool invert);
71 FPoint transformPoint(
const QTransform& m,
const bool invert)
const;
72 FPoint transformPoint(
const double dx,
const double dy,
const double rot,
const double sx,
const double sy,
const bool invert)
const;
74 QPointF
toQPointF()
const {
return QPointF(xp, yp); }
85 return FPoint(p1.xp+p2.xp, p1.yp+p2.yp);
89 return FPoint(p1.xp-p2.xp, p1.yp-p2.yp);
92 inline const FPoint operator*(
const FPoint &p,
const double &c ) {
93 return FPoint(p.xp*c, p.yp*c);
96 inline const FPoint operator*(
const double &c,
const FPoint &p ) {
97 return FPoint(p.xp*c, p.yp*c);
100 inline double operator*(
const FPoint &a,
const FPoint &b ) {
101 return a.xp * b.xp + a.yp * b.yp;
110 inline double FPoint::x()
const {
114 inline double FPoint::y()
const {
118 inline void FPoint::setX(
double x) {
122 inline void FPoint::setY(
double y) {
126 inline void FPoint::setXY(
double x,
double y) {
A point with floating point precision.
Definition: fpoint.h:43
QPointF toQPointF() const
Returns a copy of the point as a QPointF.
Definition: fpoint.h:74
Definition: fpointarray.h:42