VG3_draw_textline()
Draw a text-line, updating the position for the next text-line.SYNTAX
void
VG3_draw_textline(struct vg3_window *wstruct,
struct vg3_image *imgdst,
struct vg3_rect *txrect,
int nlz,
struct vg3_text *stxt,
int fcolor,
int bcolor,
int bwall,
int maxlines,
int txori)
FUNCTION PARAMETERS
wstruct | Window-struct |
imgdst | Destination image to draw onto, or NULL = window |
txrect | Rectangle on the destination image into which the text-line is to be put, if all elements are set to 0, the whole image/window is used, the elements y and h will be updated onto the next line |
nlz | Breaking character after which a newline may begin (usally space) |
stxt | Text-line (which may also contain line-breaks) |
fcolor | Foreground color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM) |
bcolor | Background color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM) |
bwall | How to use background color: 0 = only for text, 1 = for whole line in the rectangle |
maxlines | Maximal number of lines for the text-line (because of line-breaks) or 0 = no limit |
txori | Text orientation: 0 = left orientated 1 = centered 2 = right orientated |
DESCRIPTION
Draw a text-line.
After the call of this function txrect will be updated
for the next text-line to be drawn.
The text-line may contain line-breaks, so that the text consists actually
of more than one line.
With the parameter nlz a long text-line will be automatically
line-broken before reaching the right border of the rectangle.
With this function a block of text can simply be drawn.
SEE ALSO