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

QwtDoubleRect Class Reference

List of all members.

Detailed Description

The QwtDoubleRect class defines a size in double coordinates.


Public Member Functions

 QwtDoubleRect ()
 QwtDoubleRect (double x1, double x2, double y1, double y2)
 QwtDoubleRect (double x, double y, const QwtDoubleSize &)
bool isNull () const
bool isEmpty () const
bool isValid () const
QwtDoubleRect normalize () const
double x1 () const
double x2 () const
double y1 () const
double y2 () const
double & rx1 ()
double & rx2 ()
double & ry1 ()
double & ry2 ()
void setX1 (double)
void setX2 (double)
void setY1 (double)
void setY2 (double)
QwtDoublePoint center () const
void moveX (double x)
void moveY (double y)
void move (double x, double y)
void moveBy (double dx, double dy)
void moveCenter (const QwtDoublePoint &)
void moveCenter (double dx, double dy)
void setRect (double x1, double x2, double y1, double y2)
double width () const
double height () const
QwtDoubleSize size () const
void setWidth (double w)
void setHeight (double h)
void setSize (const QwtDoubleSize &)
QwtDoubleRect operator| (const QwtDoubleRect &r) const
QwtDoubleRect operator & (const QwtDoubleRect &r) const
QwtDoubleRectoperator|= (const QwtDoubleRect &r)
QwtDoubleRectoperator &= (const QwtDoubleRect &r)
bool operator== (const QwtDoubleRect &) const
bool operator!= (const QwtDoubleRect &) const
bool contains (const QwtDoublePoint &p, bool proper=FALSE) const
bool contains (double x, double y, bool proper=FALSE) const
bool contains (const QwtDoubleRect &r, bool proper=FALSE) const
QwtDoubleRect unite (const QwtDoubleRect &) const
QwtDoubleRect intersect (const QwtDoubleRect &) const
bool intersects (const QwtDoubleRect &) const


Constructor & Destructor Documentation

QwtDoubleRect::QwtDoubleRect  ) 
 

Constructs an rectangle with all components set to 0.0.

QwtDoubleRect::QwtDoubleRect double  x1,
double  x2,
double  y1,
double  y2
 

Constructs an rectangle with x1 to x2 as x-range and, y1 to y2 as y-range.

QwtDoubleRect::QwtDoubleRect double  x,
double  y,
const QwtDoubleSize size
 

Constructs an rectangle with x1 to x1 + size.width() as x-range and, y1 to y1 + size.height() as y-range.


Member Function Documentation

QwtDoublePoint QwtDoubleRect::center  )  const
 

Returns the center point of the rectangle.

bool QwtDoubleRect::contains const QwtDoubleRect other,
bool  proper = FALSE
const
 

Returns TRUE if the rectangle other is inside this rectangle; otherwise returns FALSE.

If proper is TRUE, this function returns TRUE only if other is entirely inside (not on the edge).

bool QwtDoubleRect::contains double  x,
double  y,
bool  proper = FALSE
const
 

Returns TRUE if the point (x, y) is inside or on the edge of the rectangle; otherwise returns FALSE.

If proper is TRUE, this function returns TRUE only if p is inside (not on the edge).

bool QwtDoubleRect::contains const QwtDoublePoint p,
bool  proper = FALSE
const
 

Returns TRUE if the point p is inside or on the edge of the rectangle; otherwise returns FALSE.

If proper is TRUE, this function returns TRUE only if p is inside (not on the edge).

double QwtDoubleRect::height  )  const
 

Returns the height.

QwtDoubleRect QwtDoubleRect::intersect const QwtDoubleRect other  )  const
 

Returns the intersection of this rectangle and rectangle other. r.intersect(s) is equivalent to r&s.

bool QwtDoubleRect::intersects const QwtDoubleRect other  )  const
 

Returns TRUE if this rectangle intersects with rectangle other; otherwise returns FALSE.

bool QwtDoubleRect::isEmpty  )  const
 

Returns TRUE if the rectangle is a empty rectangle; otherwise returns FALSE.

A rect is null when x1() >= x2() && y1() >= y2().

bool QwtDoubleRect::isNull  )  const
 

Returns TRUE if the rectangle is a null rectangle; otherwise returns FALSE.

