71 lines
1.6 KiB
Groff
71 lines
1.6 KiB
Groff
|
.TH gl_printf 3 "22 Feb 1997" "Svgalib 1.3.0" "Svgalib User Manual"
|
||
|
.SH NAME
|
||
|
gl_printf \- write formatted output in graphic mode
|
||
|
|
||
|
.SH SYNOPSIS
|
||
|
.B #include <vgagl.h>
|
||
|
|
||
|
.BI "int gl_printf(int " x ", int " y ", const char *" fmt ", ...);"
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
.B gl_printf
|
||
|
writes, like
|
||
|
.B printf(3)
|
||
|
a formatted string to position
|
||
|
.RI ( x ", " y )
|
||
|
using the currently selected font. If one or both of
|
||
|
.IR x " and " y
|
||
|
is negative, the text printing continues at the last position. The
|
||
|
special characters
|
||
|
.BR \eb ", " \er ", "
|
||
|
.BR \en ", " \ea ", "
|
||
|
.BR \et " and " \ev
|
||
|
have the usual effects.
|
||
|
|
||
|
Printing wraps at the screen borders. Nevertheless, behaviour is undefined
|
||
|
if not a single characters fits on the screen or if the initial position
|
||
|
is outside the screen.
|
||
|
|
||
|
The kind of text draw operation is set with
|
||
|
.BR gl_setwritemode (3).
|
||
|
|
||
|
.B BEWARE!
|
||
|
Prior to the of use of
|
||
|
.BR gl_printf (3)
|
||
|
you must set a font.
|
||
|
|
||
|
A good default initialization sequence is:
|
||
|
|
||
|
.B gl_setfont(8, 8, gl_font8x8);
|
||
|
.br
|
||
|
.B gl_setwritemode(FONT_COMPRESSED + WRITEMODE_OVERWRITE);
|
||
|
.br
|
||
|
.B gl_setfontcolors(0, vga_white());
|
||
|
.br
|
||
|
|
||
|
.SH RETURN VALUE
|
||
|
The number of characters printed.
|
||
|
|
||
|
.SH BUGS
|
||
|
For compatibility reasons this function is not contained in a.out
|
||
|
libraries.
|
||
|
|
||
|
.SH SEE ALSO
|
||
|
.BR printf (3),
|
||
|
.BR svgalib (7),
|
||
|
.BR vgagl (7),
|
||
|
.BR gl_colorfont (3),
|
||
|
.BR gl_expandfont (3),
|
||
|
.BR gl_font8x8 (3),
|
||
|
.BR gl_setfont (3),
|
||
|
.BR gl_setfontcolors (3),
|
||
|
.BR gl_setwritemode (3),
|
||
|
.BR gl_write (3),
|
||
|
.BR gl_writechar (3),
|
||
|
.BR printftest (6).
|
||
|
|
||
|
.SH AUTHOR
|
||
|
|
||
|
This function and manual page was written by Trek <trek00@freenet.hut.fi>
|
||
|
<trek@mediaservice.net>.
|