2 /* Copyright (c) Mark J. Kilgard, 1994. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
10 #include "glutstroke.h"
13 glutStrokeCharacter(GLUTstrokeFont font
, int c
)
15 const StrokeCharRec
*ch
;
16 const StrokeRec
*stroke
;
17 const CoordRec
*coord
;
18 StrokeFontPtr fontinfo
;
23 fontinfo
= (StrokeFontPtr
) __glutFont(font
);
25 fontinfo
= (StrokeFontPtr
) font
;
28 if (c
< 0 || c
>= fontinfo
->num_chars
)
30 ch
= &(fontinfo
->ch
[c
]);
32 for (i
= ch
->num_strokes
, stroke
= ch
->stroke
;
33 i
> 0; i
--, stroke
++) {
34 glBegin(GL_LINE_STRIP
);
35 for (j
= stroke
->num_coords
, coord
= stroke
->coord
;
36 j
> 0; j
--, coord
++) {
37 glVertex2f(coord
->x
, coord
->y
);
41 glTranslatef(ch
->right
, 0.0, 0.0);