GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
Loading...
Searching...
No Matches
driverlib.h File Reference
#include "driver.h"
Include dependency graph for driverlib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEF_WIDTH   640
 
#define DEF_HEIGHT   480
 

Functions

int font_get_type (void)
 
const charfont_get_encoding (void)
 
void get_text_ext (const char *, double *, double *, double *, double *)
 
void soft_text (const char *)
 
void soft_text_freetype (const char *)
 
void get_text_ext_freetype (const char *, double *, double *, double *, double *)
 
int font_init (const char *)
 
int get_char_vects (unsigned char, int *, unsigned char **, unsigned char **)
 
int font_init_freetype (const char *, int)
 
const charfont_get_freetype_name (void)
 
int font_get_index (void)
 
int font_exists (const char *)
 Check if font exists.
 
int parse_fontcap_entry (struct GFONT_CAP *, const char *)
 Parse fontcap entry.
 
struct GFONT_CAPparse_fontcap (void)
 Parse fontcaps.
 
void free_fontcap (struct GFONT_CAP *)
 Free allocated GFONT_CAP structure.
 

Variables

const struct driverdriver
 

Macro Definition Documentation

◆ DEF_HEIGHT

#define DEF_HEIGHT   480

Definition at line 2 of file driverlib.h.

◆ DEF_WIDTH

#define DEF_WIDTH   640

Definition at line 1 of file driverlib.h.

Function Documentation

◆ font_exists()

int font_exists ( const char name)
extern

Check if font exists.

Definition at line 27 of file parse_ftcap.c.

References access, name, and R_OK.

Referenced by COM_Set_font(), and parse_fontcap_entry().

◆ font_get_encoding()

const char * font_get_encoding ( void  )

Definition at line 34 of file font.c.

References G_store().

◆ font_get_freetype_name()

const char * font_get_freetype_name ( void  )

Definition at line 20 of file font_freetype.c.

◆ font_get_index()

int font_get_index ( void  )

Definition at line 25 of file font_freetype.c.

◆ font_get_type()

int font_get_type ( void  )

Definition at line 29 of file font.c.

Referenced by COM_Get_text_box(), and COM_Text().

◆ font_init()

int font_init ( const char name)

Definition at line 181 of file font2.c.

References _, G_fatal_error(), G_strlcpy(), and name.

◆ font_init_freetype()

int font_init_freetype ( const char name,
int  index 
)

Definition at line 9 of file font_freetype.c.

References G_free(), G_store(), and name.

◆ free_fontcap()

void free_fontcap ( struct GFONT_CAP ftcap)
extern

Free allocated GFONT_CAP structure.

Parameters
ftcappointer to GFONT_CAP to be freed

Definition at line 126 of file parse_ftcap.c.

References GFONT_CAP::encoding, ftcap, G_free(), GFONT_CAP::longname, AMI_STREAM< T >::name(), name, and NULL.

◆ get_char_vects()

int get_char_vects ( unsigned char  achar,
int n,
unsigned char **  X,
unsigned char **  Y 
)

Definition at line 195 of file font2.c.

References X, and Y.

◆ get_text_ext()

void get_text_ext ( const char string,
double top,
double bot,
double left,
double rite 
)

◆ get_text_ext_freetype()

void get_text_ext_freetype ( const char string,
double top,
double bot,
double left,
double rite 
)

◆ parse_fontcap()

struct GFONT_CAP * parse_fontcap ( void  )
extern

Parse fontcaps.

Returns
pointer to GFONT_CAP structure

Definition at line 73 of file parse_ftcap.c.

References _, file, G_gisbase(), G_realloc, G_warning(), GPATH_MAX, AMI_STREAM< T >::name(), NULL, parse_fontcap_entry(), and UntypedStream::path.

Referenced by LIB_init().

◆ parse_fontcap_entry()

int parse_fontcap_entry ( struct GFONT_CAP e,
const char str 
)
extern

Parse fontcap entry.

Parameters
epointer to GFONT_CAP struct
str?
Returns
1 on success
0 on failure

Definition at line 41 of file parse_ftcap.c.

References GFONT_CAP::encoding, font_exists(), G_store(), GNAME_MAX, GPATH_MAX, GFONT_CAP::index, GFONT_CAP::longname, GFONT_CAP::name, name, GFONT_CAP::path, and GFONT_CAP::type.

Referenced by COM_Set_font(), and parse_fontcap().

◆ soft_text()

void soft_text ( const char string)

Definition at line 108 of file text2.c.

References NULL.

Referenced by COM_Text().

◆ soft_text_freetype()

void soft_text_freetype ( const char string)

Definition at line 264 of file text3.c.

References cur_x, cur_y, and NULL.

Referenced by COM_Text().

Variable Documentation

◆ driver

Definition at line 25 of file driver/init.c.