2 * Copyright 1994-1997 Mark Kilgard, All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * GPL licensing not permitted.
13 #include "glutstroke.h"
17 glutStrokeCharacter(GLUTstrokeFont font
, int c
)
19 const StrokeCharRec
*ch
;
20 const StrokeRec
*stroke
;
21 const CoordRec
*coord
;
22 StrokeFontPtr fontinfo
;
27 fontinfo
= (StrokeFontPtr
) __glutFont(font
);
29 fontinfo
= (StrokeFontPtr
) font
;
32 if (c
< 0 || c
>= fontinfo
->num_chars
)
34 ch
= &(fontinfo
->ch
[c
]);
36 for (i
= ch
->num_strokes
, stroke
= ch
->stroke
;
37 i
> 0; i
--, stroke
++) {
38 glBegin(GL_LINE_STRIP
);
39 for (j
= stroke
->num_coords
, coord
= stroke
->coord
;
40 j
> 0; j
--, coord
++) {
41 glVertex2f(coord
->x
, coord
->y
);
45 glTranslatef(ch
->right
, 0.0, 0.0);