CL_GlyphBuffer::justify_left - ClanLib Game SDK

Home | All Classes | Grouped Classes | Index | Search

# CL_GlyphBuffer::justify_left

Rejustifies lines in the GlyphBuffer to the left.

    	void justify_left(
    		int left = 0);

    	void justify_left(
    		Range range, int left = 0);

Parameters:

range
  The subsection of the glyphs vector to change, which is expanded out both ways to contain at least one line.
left
  The x coordinate of the vertical line that text should be moved up against.

Detailed description:

The CL_GlyphBuffer's contents (the glyphs vector, the font markers map, and the effects maps), if any, must not have been created/altered by anything but CL_Font::draw_to_gb() or CL_TextStyler::draw_to_gb() or the CL_GlyphBuffer justification functions or using CL_GlyphBuffer::remove to take glyphs off the end for this method to work.

To preserve indentation, this method takes into account whitespace (glyphs not provided by the font) when justifying.

See also:

CL_TextStyler | CL_GlyphBuffer | CL_Font

Questions or comments, write to the ClanLib mailing list.