CompRegion Class Reference

A 2D region with an (x,y) position and arbitrary dimensions similar to an XRegion. More...

#include <region.h>

List of all members.

Public Types

typedef std::vector< CompRegionList
typedef std::vector< CompRegion * > PtrList
typedef std::vector< CompRegionVector
typedef std::vector< CompRegion * > PtrVector

Public Member Functions

 CompRegion (const CompRegion &)
 CompRegion (int x, int y, int w, int h)
 CompRegion (const CompRect &)
 CompRegion (const CompPoint::vector &)
CompRect boundingRect () const
 Returns a CompRect which encapsulates a given CompRegion.
bool isEmpty () const
int numRects () const
 Returns the number of XRectangles in the XRegion handle.
CompRect::vector rects () const
 Returns a vector of all the XRectangles in the XRegion handle.
const Region handle () const
 Returns the internal XRegion handle.
bool contains (const CompPoint &) const
 Returns true if the specified CompPoint falls within the CompRegion.
bool contains (const CompRect &) const
 Returns true if the specified CompRect falls within the CompRegion.
bool contains (int x, int y, int width, int height) const
 Returns true if the specified size falls withing the CompRegion.
CompRegion intersected (const CompRegion &) const
 Returns a CompRegion that is the result of an intersect with the specified CompRegion and the region.
CompRegion intersected (const CompRect &) const
 Returns a CompRegion that is the result of an intersect with the specified CompRect and the region.
bool intersects (const CompRegion &) const
 Returns true if a specified CompRegion intersects a region.
bool intersects (const CompRect &) const
 Returns true if a specified CompRect intersects a region.
CompRegion subtracted (const CompRegion &) const
 Returns a CompRegion covering the area of the region and not including the area of the specified CompRegion.
CompRegion subtracted (const CompRect &) const
 Returns a CompRegion covering the area of the region and not including the area of the specified CompRect.
void translate (int dx, int dy)
 Moves a region by x and y amount.
void translate (const CompPoint &)
 Moves a region by an amount specified by the co-ordinates of a CompPoint.
CompRegion translated (int, int) const
 Returns a CompRegion which is the result of the region being moved by dx and dy amount.
CompRegion translated (const CompPoint &) const
 Returns a CompRegion which is the result of the region being moved by an amount specified by the co-ordinates of a CompPoint.
void shrink (int, int)
void shrink (const CompPoint &)
CompRegion shrinked (int, int) const
CompRegion shrinked (const CompPoint &) const
CompRegion united (const CompRegion &) const
 Returns a CompRegion which is the result of the region joined with a specified CompRegion.
CompRegion united (const CompRect &) const
 Returns a CompRegion which is the result of the region joined with a specified CompRect.
CompRegion xored (const CompRegion &) const
 Returns a CompRegion which is the result of the region joined with a specified CompRegion, excluding the area in which both regions intersect.
bool operator== (const CompRegion &) const
bool operator!= (const CompRegion &) const
const CompRegion operator & (const CompRegion &) const
const CompRegion operator & (const CompRect &) const
CompRegionoperator &= (const CompRegion &)
CompRegionoperator &= (const CompRect &)
const CompRegion operator+ (const CompRegion &) const
const CompRegion operator+ (const CompRect &) const
CompRegionoperator+= (const CompRegion &)
CompRegionoperator+= (const CompRect &)
const CompRegion operator- (const CompRegion &) const
const CompRegion operator- (const CompRect &) const
CompRegionoperator-= (const CompRegion &)
CompRegionoperator-= (const CompRect &)
CompRegionoperator= (const CompRegion &)
const CompRegion operator^ (const CompRegion &) const
CompRegionoperator^= (const CompRegion &)
const CompRegion operator| (const CompRegion &) const
CompRegionoperator|= (const CompRegion &)


Detailed Description

A 2D region with an (x,y) position and arbitrary dimensions similar to an XRegion.

It's data membmers are private and must be manipulated with set() methods.


Member Function Documentation

CompRect CompRegion::boundingRect (  )  const

Returns a CompRect which encapsulates a given CompRegion.

int CompRegion::numRects (  )  const

Returns the number of XRectangles in the XRegion handle.

CompRect::vector CompRegion::rects (  )  const

Returns a vector of all the XRectangles in the XRegion handle.

const Region CompRegion::handle (  )  const

Returns the internal XRegion handle.

bool CompRegion::contains ( const CompPoint  )  const

Returns true if the specified CompPoint falls within the CompRegion.

bool CompRegion::contains ( const CompRect  )  const

Returns true if the specified CompRect falls within the CompRegion.

bool CompRegion::contains ( int  x,
int  y,
int  width,
int  height 
) const

Returns true if the specified size falls withing the CompRegion.

CompRegion CompRegion::intersected ( const CompRegion  )  const

Returns a CompRegion that is the result of an intersect with the specified CompRegion and the region.

CompRegion CompRegion::intersected ( const CompRect  )  const

Returns a CompRegion that is the result of an intersect with the specified CompRect and the region.

bool CompRegion::intersects ( const CompRegion  )  const

Returns true if a specified CompRegion intersects a region.

bool CompRegion::intersects ( const CompRect  )  const

Returns true if a specified CompRect intersects a region.

CompRegion CompRegion::subtracted ( const CompRegion  )  const

Returns a CompRegion covering the area of the region and not including the area of the specified CompRegion.

CompRegion CompRegion::subtracted ( const CompRect  )  const

Returns a CompRegion covering the area of the region and not including the area of the specified CompRect.

void CompRegion::translate ( int  dx,
int  dy 
)

Moves a region by x and y amount.

void CompRegion::translate ( const CompPoint  ) 

Moves a region by an amount specified by the co-ordinates of a CompPoint.

CompRegion CompRegion::translated ( int  ,
int   
) const

Returns a CompRegion which is the result of the region being moved by dx and dy amount.

CompRegion CompRegion::translated ( const CompPoint  )  const

Returns a CompRegion which is the result of the region being moved by an amount specified by the co-ordinates of a CompPoint.

CompRegion CompRegion::united ( const CompRegion  )  const

Returns a CompRegion which is the result of the region joined with a specified CompRegion.

CompRegion CompRegion::united ( const CompRect  )  const

Returns a CompRegion which is the result of the region joined with a specified CompRect.

CompRegion CompRegion::xored ( const CompRegion  )  const

Returns a CompRegion which is the result of the region joined with a specified CompRegion, excluding the area in which both regions intersect.


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

Generated on Wed Feb 2 22:44:14 2011 for Compiz by  doxygen 1.5.6