Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

QwtDoublePoint Class Reference

List of all members.

Detailed Description

The QwtDoublePoint class defines a point in double coordinates

Definition at line 49 of file qwt_double_rect.h.

Public Member Functions

 QwtDoublePoint ()
 QwtDoublePoint (double x, double y)
 QwtDoublePoint (const QPoint &)
QPoint toPoint () const
bool isNull () const
double x () const
double y () const
double & rx ()
double & ry ()
void setX (double x)
void setY (double y)
bool operator== (const QwtDoublePoint &) const
bool operator!= (const QwtDoublePoint &) const
const QwtDoublePoint operator- () const
const QwtDoublePoint operator+ (const QwtDoublePoint &) const
const QwtDoublePoint operator- (const QwtDoublePoint &) const
const QwtDoublePoint operator * (double) const
const QwtDoublePoint operator/ (double) const
QwtDoublePointoperator+= (const QwtDoublePoint &)
QwtDoublePointoperator-= (const QwtDoublePoint &)
QwtDoublePointoperator *= (double)
QwtDoublePointoperator/= (double)


Constructor & Destructor Documentation

QwtDoublePoint::QwtDoublePoint  ) 
 

Constructs a null point.

See also:
QwtDoublePoint::isNull

Definition at line 22 of file qwt_double_rect.cpp.

Referenced by operator *(), operator+(), operator-(), and operator/().

QwtDoublePoint::QwtDoublePoint double  x,
double  y
 

Constructs a point with coordinates specified by x and y.

Definition at line 29 of file qwt_double_rect.cpp.

QwtDoublePoint::QwtDoublePoint const QPoint &  p  ) 
 

Copy constructor.

Constructs a point using the values of the point specified.

Definition at line 40 of file qwt_double_rect.cpp.


Member Function Documentation

bool QwtDoublePoint::isNull  )  const
 

Returns true if the point is null; otherwise returns false.

A point is considered to be null if both the x- and y-coordinates are equal to zero.

Definition at line 207 of file qwt_double_rect.h.

const QwtDoublePoint QwtDoublePoint::operator * double  factor  )  const
 

Multiplies the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar multiplication of a vector.)

Definition at line 99 of file qwt_double_rect.cpp.

References QwtDoublePoint().

QwtDoublePoint & QwtDoublePoint::operator *= double  factor  ) 
 

Multiplies the coordinates of this point by the given scale factor, and returns a reference to this point with the new coordinates. This is equivalent to scalar multiplication of a vector.

Definition at line 143 of file qwt_double_rect.cpp.

bool QwtDoublePoint::operator!= const QwtDoublePoint  )  const
 

Returns true if point1 is not equal to point2; otherwise returns false.

Definition at line 58 of file qwt_double_rect.cpp.

References operator==().

const QwtDoublePoint QwtDoublePoint::operator+ const QwtDoublePoint other  )  const
 

Adds the coordinates of the point to the corresponding coordinates of the other point, and returns a point with the new coordinates. (Vector addition.)

Definition at line 77 of file qwt_double_rect.cpp.

References QwtDoublePoint().

QwtDoublePoint & QwtDoublePoint::operator+= const QwtDoublePoint other  ) 
 

Adds the coordinates of this point to the corresponding coordinates of the other point, and returns a reference to this point with the new coordinates. This is equivalent to vector addition.

Definition at line 119 of file qwt_double_rect.cpp.

References d_x, and d_y.

const QwtDoublePoint QwtDoublePoint::operator- const QwtDoublePoint other  )  const
 

Subtracts the coordinates of the other point from the corresponding coordinates of the given point, and returns a point with the new coordinates. (Vector subtraction.)

Definition at line 88 of file qwt_double_rect.cpp.

References QwtDoublePoint().

const QwtDoublePoint QwtDoublePoint::operator-  )  const
 

Negates the coordinates of the point, and returns a point with the new coordinates. (Inversion).

Definition at line 67 of file qwt_double_rect.cpp.

References QwtDoublePoint().

QwtDoublePoint & QwtDoublePoint::operator-= const QwtDoublePoint other  ) 
 

Subtracts the coordinates of the other point from the corresponding coordinates of this point, and returns a reference to this point with the new coordinates. This is equivalent to vector subtraction.

Definition at line 131 of file qwt_double_rect.cpp.

References d_x, and d_y.

const QwtDoublePoint QwtDoublePoint::operator/ double  factor  )  const
 

Divides the coordinates of the point by the given scale factor, and returns a point with the new coordinates. (Scalar division of a vector.)

Definition at line 109 of file qwt_double_rect.cpp.

References QwtDoublePoint().

QwtDoublePoint & QwtDoublePoint::operator/= double  factor  ) 
 

Divides the coordinates of this point by the given scale factor, and returns a references to this point with the new coordinates. This is equivalent to scalar division of a vector.

Definition at line 155 of file qwt_double_rect.cpp.

bool QwtDoublePoint::operator== const QwtDoublePoint other  )  const
 

Returns true if point1 is equal to point2; otherwise returns false.

Two points are equal to each other if both x-coordinates and both y-coordinates are the same.

Definition at line 52 of file qwt_double_rect.cpp.

Referenced by operator!=().

double & QwtDoublePoint::rx  ) 
 

Returns a reference to the x-coordinate of the point.

Definition at line 225 of file qwt_double_rect.h.

double & QwtDoublePoint::ry  ) 
 

Returns a reference to the y-coordinate of the point.

Definition at line 231 of file qwt_double_rect.h.

void QwtDoublePoint::setX double  x  ) 
 

Sets the x-coordinate of the point to the value specified by x.

Definition at line 237 of file qwt_double_rect.h.

void QwtDoublePoint::setY double  y  ) 
 

Sets the y-coordinate of the point to the value specified by y.

Definition at line 243 of file qwt_double_rect.h.

QPoint QwtDoublePoint::toPoint  )  const
 

Rounds the coordinates of this point to the nearest integer and returns a QPoint with these rounded coordinates.

Definition at line 252 of file qwt_double_rect.h.

double QwtDoublePoint::x  )  const
 

Returns the x-coordinate of the point.

Definition at line 213 of file qwt_double_rect.h.

Referenced by QwtPlotMarker::draw().

double QwtDoublePoint::y  )  const
 

Returns the y-coordinate of the point.

Definition at line 219 of file qwt_double_rect.h.

Referenced by QwtPlotMarker::draw().


Generated on Wed Aug 31 23:03:06 2005 for Qwt User's Guide by  doxygen 1.4.1