Polycode
|
2D screen label display. More...
Inherits Polycode::ScreenShape.
Public Member Functions | |
ScreenLabel (const String &text, int size, const String &fontName="sans", int amode=0) | |
Constructor. | |
void | addDropShadow (Color color, Number size, Number offsetX, Number offsetY) |
Adds a drop shadow to the label. | |
void | setText (const String &newText) |
Sets a new text to the screen label. | |
const String & | getText () const |
Returns the label's text as a string. |
2D screen label display.
Displays 2d text in a specified font.
ScreenLabel::ScreenLabel | ( | const String & | text, |
int | size, | ||
const String & | fontName = "sans" , |
||
int | amode = 0 |
||
) |
Constructor.
fontName | Name of a registered font to use. |
text | Text to display. |
size | Size in pixels. |
Anti-aliasing | mode. |
void ScreenLabel::addDropShadow | ( | Color | color, |
Number | size, | ||
Number | offsetX, | ||
Number | offsetY | ||
) |
Adds a drop shadow to the label.
color | Color of the drop shadow. |
size | Size of the drop shadow in pixels. |
offsetX | Horizontal offset of the drop shadow. |
offsetY | Vertical offset of the drop shadow. |
const String & ScreenLabel::getText | ( | ) | const |
Returns the label's text as a string.
void ScreenLabel::setText | ( | const String & | newText | ) |
Sets a new text to the screen label.
newText | Text to set. |