OpenLayer Offline Manual

OpenLayer | TextRenderer | GetColor GetColor
Rgba GetColor() const;
Returns the text color of the font. Examples TextRenderer renderer( ... ); // Get the color of the text // Rgba color = renderer.GetColor(); // Hint: You can do the following to pring text with a shadow // string text = "Some text"; int x = 200; int y = 100; // Store the original text color // Rgba originalColor = renderer.GetColor(); // Select a translucent black color for the shadow (30% opacity) // renderer.SetColor( Rgba( 0.0, 0.0, 0.0, 0.30 )); // Render the shadow of the text slightly below and left of the original text position // renderer.Print( text, x-1, y+1 ); // Change the text color back to the original // renderer.SetColor( originalColor ); // Print the text on top of the shadow // renderer.Print( text, x, y ); 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 |
Back to the main page of the manual Questions about GetColor? Click here.