GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-bea8435a9e
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,
5  double *r)
6 {
7  switch (font_get_type()) {
8  case GFONT_STROKE:
9  get_text_ext(text, t, b, l, r);
10  break;
11  case GFONT_FREETYPE:
12  get_text_ext_freetype(text, t, b, l, r);
13  break;
14  case GFONT_DRIVER:
15  if (driver->Text_box)
16  (*driver->Text_box)(text, t, b, l, r);
17  break;
18  }
19 }
int font_get_type(void)
Definition: font.c:29
void get_text_ext_freetype(const char *, double *, double *, double *, double *)
Definition: text3.c:269
void get_text_ext(const char *, double *, double *, double *, double *)
Definition: text2.c:90
#define GFONT_DRIVER
Definition: fontcap.h:21
#define GFONT_STROKE
Definition: fontcap.h:19
#define GFONT_FREETYPE
Definition: fontcap.h:20
void COM_Get_text_box(const char *text, double *t, double *b, double *l, double *r)
Definition: get_t_box.c:4
double b
Definition: r_raster.c:39
double l
Definition: r_raster.c:39
double t
Definition: r_raster.c:39
double r
Definition: r_raster.c:39
Definition: driver.h:21
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition: driver.h:46