Logo Search packages:      
Sourcecode: djvulibre version File versions

GRect Class Reference

#include <GRect.h>

Inherited by MapPiece.

List of all members.

Detailed Description

Rectangle class. Each instance of this class represents a rectangle whose sides are parallel to the axis. Such a rectangle represents all the points whose coordinates lies between well defined minimal and maximal values. Member functions can combine several rectangles by computing the intersection of rectangles ({intersect}) or the smallest rectangle enclosing two rectangles ({recthull}).

Definition at line 141 of file GRect.h.

Public Member Functions

int area () const
void clear ()
int contains (const GRect &rect) const
int contains (int x, int y) const
 GRect (int xmin, int ymin, unsigned int width=0, unsigned int height=0)
 GRect ()
int height () const
int inflate (int dx, int dy)
int intersect (const GRect &rect1, const GRect &rect2)
bool isempty () const
int recthull (const GRect &rect1, const GRect &rect2)
void scale (float xfactor, float yfactor)
void scale (float factor)
int translate (int dx, int dy)
int width () const

Public Attributes

int xmax
int xmin
int ymax
int ymin


int operator!= (const GRect &r1, const GRect &r2)
int operator== (const GRect &r1, const GRect &r2)

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

Generated by  Doxygen 1.6.0   Back to index