Assorted whitespace cleanup and typo fixes.
[haiku.git] / src / libs / glut / glut_stroke.c
blob689ccd2e2be486d2be7215b92ed173de5a8bfaf8
1 /*
2 * Copyright 1994-1997 Mark Kilgard, All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Mark Kilgard
7 */
10 #include "glutint.h"
11 #include "glutstroke.h"
14 void APIENTRY
15 glutStrokeCharacter(GLUTstrokeFont font, int c)
17 const StrokeCharRec *ch;
18 const StrokeRec *stroke;
19 const CoordRec *coord;
20 StrokeFontPtr fontinfo;
21 int i, j;
24 #if defined(_WIN32)
25 fontinfo = (StrokeFontPtr) __glutFont(font);
26 #else
27 fontinfo = (StrokeFontPtr) font;
28 #endif
30 if (c < 0 || c >= fontinfo->num_chars)
31 return;
32 ch = &(fontinfo->ch[c]);
33 if (ch) {
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);
41 glEnd();
43 glTranslatef(ch->right, 0.0, 0.0);