GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gsd_fonts.c
Go to the documentation of this file.
1 
21 #include <string.h>
22 #include <assert.h>
23 
24 #include <grass/gstypes.h>
25 #include <grass/ogsf_proto.h>
26 
27 #include "rgbpack.h"
28 
37 int gsd_get_txtwidth(const char *s, int size)
38 {
39  int width, len;
40 
41  len = strlen(s);
42  width = (size * len) / 2;
43 
44  return (width);
45 }
46 
55 {
56  unsigned long height;
57 
58  height = size / 2;
59 
60  return (height);
61 
62 }
63 
74 {
75  return (2);
76 }
77 
87 int get_txtxoffset(void)
88 {
89  return (0);
90 }
91 
99 void do_label_display(GLuint fontbase, float *lab_pos, const char *txt)
100 {
101  glRasterPos2f(lab_pos[X], lab_pos[Y]);
102  glListBase(fontbase);
103  glCallLists(strlen(txt), GL_UNSIGNED_BYTE, (const GLvoid *)txt);
104 
105  return;
106 }
int get_txtdescender(void)
Get text descender.
Definition: gsd_fonts.c:73
void do_label_display(GLuint fontbase, float *lab_pos, const char *txt)
Display label.
Definition: gsd_fonts.c:99
tuple width
#define Y(x)
Definition: display/draw.c:246
#define X(y)
Definition: display/draw.c:248
tuple size
value.Bind(wx.EVT_TEXT, self.OnVolumeIsosurfMap)
Definition: tools.py:2334
int gsd_get_txtheight(int size)
Get text height.
Definition: gsd_fonts.c:54
int get_txtxoffset(void)
Get text offset.
Definition: gsd_fonts.c:87
int height
int gsd_get_txtwidth(const char *s, int size)
Get text width.
Definition: gsd_fonts.c:37