Tizen Native API
5.5
|
Used for specifying minimum/maximum extents of a ruler. More...
Public Member Functions | |
RulerDomain (float min, float max, bool enabled=true) | |
Creates Ruler domain allowing a point to traverse between min and max extents. | |
float | Clamp (float x, float length=0.0f, float scale=1.0f) const |
Clamps value (x) from (min) to (max). | |
float | Clamp (float x, float length, float scale, ClampState &clamped) const |
Clamps value (x) from (min) to (max). | |
float | GetSize () const |
Returns (max-min) size of ruler. | |
Public Attributes | |
float | min |
Minimum extent (point cannot traverse less than this) | |
float | max |
Maximum extent (point cannot traverse greater than this) | |
bool | enabled |
Whether domain has been enabled or not. |
Detailed Description
Used for specifying minimum/maximum extents of a ruler.
- Since:
- 2.4, DALi version 1.0.0
Constructor & Destructor Documentation
Dali::Toolkit::RulerDomain::RulerDomain | ( | float | min, |
float | max, | ||
bool | enabled = true |
||
) | [explicit] |
Creates Ruler domain allowing a point to traverse between min and max extents.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] min Minimum extent (point cannot traverse less than this) [in] max Maximum extent (point cannot traverse greater than this) [in] enabled Whether domain has been enabled or not
Member Function Documentation
float Dali::Toolkit::RulerDomain::Clamp | ( | float | x, |
float | length = 0.0f , |
||
float | scale = 1.0f |
||
) | const |
Clamps value (x) from (min) to (max).
An optional length parameter can be specified to suggest that the subject is not a point but a line to that should be clamped.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] x X point to be clamped between (min) and (max) extents [in] length (optional) The Length of the line from (x) to (x + length) to be clamped [in] scale Scaling parameter which treats domain as scaled in calculations
- Returns:
- The clamped value
float Dali::Toolkit::RulerDomain::Clamp | ( | float | x, |
float | length, | ||
float | scale, | ||
ClampState & | clamped | ||
) | const |
Clamps value (x) from (min) to (max).
An optional length parameter can be specified to suggest that the subject is not a point but a line to that should be clamped.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] x X point to be clamped between (min) and (max) extents [in] length (optional) The Length of the line from (x) to (x + length) to be clamped [in] scale Scaling parameter which treats domain as scaled in calculations [out] clamped Whether clamping occurred and which size (None, Min or Max)
- Returns:
- The clamped value
float Dali::Toolkit::RulerDomain::GetSize | ( | ) | const |
Returns (max-min) size of ruler.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- The size of the ruler from min to max