Dimension type that represents some metric of a Font. Implements BaseDim interface.
More...
Dimension type that represents some metric of a Font. Implements BaseDim interface.
Constructor.
- Parameters
-
name | String holding the name suffix of the window to be accessed to obtain the font and / or text strings to be used when these items are not explicitly given. |
font | String holding the name of the font to use for this dimension. If the string is empty, the font assigned to the window passed to getValue will be used. |
text | String holding the text to be measured for horizontal extent. If this is empty, the text from the window passed to getValue will be used. |
metric | One of the FontMetricType values indicating what we should represent. |
padding | constant pixel padding value to be added. |
BaseDim* CEGUI::FontDim::clone |
( |
| ) |
const |
|
virtual |
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.
Since the system needs to be able to copy objects derived from BaseDim, but only has knowledge of the BaseDim interface, this clone method is provided to prevent slicing issues.
Implements CEGUI::BaseDim.
float CEGUI::FontDim::getValue |
( |
const Window & |
wnd | ) |
const |
|
virtual |
Return a value that represents this dimension as absolute pixels.
- Parameters
-
wnd | Window object that may be used by the specialised class to aid in calculating the final value. |
- Returns
- float value which represents, in pixels, the same value as this BaseDim.
Implements CEGUI::BaseDim.
float CEGUI::FontDim::getValue |
( |
const Window & |
wnd, |
|
|
const Rectf & |
container |
|
) |
| const |
|
virtual |
Return a value that represents this dimension as absolute pixels.
- Parameters
-
wnd | Window object that may be used by the specialised class to aid in calculating the final value (typically would be used to obtain window/widget dimensions). |
container | Rect object which describes an area to be considered as the base area when calculating the final value. Basically this means that relative values are calculated from the dimensions of this Rect. |
- Returns
- float value which represents, in pixels, the same value as this BaseDim.
Implements CEGUI::BaseDim.