Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GrayLib::cRectT< TYPE > Class Template Reference

#include <cRectT.h>

Inheritance diagram for GrayLib::cRectT< TYPE >:
GrayLib::cRectNT< float > GrayLib::cRectNT< int > GrayGraph::CGraphCoords GrayLib::cRectFT< TYPE > GrayLib::cRectI GrayGraph::CGraphIntervals

Public Types

typedef TYPE DVALUE_t
 Dimension value type. More...
 

Public Member Functions

 cRectT () noexcept
 
 cRectT (TYPE x1, TYPE y1, TYPE x2, TYPE y2) noexcept
 
 cRectT (const THIS_t &rect) noexcept
 
TYPE get_DiffX () const noexcept
 
TYPE get_DiffY () const noexcept
 
cVecT2< TYPEget_Center () const noexcept
 
float get_AspectRatio () const noexcept
 
bool IsEqual (const THIS_t &rect) const noexcept
 
bool operator== (const THIS_t &rect) const noexcept
 
bool operator!= (const THIS_t &rect) const noexcept
 
bool isRectNull () const noexcept
 
bool isRectNormal () const noexcept
 
bool isRectNormalE () const noexcept
 
bool IsInRangeX (TYPE value) const noexcept
 
bool IsInRangeY (TYPE value) const noexcept
 
void SetRectNull () noexcept
 
void SetRectWH (TYPE nLeft, TYPE nTop, TYPE nWidth, TYPE nHeight) noexcept
 
void SetRectEmptyX () noexcept
 
void SetRect4 (TYPE nLeft, TYPE nTop, TYPE nRight, TYPE nBottom) noexcept
 
void SetRectAsPt (TYPE x, TYPE y) noexcept
 
void SetRectAsPt (const POINT_t &pt) noexcept
 
void SetRectFromSphere (TYPE x, TYPE y, TYPE nRadius) noexcept
 
HRESULT SetRectAsStr (const char *pszStr)
 
void OffsetRectX (TYPE dx) noexcept
 
void OffsetRectY (TYPE dy) noexcept
 
void OffsetRect (TYPE dx, TYPE dy) noexcept
 
void UnionX (TYPE x) noexcept
 
void UnionY (TYPE y) noexcept
 
void Union2 (TYPE x, TYPE y) noexcept
 
void Union4 (const THIS_t &rect) noexcept
 
void ScrollInRangeX (TYPE value) noexcept
 
void ScrollInRangeY (TYPE value)
 
void SetRectNotEmpty (TYPE iMin=10) noexcept
 
void ScaleX (float mx) noexcept
 
void ScaleY (float my) noexcept
 
void Scale (float mx, float my) noexcept
 
void AddScaleY () noexcept
 
void NormalizeRect () noexcept
 

Public Attributes

TYPE left
 
TYPE top
 
TYPE right
 
TYPE bottom
 

Detailed Description

template<typename TYPE = double>
class GrayLib::cRectT< TYPE >

A 2d rectangle x,y,x2,y2 of arbitrary TYPE precision units. DO not assume inclusive or exclusive of right, bottom. DOES NOT ASSUME Normalized. i.e. Left,Top less than Right,Bottom

Member Typedef Documentation

◆ DVALUE_t

template<typename TYPE = double>
typedef TYPE GrayLib::cRectT< TYPE >::DVALUE_t

Dimension value type.

Constructor & Destructor Documentation

◆ cRectT() [1/3]

template<typename TYPE = double>
GrayLib::cRectT< TYPE >::cRectT ( )
inlinenoexcept

◆ cRectT() [2/3]

template<typename TYPE = double>
GrayLib::cRectT< TYPE >::cRectT ( TYPE  x1,
TYPE  y1,
TYPE  x2,
TYPE  y2 
)
inlinenoexcept

◆ cRectT() [3/3]

template<typename TYPE = double>
GrayLib::cRectT< TYPE >::cRectT ( const THIS_t rect)
inlinenoexcept

Member Function Documentation

◆ AddScaleY()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::AddScaleY ( )
inlinenoexcept

Create a 'not empty' rectangle.

◆ get_AspectRatio()

template<typename TYPE = double>
float GrayLib::cRectT< TYPE >::get_AspectRatio ( ) const
inlinenoexcept

◆ get_Center()

