GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73574
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_t_box.c
Go to the documentation of this file.
1 #include "driver.h"
2 #include "driverlib.h"
3 
4 void COM_Get_text_box(const char *text, double *t, double *b, double *l, double *r)
5 {
6  switch (font_get_type()) {
7  case GFONT_STROKE:
8  get_text_ext(text, t, b, l, r);
9  break;
10  case GFONT_FREETYPE:
11  get_text_ext_freetype(text, t, b, l, r);
12  break;
13  case GFONT_DRIVER:
14  if (driver->Text_box)
15  (*driver->Text_box)(text, t, b, l, r);
16  break;
17  }
18 }
19 
void get_text_ext(const char *, double *, double *, double *, double *)
Definition: text2.c:91
int font_get_type(void)
Definition: font.c:29
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition: driver.h:51
#define GFONT_STROKE
Definition: fontcap.h:14
double l
Definition: r_raster.c:39
double t
Definition: r_raster.c:39
double b
Definition: r_raster.c:39
#define GFONT_FREETYPE
Definition: fontcap.h:15
void get_text_ext_freetype(const char *, double *, double *, double *, double *)
Definition: text3.c:269
Definition: driver.h:22
#define GFONT_DRIVER
Definition: fontcap.h:16
double r
Definition: r_raster.c:39
void COM_Get_text_box(const char *, double *, double *, double *, double *)
Definition: get_t_box.c:4