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