7.1. tsTextBeginBlock

Syntax

Pascal

procedure tsTextBeginBlock(Left: tsInt; Top: tsInt; Width: tsInt;
  Height: tsInt; Flags: tsBitmask);

C/C++

void tsTextBeginBlock(tsInt Left, tsInt Top, tsInt Width,
  tsInt Height, tsBitmask Flags);

Description

This function enters the block mode. It will create an virtual rect with the given size in which the text will be arranged. Following parameters affect the output from the block mode. TS_ALIGN, TS_VALIGN, TS_CLIP, TS_BLOCK_OFFSET_X, TS_BLOCK_OFFSET_Y, TS_FONT_CHAR_SPACING and TS_FONT_LINE_SPACING.

[Note] Note

All of these parameters must be set before you enter the block mode. Inside the parameters can't be changed an result in an invalid operation error.

Parameters

Left, Top, Width and Height

The position and the size of the mode. All values are in opengl units. In 2D this normally should be pixels in order to print some

Flags

There are several flags to control the output from the block mode. See table flags for the block mode for more details.

Error Codes

TS_NO_ACTIVE_CONTEXT

There is no active context. See also tsContextBind.

TS_NO_ACTIVE_RENDERER

There was no renderer set. See the parameter TS_RENDERER.

TS_INVALID_OPERATION

You already has entered the block mode.