VG3_draw_text()
Draw a text onto an image or the window.SYNTAX
struct vg3_rect
VG3_draw_text(struct vg3_window *wstruct,
struct vg3_image *imgdst,
struct vg3_rect *txrect,
int nlz,
struct vg3_text *stxt,
int fcolor,
int bcolor,
int dryrun)
FUNCTION PARAMETERS
wstruct | Window-struct |
imgdst | Image, or NULL = window |
txrect | Rectangle on the destination into which the text is to be put |
nlz | Breaking character after which a newline may begin (usally space) |
stxt | Text |
fcolor | Foreground color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM) |
bcolor | Background color (from VGAG3_COLORS or VGAG3_COLOR_CUSTOM) |
dryrun | Dry-run, do not draw, just return corrected rectangle |
RETURN VALUE
Returns the corrected rectangle in which the text is located,
which means, the elements w and h are corrected.
If the elements w and h are set to 0, the text cannot be drawn,
because the destination rectangle is too small.
DESCRIPTION
Draw a text onto an image or the window and
return the corrected rectangle in which the text is located.
With dryrun the correct rectangle can be calculated
before drawing the text.
SEE ALSO
VG3_draw_clear()
VG3_draw_point()
VG3_draw_line()
VG3_draw_rect()
VG3_draw_colorchange()
VG3_draw_colorize()