VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
CRect Struct Reference

Rect structure. More...

#include <crect.h>

Public Member Functions

constexpr CRect ()=default
 
constexpr CRect (CCoord left, CCoord top, CCoord right, CCoord bottom)
 
constexpr CRect (const CRect &r)=default
 
CRectoperator= (const CRect &r)=default
 
 CRect (const CPoint &origin, const CPoint &size)
 
CRectoperator() (CCoord left, CCoord top, CCoord right, CCoord bottom)
 
constexpr bool operator!= (const CRect &other) const
 
constexpr bool operator== (const CRect &other) const
 
constexpr CCoord getWidth () const
 
constexpr CCoord getHeight () const
 
CRectsetWidth (CCoord width)
 
CRectsetHeight (CCoord height)
 
CPoint getTopLeft () const
 
CPoint getTopRight () const
 
CPoint getBottomLeft () const
 
CPoint getBottomRight () const
 
CPoint getTopCenter () const
 
CPoint getBottomCenter () const
 
CPoint getLeftCenter () const
 
CPoint getRightCenter () const
 
CRectsetTopLeft (const CPoint &inPoint)
 
CRectsetTopRight (const CPoint &inPoint)
 
CRectsetBottomLeft (const CPoint &inPoint)
 
CRectsetBottomRight (const CPoint &inPoint)
 
CPoint getCenter () const
 
CPoint getSize () const
 
CRectsetSize (const CPoint &size)
 
CRectoffset (CCoord c)
 
CRectoffset (CCoord x, CCoord y)
 
CRectinset (CCoord deltaX, CCoord deltaY)
 
CRectextend (CCoord deltaX, CCoord deltaY)
 
CRectmoveTo (CCoord x, CCoord y)
 
CRectinset (const CPoint &p)
 
CRectextend (const CPoint &p)
 
CRectmoveTo (const CPoint &p)
 
CRectoffset (const CPoint &p)
 
CRectoffsetInverse (const CPoint &p)
 
constexpr bool pointInside (const CPoint &where) const
 Checks if point is inside this rect. More...
 
constexpr bool isEmpty () const
 
constexpr bool rectOverlap (const CRect &rect) const
 
constexpr bool rectInside (const CRect &rect) const
 Checks if rect is inside this rect. More...
 
CRectbound (const CRect &rect)
 
CRectunite (const CRect &rect)
 
CRectnormalize ()
 
CRectoriginize ()
 
CRectcenterInside (const CRect &r)
 moves this rect to the center of r More...
 
CRectmakeIntegral ()
 

Public Attributes

CCoord left {0.}
 
CCoord top {0.}
 
CCoord right {0.}
 
CCoord bottom {0.}
 

Detailed Description

Rect structure.

Constructor & Destructor Documentation

◆ CRect() [1/4]

constexpr CRect ( )
constexprdefault

◆ CRect() [2/4]

constexpr CRect ( CCoord  left,
CCoord  top,
CCoord  right,
CCoord  bottom 
)
inlineconstexpr

◆ CRect() [3/4]

constexpr CRect ( const CRect r)
inlineconstexprdefault

◆ CRect() [4/4]

CRect ( const CPoint origin,
const CPoint size 
)
inline

Member Function Documentation

◆ bound()

CRect & bound ( const CRect rect)
inline

◆ centerInside()

CRect & centerInside ( const CRect r)
inline

moves this rect to the center of r

◆ extend() [1/2]

CRect & extend ( CCoord  deltaX,
CCoord  deltaY 
)
inline

◆ extend() [2/2]

CRect & extend ( const CPoint p)
inline

◆ getBottomCenter()

CPoint getBottomCenter ( ) const
inline

◆ getBottomLeft()

CPoint getBottomLeft ( ) const
inline

◆ getBottomRight()

CPoint getBottomRight ( ) const
inline

◆ getCenter()

CPoint getCenter ( ) const
inline

◆ getHeight()

constexpr CCoord getHeight ( ) const
inlineconstexpr

◆ getLeftCenter()

CPoint getLeftCenter ( ) const
inline

◆ getRightCenter()

CPoint getRightCenter ( ) const
inline

◆ getSize()

CPoint getSize ( ) const
inline

◆ getTopCenter()

CPoint getTopCenter ( ) const
inline

◆ getTopLeft()

CPoint getTopLeft ( ) const
inline

◆ getTopRight()

CPoint getTopRight ( ) const
inline

◆ getWidth()

constexpr CCoord getWidth ( ) const
inlineconstexpr

◆ inset() [1/2]

CRect & inset ( CCoord  deltaX,
CCoord  deltaY 
)
inline

◆ inset() [2/2]

CRect & inset ( const CPoint p)
inline

◆ isEmpty()

constexpr bool isEmpty ( ) const
inlineconstexpr

◆ makeIntegral()

CRect & makeIntegral ( )
inline

◆ moveTo() [1/2]

CRect & moveTo ( CCoord  x,
CCoord  y 
)
inline

◆ moveTo() [2/2]

CRect & moveTo ( const CPoint p)
inline

◆ normalize()

CRect & normalize ( )
inline

◆ offset() [1/3]

CRect & offset ( CCoord  c)
inline

◆ offset() [2/3]

CRect & offset ( CCoord  x,
CCoord  y 
)
inline

◆ offset() [3/3]

CRect & offset ( const CPoint p)
inline

◆ offsetInverse()

CRect & offsetInverse ( const CPoint p)
inline

◆ operator!=()

constexpr bool operator!= ( const CRect other) const
inlineconstexpr

◆ operator()()

CRect & operator() ( CCoord  left,
CCoord  top,
CCoord  right,
CCoord  bottom 
)
inline

◆ operator=()

CRect & operator= ( const CRect r)
inlinedefault

◆ operator==()

constexpr bool operator== ( const CRect other) const
inlineconstexpr

◆ originize()

CRect & originize ( )
inline

◆ pointInside()

constexpr bool pointInside ( const CPoint where) const
inlineconstexpr

Checks if point is inside this rect.

◆ rectInside()

constexpr bool rectInside ( const CRect rect) const
inlineconstexpr

Checks if rect is inside this rect.

◆ rectOverlap()

constexpr bool rectOverlap ( const CRect rect) const
inlineconstexpr

◆ setBottomLeft()

CRect & setBottomLeft ( const CPoint inPoint)
inline

◆ setBottomRight()

CRect & setBottomRight ( const CPoint inPoint)
inline

◆ setHeight()

CRect & setHeight ( CCoord  height)
inline

◆ setSize()

CRect & setSize ( const CPoint size)
inline

◆ setTopLeft()

CRect & setTopLeft ( const CPoint inPoint)
inline

◆ setTopRight()

CRect & setTopRight ( const CPoint inPoint)
inline

◆ setWidth()

CRect & setWidth ( CCoord  width)
inline

◆ unite()

CRect & unite ( const CRect rect)
inline

Member Data Documentation

◆ bottom

CCoord bottom {0.}

◆ left

CCoord left {0.}

◆ right

CCoord right {0.}

◆ top

CCoord top {0.}

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