File: textmap.h

package info (click to toggle)
glut 3.7-14
  • links: PTS
  • area: main
  • in suites: woody
  • size: 12,556 kB
  • ctags: 45,170
  • sloc: ansic: 148,716; makefile: 35,208; ada: 2,062; yacc: 473; fortran: 290; lex: 131; csh: 51; sed: 49; sh: 33
file content (30 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef TEXTMAPDEF
#define TEXTMAPDEF

#define LETTER_INDEX 1

typedef struct texchardesc {
  float movex;          /* advance */
  int haveimage;
  float llx, lly;       /* geometry box */
  float urx, ury;
  float tllx, tlly;     /* texture box */
  float turx, tury;
  float data[3 * 8];
} texchardesc;

typedef struct texfnt {
  short charmin, charmax;
  short nchars;
  float pixhigh;
  texchardesc *chars;
  short rasxsize, rasysize;
  unsigned short *rasdata;
} texfnt;

texfnt *readtexfont(char *name);
float texstrwidth(char *str);
int texfntinit(char *file);
void texfntstroke(char *s, float xoffset, float yoffset);

#endif