Public Member Functions
-
TextLayout ()
This is an abstract line.
Makes a TextLayout Object.
-
clear (const Color &color)
Sets the background color for the TextLayout . Implicit opqaue alpha.
-
clear (const ColorA &color)
Sets the background color and alpha for the TextLayout to unpremulitiplied color color .
-
addLine (const std::string &line)
Adds a left-justified line of text to the layout. Assumes UTF-8 encoding.
-
addCenteredLine (const std::string &line)
Adds a centered line of text to the layout. Assumes UTF-8 encoding.
-
addRightLine (const std::string &line)
Adds a right-justified line of text to the layout. Assumes UTF-8 encoding.
-
append (const std::string &str)
Appends string str to the current line. Assumes UTF-8 encoding.
-
setFont (const Font &font)
-
setColor (const Color &color)
Sets the currently active color. Implicit opqaue alpha.
-
setColor (const ColorA &color)
Sets the currently active color and alpha.
-
setLeadingOffset (float leadingOffset)
Sets an offset relative to the default leading (the vertical space between lines).
-
setBorder (int horizontal, int vertical)
Adds a horizontal pixel border to the left and the right sides, and a vertical border to the top and bottom.
-
render (bool useAlpha=false, bool premultiplied=false)
Returns a Surface into which the TextLayout is rendered. If useAlpha the Surface will contain an alpha channel. If premultiplied the alpha will be premulitplied.