HaikuDepot: notify work status from main window
[haiku.git] / src / libs / glut / glut_stroke.c
blob348f6ee61c36293073dd65e8963cad8ab27148d7
1 /*
2 * Copyright 1994-1997 Mark Kilgard, All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * GPL licensing not permitted.
7 * Authors:
8 * Mark Kilgard
9 */
12 #include "glutint.h"
13 #include "glutstroke.h"
16 void APIENTRY
17 glutStrokeCharacter(GLUTstrokeFont font, int c)
19 const StrokeCharRec *ch;
20 const StrokeRec *stroke;
21 const CoordRec *coord;
22 StrokeFontPtr fontinfo;
23 int i, j;
26 #if defined(_WIN32)
27 fontinfo = (StrokeFontPtr) __glutFont(font);
28 #else
29 fontinfo = (StrokeFontPtr) font;
30 #endif
32 if (c < 0 || c >= fontinfo->num_chars)
33 return;
34 ch = &(fontinfo->ch[c]);
35 if (ch) {
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);
43 glEnd();
45 glTranslatef(ch->right, 0.0, 0.0);