Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

glut_stroke.c

Go to the documentation of this file.
00001 
00002 /* Copyright (c) Mark J. Kilgard, 1994. */
00003 
00004 /* This program is freely distributable without licensing fees
00005    and is provided without guarantee or warrantee expressed or
00006    implied. This program is -not- in the public domain. */
00007 
00008 #include <GL/glut.h>
00009 #include "glutint.h"
00010 #include "glutstroke.h"
00011 
00012 void
00013 glutStrokeCharacter(GLUTstrokeFont font, int c)
00014 {
00015   StrokeCharPtr ch;
00016   StrokePtr stroke;
00017   CoordPtr coord;
00018   StrokeFontPtr fontinfo = (StrokeFontPtr) font;
00019   int i, j;
00020 
00021   if (c < 0 || c >= fontinfo->num_chars)
00022     return;
00023   ch = &(fontinfo->ch[c]);
00024   if (ch) {
00025     for (i = ch->num_strokes, stroke = ch->stroke;
00026       i > 0; i--, stroke++) {
00027       glBegin(GL_LINE_STRIP);
00028       for (j = stroke->num_coords, coord = stroke->coord;
00029         j > 0; j--, coord++) {
00030         glVertex2f(coord->x, coord->y);
00031       }
00032       glEnd();
00033     }
00034     glTranslatef(ch->right, 0.0, 0.0);
00035   }
00036 }
 

Powered by Plone

This site conforms to the following standards: