CompRect Class Reference

A 2D rectangle, which is likely in screen space. More...

#include <rect.h>

Inherited by CompOutput, and CompWindow::Geometry.

List of all members.

Public Types

typedef std::vector< CompRectvector
typedef std::vector< CompRect * > ptrVector
typedef std::list< CompRect * > ptrList

Public Member Functions

 CompRect (int x, int y, int width, int height)
 CompRect (const CompRect &)
 CompRect (const XRectangle)
int x () const
int y () const
CompPoint pos () const
int width () const
int height () const
int x1 () const
int y1 () const
int x2 () const
int y2 () const
int left () const
int right () const
int top () const
int bottom () const
int centerX () const
int centerY () const
CompPoint center () const
int area () const
const Region region () const
 Returns an X region handle for the CompRect.
void setGeometry (int x, int y, int width, int height)
void setX (int)
void setY (int)
void setWidth (int)
void setHeight (int)
void setPos (const CompPoint &)
void setSize (const CompSize &)
void setLeft (int)
 Sets the left edge position.
void setTop (int)
 Sets the top edge position.
void setRight (int)
 Sets the right edge position.
void setBottom (int)
 Sets the bottom edge position.
bool contains (const CompPoint &) const
bool contains (const CompRect &) const
bool intersects (const CompRect &) const
bool isEmpty () const
bool operator== (const CompRect &) const
bool operator!= (const CompRect &) const
CompRect operator & (const CompRect &) const
CompRectoperator &= (const CompRect &)
CompRectoperator= (const CompRect &)


Detailed Description

A 2D rectangle, which is likely in screen space.

It's data is isolated and can only be mutated with set() methods.


Member Function Documentation

const Region CompRect::region (  )  const

Returns an X region handle for the CompRect.

void CompRect::setLeft ( int   ) 

Sets the left edge position.

Setting an edge past it's opposite edge will result in both edges being set to the new value

void CompRect::setTop ( int   ) 

Sets the top edge position.

Setting an edge past it's opposite edge will result in both edges being set to the new value

void CompRect::setRight ( int   ) 

Sets the right edge position.

Setting an edge past it's opposite edge will result in both edges being set to the new value

void CompRect::setBottom ( int   ) 

Sets the bottom edge position.

Setting an edge past it's opposite edge will result in both edges being set to the new value


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