TextGeometry is used for displaying text in the scene.
The text, font and color can be specified. Placement and size can be manipulated using this node's transformation matrix.
#include
<classaw_scene_1_1_text_geometry.h>
Public Member Functions |
|
__init__ () | |
__init__ (TextGeometry) | |
TextGeometry | operator= (TextGeometry) |
accept (NodeVisitor) | |
setText (str text) | |
str | getText () |
setFont (str font) | |
Currently, set and get the font to use for
this text. |
|
str | getFont () |
setColor (float r, float g, float b, float a) | |
getColor (float r, float g, float b, float a) | |
setHeight (float height) | |
Set the desired height of the text in
pixels. |
|
float | getHeight () |
setWidth (float width) | |
Set the desired width of the text in pixels.
|
|
float | getWidth () |
setAlignment (Alignment alignment) | |
Alignment | getAlignment () |
setTextTransform (awLinear.AffineMatrix matrix) | |
awLinear AffineMatrix | getTextTransform () |
setAllDirty (bool dirty) | |
Protected Member Functions |
|
__del__ () | |
Reference counted objects shouldn't exist on
the stack. |
awScene.TextGeometry.__init__ | ( | ) |
Reimplemented from awScene.Geometry.
awScene.TextGeometry.__init__ | ( | TextGeometry | ) |
TextGeometry awScene.TextGeometry.operator= | ( | TextGeometry | ) |
awScene.TextGeometry.accept | ( | NodeVisitor | ) |
Reimplemented from awScene.Geometry.
awScene.TextGeometry.setText | ( | str | text | ) |
str awScene.TextGeometry.getText | ( | ) |
awScene.TextGeometry.setFont | ( | str | font | ) |
Currently, set and get the font to use for this text.
If the font is not valid, a default font is used.
str awScene.TextGeometry.getFont | ( | ) |
awScene.TextGeometry.setColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
awScene.TextGeometry.getColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
awScene.TextGeometry.setHeight | ( | float | height | ) |
Set the desired height of the text in pixels.
NOTE: Any value should work fine but the text will look the clearest when the height is 16 or 32. Text height is 16 by default.
float awScene.TextGeometry.getHeight | ( | ) |
awScene.TextGeometry.setWidth | ( | float | width | ) |
Set the desired width of the text in pixels.
If a width is not set then all of the text will be drawn. When a width is specified then only the text that fits will be drawn.
NOTE: When the text doesn't fit ellipses are drawn.
float awScene.TextGeometry.getWidth | ( | ) |
awScene.TextGeometry.setAlignment | ( | Alignment | alignment | ) |
Alignment awScene.TextGeometry.getAlignment | ( | ) |
awScene.TextGeometry.setTextTransform | ( | awLinear.AffineMatrix | matrix | ) |
awLinear AffineMatrix awScene.TextGeometry.getTextTransform | ( | ) |
awScene.TextGeometry.setAllDirty | ( | bool | dirty | ) |
awScene.TextGeometry.__del__ | ( | ) | [protected] |
Reference counted objects shouldn't exist on the stack.
Reimplemented from awScene.Geometry.