Mail Archives: djgpp/1997/10/07/23:47:16
On Sun, 5 Oct 1997 05:46:09 GMT, Dan <dan DOT porcellini AT utoronto DOT ca>
wrote:
>Hello,
>
>I haven't been able to figure out how to use GrDrawChar(chr, x, y,
>GrTextOption *opt). GrTextXY is fairly straight forward, but I'm not
>quite sure how to initialize the GrTextOption *opt. Could someone
>help me out?
>
>Thank you,
> Dan
GrFont *font_helv22b, *font_helv15, *font_helv15b;
GrTextOption helv22b, helv15, helv15b;
GrSetFontPath( PATH ); /* replace PATH with the path to */
/* the font dir */
font_helv22b = GrLoadFont( "helv22b.fnt" );
font_helv15 = GrLoadFont( "helv15.fnt" );
font_helv15b = GrLoadFont( "helv15b.fnt" );
// initilize the font structures
helv15.txo_bgcolor.v = helv22b.txo_bgcolor.v = GrNOCOLOR;
helv15b.txo_bgcolor.v = GRAY;
helv22b.txo_direct = GR_TEXT_RIGHT;
helv22b.txo_xalign = GR_ALIGN_CENTER;
helv22b.txo_yalign = GR_ALIGN_CENTER;
helv22b.txo_font = font_helv22b;
helv15b.txo_font = font_helv15b;
helv15.txo_font = font_helv15;
/* set the character bit width */
helv15b.txo_chrtype =
helv22b.txo_chrtype =
helv15.txo_chrtype = GR_BYTE_TEXT;
- Raw text -