|
Public Member Functions |
| void | load () |
| | Complete font loading. If you create the font from an XML file, this method is invoked automatically after reading all the required data from the XMLAttributes object. If you create the font manually, it is your responsability to call this function as soon as you set up all the appropiate fields of the Font object.
|
| bool | isCodepointAvailable (unsigned int cp) |
| | Return whether this Font can draw the specified code-point.
|
| void | setNativeResolution (in_Pairf *size) |
| | Note: I've disabled all the drawText commands. Use a GUI Widget, please!
|
| void | notifyScreenResolution (in_Pairf *size) |
| | Notify the Font of the current (usually new) display resolution.
|
| float | getLineSpacing () |
| | Return the pixel line spacing value for.
|
| float | getLineSpacing (float y_scale) |
| float | getFontHeight () |
| | return the exact pixel height of the font.
|
| float | getFontHeight (float y_scale) |
| float | getBaseline () |
| | Return the number of pixels from the top of the highest glyph to the baseline.
|
| float | getBaseline (float y_scale) |
| float | getTextExtent (const char *text) |
| | Return the pixel width of the specified text if rendered with this Font.
|
| float | getTextExtent (const char *text, float x_scale) |
| unsigned long | getCharAtPixel (const char *text, float pixel) |
| | Return the index of the closest text character in String text that corresponds to pixel location pixel if the text were rendered.
|
| unsigned long | getCharAtPixel (const char *text, float pixel, float x_scale) |
| unsigned long | getCharAtPixel (const char *text, unsigned long start_char, float pixel) |
| | Return the index of the closest text character in String text, starting at character index start_char, that corresponds to pixel location pixel if the text were to be rendered.
|
| unsigned long | getCharAtPixel (const char *text, unsigned long start_char, float pixel, float x_scale) |
| unsigned long | getFormattedLineCount (const char *text, in_Vector4f *format_area, CEGUITextFormatting fmt) |
| | Return the number of lines the given text would be formatted to.
|
| unsigned long | getFormattedLineCount (const char *text, in_Vector4f *format_area, CEGUITextFormatting fmt, float x_scale) |
| float | getFormattedTextExtent (const char *text, in_Vector4f *format_area, CEGUITextFormatting fmt) |
| | Return the horizontal pixel extent given text would be formatted to.
|
| float | getFormattedTextExtent (const char *text, in_Vector4f *format_area, CEGUITextFormatting fmt, float x_scale) |
| void DigitalSpaces::DICEGUIFont::setNativeResolution |
( |
in_Pairf * |
size |
) |
|
Note: I've disabled all the drawText commands. Use a GUI Widget, please!
Draw text into a specified area of the display.
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is not clipped to this Rect, but is formatted using this Rect depending upon the option specified in fmt. |
| z | flat value specifying the z co-ordinate for the drawn text. |
| clip_rect | Rect object describing the clipping area for the drawing. No drawing will occur outside this Rect. |
| fmt | One of the TextFormatting values specifying the text formatting required. |
| colours | ColourRect object describing the colours to be applied when drawing the text. NB: The colours specified in here are applied to each glyph, rather than the text as a whole. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- The number of lines output. NB: This does not consider clipping, so if all text was clipped, this would still return >=1.
Draw text into a specified area of the display using default colours.
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is not clipped to this Rect, but is formatted using this Rect depending upon the option specified in fmt. |
| z | flat value specifying the z co-ordinate for the drawn text. |
| clip_rect | Rect object describing the clipping area for the drawing. No drawing will occur outside this Rect. |
| fmt | One of the TextFormatting values specifying the text formatting required. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- The number of lines output. NB: This does not consider clipping, so if all text was clipped, this would still return >=1.
Draw text into a specified area of the display with default colours and default formatting (LeftAligned).
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is not clipped to this Rect, but is formatted using this Rect depending upon the option specified in fmt. |
| z | flat value specifying the z co-ordinate for the drawn text. |
| clip_rect | Rect object describing the clipping area for the drawing. No drawing will occur outside this Rect. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- Nothing.
Draw text into a specified area of the display.
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is formatted using this Rect depending upon the option specified in fmt. Additionally, the drawn text is clipped to be within this Rect (applies to non-word wrapped formatting where the text may otherwise have fallen outside this Rect). |
| z | flat value specifying the z co-ordinate for the drawn text. |
| fmt | One of the TextFormatting values specifying the text formatting required. |
| colours | ColourRect object describing the colours to be applied when drawing the text. NB: The colours specified in here are applied to each glyph, rather than the text as a whole. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- The number of lines output. NB: This does not consider clipping, so if all text was clipped, this would still return >=1.
Draw text into a specified area of the display with default colours.
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is formatted using this Rect depending upon the option specified in fmt. Additionally, the drawn text is clipped to be within this Rect (applies to non-word wrapped formatting where the text may otherwise have fallen outside this Rect). |
| z | flat value specifying the z co-ordinate for the drawn text. |
| fmt | One of the TextFormatting values specifying the text formatting required. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- The number of lines output. NB: This does not consider clipping, so if all text was clipped, this would still return >=1.
Draw text into a specified area of the display with default colours and default formatting (LeftAligned).
- Parameters:
-
| text | String object containing the text to be drawn. |
| draw_area | Rect object describing the area of the display where the text is to be rendered. The text is formatted using this Rect depending upon the option specified in fmt. Additionally, the drawn text is clipped to be within this Rect (applies to non-word wrapped formatting where the text may otherwise have fallen outside this Rect). |
| z | flat value specifying the z co-ordinate for the drawn text. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- Nothing.
Draw text at the specified location.
- Parameters:
-
| text | String object containing the text to be drawn. |
| position | Vector3 object describing the location for the text. NB: The position specified here corresponds to the text baseline and not the top of any glyph. The baseline spacing required can be retrieved by calling getBaseline(). |
| clip_rect | Rect object describing the clipping area for the drawing. No drawing will occur outside this Rect. |
| colours | ColourRect object describing the colours to be applied when drawing the text. NB: The colours specified in here are applied to each glyph, rather than the text as a whole. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- Nothing.
Draw text at the specified location with default colours.
- Parameters:
-
| text | String object containing the text to be drawn. |
| position | Vector3 object describing the location for the text. NB: The position specified here corresponds to the text baseline and not the top of any glyph. The baseline spacing required can be retrieved by calling getBaseline(). |
| clip_rect | Rect object describing the clipping area for the drawing. No drawing will occur outside this Rect. |
| x_scale | Scaling factor to be applied to each glyph's x axis, where 1.0f is considered to be 'normal'. |
| y_scale | Scaling factor to be applied to each glyph's y axis, where 1.0f is considered to be 'normal'. |
- Returns:
- Nothing.
Set the native resolution for this Font
- Parameters:
-
| size | Size object describing the new native screen resolution for this Font. |
- Returns:
- Nothing