Public Member Functions
-
TextLayout ()
This is an abstract line.
Makes a TextLayout Object.
-
voidclear (const Color &color)
Sets the background color for the TextLayout . Implicit opqaue alpha.
-
voidclear (const ColorA &color)
Sets the background color and alpha for the TextLayout to unpremulitiplied color color .
-
voidaddLine (const std::string &line)
Adds a left-justified line of text to the layout. Assumes UTF-8 encoding.
-
voidaddCenteredLine (const std::string &line)
Adds a centered line of text to the layout. Assumes UTF-8 encoding.
-
voidaddRightLine (const std::string &line)
Adds a right-justified line of text to the layout. Assumes UTF-8 encoding.
-
voidappend (const std::string &str)
Appends string str to the current line. Assumes UTF-8 encoding.
-
voidsetFont (const Font &font)
-
voidsetColor (const Color &color)
Sets the currently active color. Implicit opqaue alpha.
-
voidsetColor (const ColorA &color)
Sets the currently active color and alpha.
-
voidsetLeadingOffset (float leadingOffset)
Sets an offset relative to the default leading (the vertical space between lines).
-
voidsetBorder (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.