A rect is null when x1() == x2() && y1() == y2().

bool QwtDoubleRect::isValid  )  const
 

Returns TRUE if the rectangle is a valid rectangle; otherwise returns FALSE.

A rect is valid when x1() <= x2() && y1() <= y2().

void QwtDoubleRect::move double  x,
double  y
 

moves x1() to x and y1() to y, leaving the size unchanged

void QwtDoubleRect::moveBy double  dx,
double  dy
 

moves x1() by dx and y1() by dy. leaving the size unchanged

void QwtDoubleRect::moveCenter double  dx,
double  dy
 

moves the center to (x, y), leaving the size unchanged

void QwtDoubleRect::moveCenter const QwtDoublePoint  ) 
 

moves the center to pos, leaving the size unchanged

void QwtDoubleRect::moveX double  x  ) 
 

moves x1() to x, leaving the size unchanged

void QwtDoubleRect::moveY double  y  ) 
 

moves y1() to y, leaving the size unchanged

QwtDoubleRect QwtDoubleRect::normalize  )  const
 

Returns a normalized rectangle, i.e. a rectangle that has a non-negative width and height.

It swaps x1 and x2 if x1() > x2(), and swaps y1 and y2 if y1() > y2().

QwtDoubleRect QwtDoubleRect::operator & const QwtDoubleRect other  )  const
 

Returns the intersection of this rectangle and rectangle other. Returns an empty rectangle if there is no intersection.

QwtDoubleRect & QwtDoubleRect::operator &= const QwtDoubleRect r  ) 
 

Intersects this rectangle with rectangle other.

bool QwtDoubleRect::operator!= const QwtDoubleRect  )  const
 

Returns TRUE if this rect and other are different; otherwise returns FALSE.

bool QwtDoubleRect::operator== const QwtDoubleRect  )  const
 

Returns TRUE if this rect and other are equal; otherwise returns FALSE.

QwtDoubleRect QwtDoubleRect::operator| const QwtDoubleRect other  )  const
 

Returns the bounding rectangle of this rectangle and rectangle other. The bounding rectangle of a nonempty rectangle and an empty or invalid rectangle is defined to be the nonempty rectangle.

QwtDoubleRect & QwtDoubleRect::operator|= const QwtDoubleRect r  ) 
 

Unites this rectangle with rectangle other.

double & QwtDoubleRect::rx1  ) 
 

Returns a reference to x1.

double & QwtDoubleRect::rx2  ) 
 

Returns a reference to x2.

double & QwtDoubleRect::ry1  ) 
 

Returns a reference to y1.

double & QwtDoubleRect::ry2  ) 
 

Returns a reference to y2.

void QwtDoubleRect::setHeight double  h  ) 
 

Set the height, by y2 = y1 + h;.

void QwtDoubleRect::setRect double  x1,
double  x2,
double  y1,
double  y2
 

Set the x-range from x1 to x2 and the y-range from y1 to y2.

void QwtDoubleRect::setSize const QwtDoubleSize size  ) 
 

Sets the size of the rectangle to size. Changes x2 and y2 only.

void QwtDoubleRect::setWidth double  w  ) 
 

Set the width, by x2 = x1 + w;.

void QwtDoubleRect::setX1 double   ) 
 

Set x1.

void QwtDoubleRect::setX2 double   ) 
 

Set x2.

void QwtDoubleRect::setY1 double   ) 
 

Set y1.

void QwtDoubleRect::setY2 double   ) 
 

Set y2.

QwtDoubleSize QwtDoubleRect::size  )  const
 

Returns the size.

QwtDoubleRect QwtDoubleRect::unite const QwtDoubleRect other  )  const
 

Returns the bounding rectangle of this rectangle and rectangle other. r.unite(s) is equivalent to r|s.

double QwtDoubleRect::width  )  const
 

Returns the width.

double QwtDoubleRect::x1  )  const
 

Returns x1.

double QwtDoubleRect::x2  )  const
 

Returns x2.

double QwtDoubleRect::y1  )  const
 

Returns y1.

double QwtDoubleRect::y2  )  const
 

Returns y2.


Generated on Tue Nov 4 09:53:48 2003 for Qwt User's Guide by doxygen 1.3.4