class: ewol::Dimension


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

enum:

Constructor and Destructor:

+                   Dimension            (void );
+ Dimension (const vec2 & _size,
enum ewol::Dimension::distance _type);
+ Dimension (const std::string & _config);
+ Dimension (const char* _config);
+ ~Dimension (void );

Synopsis:

+                   operator std::string (void ) const;
+ vec2 get (enum distance _type) const;
+ void set (const vec2 & _size,
enum distance _type);
+ vec2 getPixel (void ) const;
+ vec2 getPourcent (void ) const;
+ vec2 getMeter (void ) const;
+ vec2 getCentimeter (void ) const;
+ vec2 getMillimeter (void ) const;
+ vec2 getKilometer (void ) const;
+ vec2 getInch (void ) const;
+ vec2 getFoot (void ) const;
+ const Dimension & operator = (const Dimension & _obj);
+ bool operator == (const Dimension & _obj) const;
+ bool operator != (const Dimension & _obj) const;
+ enum distance getType (void ) const;
+ void init (void );
+ void unInit (void );
+ void setPixelRatio (const vec2 & _ratio,
enum ewol::Dimension::distance _type);
+ void setPixelWindowsSize (const vec2 & _size);
+ vec2 getWindowsSize (enum ewol::Dimension::distance _type);
+ float getWindowsDiag (enum ewol::Dimension::distance _type);

Detail:

Dimension

+  Dimension (void );
Constructor (default :0,0 mode pixel)


Dimension

+  Dimension (const vec2 & _size,
enum
ewol::Dimension::distance _type);
Constructor


Dimension

+  Dimension (const std::string & _config);
Constructor


Dimension

+  Dimension (const char* _config);
Constructor


~Dimension

+  ~Dimension (void );
Destructor


operator std::string

+  operator std::string (void ) const;
string cast :


get

+ vec2 get (enum distance _type) const;
get the current dimention in requested type


set

+ void set (const vec2 & _size,
enum distance _type);
set the current dimention in requested type


getPixel

+ vec2 getPixel (void ) const;
get the current dimention in pixel


getPourcent

+ vec2 getPourcent (void ) const;
get the current dimention in Pourcent


getMeter

+ vec2 getMeter (void ) const;
get the current dimention in Meter


getCentimeter

+ vec2 getCentimeter (void ) const;
get the current dimention in Centimeter


getMillimeter

+ vec2 getMillimeter (void ) const;
get the current dimention in Millimeter


getKilometer

+ vec2 getKilometer (void ) const;
get the current dimention in Kilometer


getInch

+ vec2 getInch (void ) const;
get the current dimention in Inch


getFoot

+ vec2 getFoot (void ) const;
get the current dimention in Foot


operator =

+ const Dimension & operator = (const Dimension & _obj);
= assigment


operator ==

+ bool operator == (const Dimension & _obj) const;
== operator


operator !=

+ bool operator != (const Dimension & _obj) const;
!= operator


getType

+ enum distance getType (void ) const;


init

+ void init (void );
basic init


unInit

+ void unInit (void );
basic un-init


setPixelRatio

+ void setPixelRatio (const vec2 & _ratio,
enum
ewol::Dimension::distance _type);
set the Milimeter ratio for calculation


setPixelWindowsSize

+ void setPixelWindowsSize (const vec2 & _size);
set the current Windows size


getWindowsSize

+ vec2 getWindowsSize (enum ewol::Dimension::distance _type);
get the Windows size in the request unit


getWindowsDiag

+ float getWindowsDiag (enum ewol::Dimension::distance _type);
get the Windows diagonal size in the request unit