Scribus
Open source desktop publishing at your fingertips
FPoint Class Reference

A point with floating point precision. More...

#include <fpoint.h>

Public Member Functions

 FPoint (double x, double y)
 
 FPoint (const QPoint &p)
 
 FPoint (const FPoint &p)
 
 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)
 
FPointoperator= (const FPoint &rhs)
 
double x () const
 
double y () const
 
void setX (double x)
 
void setY (double y)
 
void setXY (double x, double y)
 
bool operator== (const FPoint &rhs) const
 
bool operator!= (const FPoint &rhs) const
 
FPointoperator+= (const FPoint &p)
 
FPointoperator-= (const FPoint &p)
 
void transform (const double dx, const double dy, const double rot, const double sx, const double sy, const bool invert)
 
FPoint transformPoint (const QTransform &m, const bool invert) const
 
FPoint transformPoint (const double dx, const double dy, const double rot, const double sx, const double sy, const bool invert) const
 
QPointF toQPointF () const
 Returns a copy of the point as a QPointF.
 
bool isNull () const
 

Friends

class FPointArray
 
const FPoint operator+ (const FPoint &, const FPoint &)
 
const FPoint operator- (const FPoint &, const FPoint &)
 
const FPoint operator* (const FPoint &, const double &)
 
const FPoint operator* (const double &, const FPoint &)
 
double operator* (const FPoint &a, const FPoint &b)
 

Detailed Description

A point with floating point precision.

Author
Franz Schmid One of the advantage of FPoint vs QPointF is that FPoint has consistent precision across platforms : the coordinates are systematically stored as double. QPointF uses the qreal typedef which is sometime double, sometime float.

FPoint has also some coordinate transformation functionalities not provided by QPointF.


The documentation for this class was generated from the following files: