esvg::Dimension Class Reference

#include <Dimension.hpp>

Public Member Functions

 Dimension ()
 
 Dimension (const vec2 &_size, enum esvg::distance _type=esvg::distance_pixel)
 
 Dimension (const std::string &_config)
 
 Dimension (const std::string &_configX, const std::string &_configY)
 
 ~Dimension ()
 
 operator std::string () const
 
const vec2getValue () const
 
enum distance getType () const
 
void set (const vec2 &_size, enum distance _type)
 
void set (std::string _config)
 
void set (std::string _configX, std::string _configY)
 
vec2 getPixel (const vec2 &_upperSize) const
 
const Dimensionoperator= (const Dimension &_obj)
 
bool operator== (const Dimension &_obj) const
 
bool operator!= (const Dimension &_obj) const
 

Detailed Description

in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dynamic the %, then when requested in % the register the % value

Constructor & Destructor Documentation

§ Dimension() [1/4]

esvg::Dimension::Dimension ( )

Constructor (default :0,0 mode pixel)

§ Dimension() [2/4]

esvg::Dimension::Dimension ( const vec2 _size,
enum esvg::distance  _type = esvg::distance_pixel 
)

Constructor.

Parameters
[in]_sizeRequested dimention
[in]_typeUnit of the Dimention

§ Dimension() [3/4]

esvg::Dimension::Dimension ( const std::string &  _config)
inline

Constructor.

Parameters
[in]_configdimension configuration.

§ Dimension() [4/4]

esvg::Dimension::Dimension ( const std::string &  _configX,
const std::string &  _configY 
)
inline

Constructor.

Parameters
[in]_configXdimension X configuration.
[in]_configYdimension Y configuration.

§ ~Dimension()

esvg::Dimension::~Dimension ( )

Destructor.

Member Function Documentation

§ getPixel()

vec2 esvg::Dimension::getPixel ( const vec2 _upperSize) const

get the current dimention in pixel

Parameters
[in]_upperSizeSize in pixel of the upper value
Returns
dimention in Pixel

§ getType()

enum distance esvg::Dimension::getType ( ) const
inline

get the dimension type

Returns
the type

§ getValue()

const vec2& esvg::Dimension::getValue ( ) const
inline

get the current dimention.

Returns
dimention requested.

§ operator std::string()

esvg::Dimension::operator std::string ( ) const

string cast :

§ set() [1/3]

void esvg::Dimension::set ( const vec2 _size,
enum distance  _type 
)

set the current dimention in requested type

Parameters
[in]_sizeDimention to set
[in]_typeType of unit requested.

§ set() [2/3]

void esvg::Dimension::set ( std::string  _config)

set the current dimention in requested type

Parameters
[in]_configdimension configuration.

§ set() [3/3]

void esvg::Dimension::set ( std::string  _configX,
std::string  _configY 
)

set the current dimention in requested type

Parameters
[in]_configXdimension X configuration.
[in]_configYdimension Y configuration.

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