Doxygen Source Code Documentation
glut_swidth.c File Reference
#include <GL/glut.h>#include "glutint.h"#include "glutstroke.h"Go to the source code of this file.
| Functions | |
| int | glutStrokeWidth (GLUTstrokeFont font, int c) | 
| int | glutStrokeLength (GLUTstrokeFont font, unsigned char *string) | 
Function Documentation
| 
 | ||||||||||||
| 
 Definition at line 28 of file glut_swidth.c. References c, GLUTstrokeFont, StrokeCharPtr, and StrokeFontPtr. 
 00029 {
00030   int c, length;
00031   StrokeFontPtr fontinfo = (StrokeFontPtr) font;
00032   StrokeCharPtr ch;
00033 
00034   length = 0;
00035   for (; *string != '\0'; string++) {
00036     c = *string;
00037     if (c < 0 || c >= fontinfo->num_chars) {
00038       ch = &(fontinfo->ch[c]);
00039       if (ch)
00040         length += ch->right;
00041     }
00042   }
00043   return length;
00044 }
 | 
| 
 | ||||||||||||
| 
 Definition at line 13 of file glut_swidth.c. References c, GLUTstrokeFont, StrokeCharPtr, and StrokeFontPtr. 
 00014 {
00015   StrokeFontPtr fontinfo = (StrokeFontPtr) font;
00016   StrokeCharPtr ch;
00017 
00018   if (c < 0 || c >= fontinfo->num_chars)
00019     return 0;
00020   ch = &(fontinfo->ch[c]);
00021   if (ch)
00022     return ch->right;
00023   else
00024     return 0;
00025 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  