VSTGUI  3.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
CRect Struct Reference

Rect structure. More...

#include <vstgui.h>

Public Member Functions

 CRect (CCoord left=0, CCoord top=0, CCoord right=0, CCoord bottom=0)
 
 CRect (const CRect &r)
 
 CRect (const CPoint &origin, const CPoint &size)
 
CRectoperator() (CCoord left, CCoord top, CCoord right, CCoord bottom)
 
bool operator!= (const CRect &other) const
 
bool operator== (const CRect &other) const
 
CCoord width () const
 
CCoord height () const
 
CCoord getWidth () const
 
CCoord getHeight () const
 
void setWidth (CCoord width)
 
void setHeight (CCoord height)
 
CPoint getTopLeft () const
 
CPoint getTopRight () const
 
CPoint getBottomLeft () const
 
CPoint getBottomRight () const
 
void setTopLeft (const CPoint &inPoint)
 
void setTopRight (const CPoint &inPoint)
 
void setBottomLeft (const CPoint &inPoint)
 
void setBottomRight (const CPoint &inPoint)
 
CPoint getSize () const
 
void setSize (const CPoint &size)
 
CRectoffset (CCoord x, CCoord y)
 
CRectinset (CCoord deltaX, CCoord deltaY)
 
CRectmoveTo (CCoord x, CCoord y)
 
bool pointInside (const CPoint &where) const
 Checks if point is inside this rect. More...
 
bool isEmpty () const
 
bool rectOverlap (const CRect &rect) const
 
void bound (const CRect &rect)
 
void unite (const CRect &rect)
 
void normalize ()
 

Public Attributes

union {
   CCoord   left
 
   CCoord   x
 
}; 
 
union {
   CCoord   top
 
   CCoord   y
 
}; 
 
union {
   CCoord   right
 
   CCoord   x2
 
}; 
 
union {
   CCoord   bottom
 
   CCoord   y2
 
}; 
 

Detailed Description

Rect structure.

Constructor & Destructor Documentation

CRect ( CCoord  left = 0,
CCoord  top = 0,
CCoord  right = 0,
CCoord  bottom = 0 
)
inline
CRect ( const CRect r)
inline
CRect ( const CPoint origin,
const CPoint size 
)
inline

Member Function Documentation

void bound ( const CRect rect)
CPoint getBottomLeft ( ) const
CPoint getBottomRight ( ) const
CCoord getHeight ( ) const
inline
CPoint getSize ( ) const
CPoint getTopLeft ( ) const
CPoint getTopRight ( ) const
CCoord getWidth ( ) const
inline
CCoord height ( ) const
inline
CRect& inset ( CCoord  deltaX,
CCoord  deltaY 
)
inline
bool isEmpty ( ) const
CRect& moveTo ( CCoord  x,
CCoord  y 
)
inline
void normalize ( )
inline
CRect& offset ( CCoord  x,
CCoord  y 
)
inline
bool operator!= ( const CRect other) const
inline
CRect& operator() ( CCoord  left,
CCoord  top,
CCoord  right,
CCoord  bottom 
)
inline
bool operator== ( const CRect other) const
inline
bool pointInside ( const CPoint where) const

Checks if point is inside this rect.

bool rectOverlap ( const CRect rect) const
inline
void setBottomLeft ( const CPoint inPoint)
void setBottomRight ( const CPoint inPoint)
void setHeight ( CCoord  height)
inline
void setSize ( const CPoint size)
void setTopLeft ( const CPoint inPoint)
void setTopRight ( const CPoint inPoint)
void setWidth ( CCoord  width)
inline
void unite ( const CRect rect)
CCoord width ( ) const
inline

Member Data Documentation

union { ... }
union { ... }
union { ... }
union { ... }
CCoord bottom
CCoord left
CCoord right
CCoord top
CCoord x
CCoord x2
CCoord y
CCoord y2

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