DISTRHO Plugin Framework
Public Member Functions | Friends | List of all members
Size< T > Class Template Reference

#include <Geometry.hpp>

Public Member Functions

 Size () noexcept
 
 Size (const T &width, const T &height) noexcept
 
 Size (const Size< T > &size) noexcept
 
const T & getWidth () const noexcept
 
const T & getHeight () const noexcept
 
void setWidth (const T &width) noexcept
 
void setHeight (const T &height) noexcept
 
void setSize (const T &width, const T &height) noexcept
 
void setSize (const Size< T > &size) noexcept
 
void growBy (double multiplier) noexcept
 
void shrinkBy (double divider) noexcept
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
Size< int > toInt () const noexcept
 
Size< T > operator+ (const Size< T > &size) noexcept
 
Size< T > operator- (const Size< T > &size) noexcept
 
Size< T > & operator= (const Size< T > &size) noexcept
 
Size< T > & operator+= (const Size< T > &size) noexcept
 
Size< T > & operator-= (const Size< T > &size) noexcept
 
Size< T > & operator*= (double m) noexcept
 
Size< T > & operator/= (double d) noexcept
 
Size< T > operator* (double m) const noexcept
 
Size< T > operator/ (double m) const noexcept
 
bool operator== (const Size< T > &size) const noexcept
 
bool operator!= (const Size< T > &size) const noexcept
 

Friends

template<typename >
class Rectangle
 

Detailed Description

template<typename T>
class Size< T >

DGL Size class.

This class describes a size, defined by a width and height value.

Constructor & Destructor Documentation

◆ Size() [1/3]

template<typename T >
Size< T >::Size ( )
noexcept

Constructor for null size (0x0).

◆ Size() [2/3]

template<typename T >
Size< T >::Size ( const T &  width,
const T &  height 
)
noexcept

Constructor using custom width and height values.

◆ Size() [3/3]

template<typename T >
Size< T >::Size ( const Size< T > &  size)
noexcept

Constructor using another Size class values.

Member Function Documentation

◆ getWidth()

template<typename T >
const T& Size< T >::getWidth ( ) const
noexcept

Get width.

◆ getHeight()

template<typename T >
const T& Size< T >::getHeight ( ) const
noexcept

Get height.

◆ setWidth()

template<typename T >
void Size< T >::setWidth ( const T &  width)
noexcept

Set width.

◆ setHeight()

template<typename T >
void Size< T >::setHeight ( const T &  height)
noexcept

Set height.

◆ setSize() [1/2]

template<typename T >
void Size< T >::setSize ( const T &  width,
const T &  height 
)
noexcept

Set size to width and height.

◆ setSize() [2/2]

template<typename T >
void Size< T >::setSize ( const Size< T > &  size)
noexcept

Set size.

◆ growBy()

template<typename T >
void Size< T >::growBy ( double  multiplier)
noexcept

Grow size by multiplier.

◆ shrinkBy()

template<typename T >
void Size< T >::shrinkBy ( double  divider)
noexcept

Shrink size by divider.

◆ isNull()

template<typename T >
bool Size< T >::isNull ( ) const
noexcept

Return true if size is null (0x0). An null size is also invalid.

◆ isNotNull()

template<typename T >
bool Size< T >::isNotNull ( ) const
noexcept

Return true if size is not null (0x0). A non-null size is still invalid if its width or height are negative.

◆ isValid()

template<typename T >
bool Size< T >::isValid ( ) const
noexcept

Return true if size is valid (width and height are higher than zero).

◆ isInvalid()

template<typename T >
bool Size< T >::isInvalid ( ) const
noexcept

Return true if size is invalid (width or height are lower or equal to zero). An invalid size might not be null under some circumstances.


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