SetColor

void SetColor(
const Rgba col );

Sets the color of the font.


The alpha value of the color controls the opacity of the printed text. The higher the alpha value is, the more visible the text will be. For more information about alpha values see the definition of Bitmap.

Examples

TextRenderer renderer( ... );

// Sets the color of the font to black //
renderer.SetColorRgba::BLACK );

// Sets the color of the font to light gray //
renderer.SetColorRgba0.80.80.8 ));

// Sets the color of the font to light gray but with the opacity of 30% //
renderer.SetColorRgba0.80.80.80.30 ));


Other functions of the class TextRenderer
Load
Load the font
Print
Prints the given text to the screen
SetColor
Sets the color of the font
GetColor
Returns the text color of the font
SetItalics
Sets the italics angle of the text
GetItalics
Returns the italics angle of the text
Width
Returns the width of the given text
Height
Returns the height of the given text
FirstLineWidth
Returns the width of the first text line of the given text
FirstLineHeight
Returns the height of the first text line of the given text
IsValid
Checks if the TextRenderer was loaded correctly

Advanced functions

GetFace
SendToGPU
UnloadFromGPU
UseAutoDelete


Questions about SetColor? Click here.