Otclient  14/8/2020
TSize< T > Class Template Reference

#include <point.h>

Public Member Functions

 TSize ()
 
 TSize (T width, T height)
 
 TSize (const TSize< T > &other)
 
TPoint< T > toPoint () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isValid () const
 
int width () const
 
int height () const
 
void resize (T w, T h)
 
void setWidth (T w)
 
void setHeight (T h)
 
TSize< T > operator- () const
 
TSize< T > operator+ (const TSize< T > &other) const
 
TSize< T > & operator+= (const TSize< T > &other)
 
TSize< T > operator- (const TSize< T > &other) const
 
TSize< T > & operator-= (const TSize< T > &other)
 
TSize< T > operator* (const TSize< T > &other) const
 
TSize< T > & operator*= (const TSize< T > &other)
 
TSize< T > operator/ (const TSize< T > &other) const
 
TSize< T > & operator/= (const TSize< T > &other)
 
TSize< T > operator* (const float v) const
 
TSize< T > & operator*= (const float v)
 
TSize< T > operator/ (const float v) const
 
TSize< T > & operator/= (const float v)
 
bool operator<= (const TSize< T > &other) const
 
bool operator>= (const TSize< T > &other) const
 
bool operator< (const TSize< T > &other) const
 
bool operator> (const TSize< T > &other) const
 
TSize< T > & operator= (const TSize< T > &other)
 
bool operator== (const TSize< T > &other) const
 
bool operator!= (const TSize< T > &other) const
 
TSize< T > expandedTo (const TSize< T > &other) const
 
TSize< T > boundedTo (const TSize< T > &other) const
 
void scale (const TSize< T > &s, Fw::AspectRatioMode mode)
 
void scale (int w, int h, Fw::AspectRatioMode mode)
 
float ratio () const
 
area () const
 

Detailed Description

template<class T>
class TSize< T >

Definition at line 31 of file point.h.

Constructor & Destructor Documentation

◆ TSize() [1/3]

template<class T >
TSize< T >::TSize ( )
inline

Definition at line 33 of file size.h.

◆ TSize() [2/3]

template<class T >
TSize< T >::TSize ( width,
height 
)
inline

Definition at line 34 of file size.h.

◆ TSize() [3/3]

template<class T >
TSize< T >::TSize ( const TSize< T > &  other)
inline

Definition at line 35 of file size.h.

Member Function Documentation

◆ area()

template<class T >
T TSize< T >::area ( ) const
inline

Definition at line 101 of file size.h.

Here is the caller graph for this function:

◆ boundedTo()

template<class T >
TSize<T> TSize< T >::boundedTo ( const TSize< T > &  other) const
inline

Definition at line 74 of file size.h.

◆ expandedTo()

template<class T >
TSize<T> TSize< T >::expandedTo ( const TSize< T > &  other) const
inline

Definition at line 73 of file size.h.

◆ height()

template<class T >
int TSize< T >::height ( ) const
inline

Definition at line 44 of file size.h.

Here is the caller graph for this function:

◆ isEmpty()

template<class T >
bool TSize< T >::isEmpty ( ) const
inline

Definition at line 40 of file size.h.

◆ isNull()

template<class T >
bool TSize< T >::isNull ( ) const
inline

Definition at line 39 of file size.h.

◆ isValid()

template<class T >
bool TSize< T >::isValid ( ) const
inline

Definition at line 41 of file size.h.

Here is the caller graph for this function:

◆ operator!=()

template<class T >
bool TSize< T >::operator!= ( const TSize< T > &  other) const
inline

Definition at line 71 of file size.h.

◆ operator*() [1/2]

template<class T >
TSize<T> TSize< T >::operator* ( const float  v) const
inline

Definition at line 59 of file size.h.

◆ operator*() [2/2]

template<class T >
TSize<T> TSize< T >::operator* ( const TSize< T > &  other) const
inline

Definition at line 55 of file size.h.

◆ operator*=() [1/2]

template<class T >
TSize<T>& TSize< T >::operator*= ( const float  v)
inline