template<typename TYPE = double>
cVecT2<TYPE> GrayLib::cRectT< TYPE >::get_Center ( ) const
inlinenoexcept

◆ get_DiffX()

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::get_DiffX ( ) const
inlinenoexcept

◆ get_DiffY()

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::get_DiffY ( ) const
inlinenoexcept

◆ IsEqual()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::IsEqual ( const THIS_t rect) const
inlinenoexcept

◆ IsInRangeX()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::IsInRangeX ( TYPE  value) const
inlinenoexcept

inclusive test.

◆ IsInRangeY()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::IsInRangeY ( TYPE  value) const
inlinenoexcept

inclusive test.

◆ isRectNormal()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::isRectNormal ( ) const
inlinenoexcept

is this rect normalized ? (and not empty)

◆ isRectNormalE()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::isRectNormalE ( ) const
inlinenoexcept

is this rect normalized ? (or empty)

◆ isRectNull()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::isRectNull ( ) const
inlinenoexcept

is this rect all zeros?

◆ NormalizeRect()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::NormalizeRect ( )
inlinenoexcept

Just like MFC CRect::NormalizeRect

◆ OffsetRect()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::OffsetRect ( TYPE  dx,
TYPE  dy 
)
inlinenoexcept

just move the rect. MFC compat.

◆ OffsetRectX()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::OffsetRectX ( TYPE  dx)
inlinenoexcept

◆ OffsetRectY()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::OffsetRectY ( TYPE  dy)
inlinenoexcept

◆ operator!=()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::operator!= ( const THIS_t rect) const
inlinenoexcept

◆ operator==()

template<typename TYPE = double>
bool GrayLib::cRectT< TYPE >::operator== ( const THIS_t rect) const
inlinenoexcept

◆ Scale()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::Scale ( float  mx,
float  my 
)
inlinenoexcept

◆ ScaleX()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::ScaleX ( float  mx)
inlinenoexcept

◆ ScaleY()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::ScaleY ( float  my)
inlinenoexcept

◆ ScrollInRangeX()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::ScrollInRangeX ( TYPE  value)
inlinenoexcept

◆ ScrollInRangeY()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::ScrollInRangeY ( TYPE  value)
inline

◆ SetRect4()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRect4 ( TYPE  nLeft,
TYPE  nTop,
TYPE  nRight,
TYPE  nBottom 
)
inlinenoexcept

◆ SetRectAsPt() [1/2]

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectAsPt ( const POINT_t pt)
inlinenoexcept

◆ SetRectAsPt() [2/2]

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectAsPt ( TYPE  x,
TYPE  y 
)
inlinenoexcept

◆ SetRectAsStr()

template<typename TYPE = double>
HRESULT GrayLib::cRectT< TYPE >::SetRectAsStr ( const char *  pszStr)
inline

◆ SetRectEmptyX()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectEmptyX ( )
inlinenoexcept

Extremely empty.

◆ SetRectFromSphere()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectFromSphere ( TYPE  x,
TYPE  y,
TYPE  nRadius 
)
inlinenoexcept

◆ SetRectNotEmpty()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectNotEmpty ( TYPE  iMin = 10)
inlinenoexcept

Create a 'not empty' rectangle.

◆ SetRectNull()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectNull ( )
inlinenoexcept

Create a empty and null/zero rectangle. "WinAPI ::SetRectEmpty()"

◆ SetRectWH()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::SetRectWH ( TYPE  nLeft,
TYPE  nTop,
TYPE  nWidth,
TYPE  nHeight 
)
inlinenoexcept

◆ Union2()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::Union2 ( TYPE  x,
TYPE  y 
)
inlinenoexcept

Do not enforce direction of the range. Not normalized

◆ Union4()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::Union4 ( const THIS_t rect)
inlinenoexcept

Do not enforce direction of the range. Not normalized

◆ UnionX()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::UnionX ( TYPE  x)
inlinenoexcept

Not normalized inclusive union. Do not enforce direction of the range.

◆ UnionY()

template<typename TYPE = double>
void GrayLib::cRectT< TYPE >::UnionY ( TYPE  y)
inlinenoexcept

Not normalized inclusive union Do not enforce direction of the range.

Member Data Documentation

◆ bottom

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::bottom

◆ left

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::left

◆ right

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::right

◆ top

template<typename TYPE = double>
TYPE GrayLib::cRectT< TYPE >::top

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