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
Parameter [input]: | _size | Requested dimention |
Parameter [input]: | _type | Unit of the Dimention |
Dimension
+ Dimension (const std::string & _config);
Constructor
Parameter [input]: | _config | dimension configuration. |
Dimension
+ Dimension (const char* _config);
Constructor
Parameter [input]: | _config | dimension configuration. |
~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
Parameter [input]: | _type | Type of unit requested. |
Return: | | dimention requested. |
set
+ void set (const vec2 & _size,
enum distance _type);
set the current dimention in requested type
Parameter [input]: | _size | Dimention to set |
Parameter [input]: | _type | Type of unit requested. |
getPixel
+ vec2 getPixel (void ) const;
get the current dimention in pixel
Return: | | dimention in Pixel |
getPourcent
+ vec2 getPourcent (void ) const;
get the current dimention in Pourcent
Return: | | dimention in Pourcent |
getMeter
+ vec2 getMeter (void ) const;
get the current dimention in Meter
Return: | | dimention in Meter |
getCentimeter
+ vec2 getCentimeter (void ) const;
get the current dimention in Centimeter
Return: | | dimention in Centimeter |
getMillimeter
+ vec2 getMillimeter (void ) const;
get the current dimention in Millimeter
Return: | | dimention in Millimeter |
getKilometer
+ vec2 getKilometer (void ) const;
get the current dimention in Kilometer
Return: | | dimention in Kilometer |
getInch
+ vec2 getInch (void ) const;
get the current dimention in Inch
Return: | | dimention in Inch |
getFoot
+ vec2 getFoot (void ) const;
get the current dimention in Foot
Return: | | 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
Parameter [input]: | type | Unit type requested. |
Return: | | the requested size |
getWindowsDiag
+ float getWindowsDiag (enum ewol::Dimension::distance _type);
get the Windows diagonal size in the request unit
Parameter [input]: | type | Unit type requested. |
Return: | | the requested size |