Definition at line 60 of file size.h.

◆ operator*=() [2/2]

template<class T >
TSize<T>& TSize< T >::operator*= ( const TSize< T > &  other)
inline

Definition at line 56 of file size.h.

◆ operator+()

template<class T >
TSize<T> TSize< T >::operator+ ( const TSize< T > &  other) const
inline

Definition at line 51 of file size.h.

◆ operator+=()

template<class T >
TSize<T>& TSize< T >::operator+= ( const TSize< T > &  other)
inline

Definition at line 52 of file size.h.

◆ operator-() [1/2]

template<class T >
TSize<T> TSize< T >::operator- ( ) const
inline

Definition at line 50 of file size.h.

◆ operator-() [2/2]

template<class T >
TSize<T> TSize< T >::operator- ( const TSize< T > &  other) const
inline

Definition at line 53 of file size.h.

◆ operator-=()

template<class T >
TSize<T>& TSize< T >::operator-= ( const TSize< T > &  other)
inline

Definition at line 54 of file size.h.

◆ operator/() [1/2]

template<class T >
TSize<T> TSize< T >::operator/ ( const float  v) const
inline

Definition at line 61 of file size.h.

◆ operator/() [2/2]

template<class T >
TSize<T> TSize< T >::operator/ ( const TSize< T > &  other) const
inline

Definition at line 57 of file size.h.

◆ operator/=() [1/2]

template<class T >
TSize<T>& TSize< T >::operator/= ( const float  v)
inline

Definition at line 62 of file size.h.

◆ operator/=() [2/2]

template<class T >
TSize<T>& TSize< T >::operator/= ( const TSize< T > &  other)
inline

Definition at line 58 of file size.h.

◆ operator<()

template<class T >
bool TSize< T >::operator< ( const TSize< T > &  other) const
inline

Definition at line 66 of file size.h.

◆ operator<=()

template<class T >
bool TSize< T >::operator<= ( const TSize< T > &  other) const
inline

Definition at line 64 of file size.h.

◆ operator=()

template<class T >
TSize<T>& TSize< T >::operator= ( const TSize< T > &  other)
inline

Definition at line 69 of file size.h.

◆ operator==()

template<class T >
bool TSize< T >::operator== ( const TSize< T > &  other) const
inline

Definition at line 70 of file size.h.

◆ operator>()

template<class T >
bool TSize< T >::operator> ( const TSize< T > &  other) const
inline

Definition at line 67 of file size.h.

◆ operator>=()

template<class T >
bool TSize< T >::operator>= ( const TSize< T > &  other) const
inline

Definition at line 65 of file size.h.

◆ ratio()

template<class T >
float TSize< T >::ratio ( ) const
inline

Definition at line 100 of file size.h.

Here is the caller graph for this function:

◆ resize()

template<class T >
void TSize< T >::resize ( w,
h 
)
inline

Definition at line 46 of file size.h.

Here is the caller graph for this function:

◆ scale() [1/2]

template<class T >
void TSize< T >::scale ( const TSize< T > &  s,
Fw::AspectRatioMode  mode 
)
inline

Definition at line 76 of file size.h.

Here is the caller graph for this function:

◆ scale() [2/2]

template<class T >
void TSize< T >::scale ( int  w,
int  h,
Fw::AspectRatioMode  mode 
)
inline

Definition at line 98 of file size.h.

Here is the caller graph for this function:

◆ setHeight()

template<class T >
void TSize< T >::setHeight ( h)
inline

Definition at line 48 of file size.h.

Here is the caller graph for this function:

◆ setWidth()

template<class T >
void TSize< T >::setWidth ( w)
inline

Definition at line 47 of file size.h.

Here is the caller graph for this function:

◆ toPoint()

template<class T >
TPoint<T> TSize< T >::toPoint ( ) const
inline

Definition at line 37 of file size.h.

Here is the caller graph for this function:

◆ width()

template<class T >
int TSize< T >::width ( ) const
inline

Definition at line 43 of file size.h.

Here is the caller graph for this function:

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