GRASS 8 Programmer's Manual 8.5.0(2026)-8d6ceba290
Loading...
Searching...
No Matches
driver.h File Reference
#include <grass/fontcap.h>
Include dependency graph for driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  driver

Macros

#define GRASS_DRIVER_EXPORT

Functions

void LIB_init (const struct driver *drv)
 Initialize display driver.
void COM_Box_abs (double, double, double, double)
void COM_Color_RGB (unsigned char, unsigned char, unsigned char)
void COM_Standard_color (int)
void COM_Erase (void)
void COM_Set_font (const char *)
void COM_Set_encoding (const char *)
void COM_Font_list (char ***, int *)
void COM_Font_info (char ***, int *)
void COM_Get_text_box (const char *, double *, double *, double *, double *)
int COM_Graph_set (void)
void COM_Graph_close (void)
const char * COM_Graph_get_file (void)
void COM_Line_width (double)
void COM_Pos_abs (double, double)
void COM_begin_raster (int, int[2][2], double[2][2])
int COM_raster (int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void COM_end_raster (void)
void COM_Set_window (double, double, double, double)
void COM_Get_window (double *, double *, double *, double *)
void COM_Text (const char *)
void COM_Text_size (double, double)
void COM_Text_rotation (double)
void COM_Bitmap (int, int, int, const unsigned char *)
void COM_Begin (void)
void COM_Move (double, double)
void COM_Cont (double, double)
void COM_Close (void)
void COM_Stroke (void)
void COM_Fill (void)
void COM_Point (double, double)

Variables

int screen_width
int screen_height
double cur_x
double cur_y
double text_size_x
double text_size_y
double text_rotation
double text_sinrot
double text_cosrot
int matrix_valid
struct GFONT_CAP * ftcap

Macro Definition Documentation

◆ GRASS_DRIVER_EXPORT

#define GRASS_DRIVER_EXPORT

Definition at line 9 of file driver.h.

Function Documentation

◆ COM_Begin()

void COM_Begin ( void )
extern

Definition at line 10 of file driver/draw.c.

References driver::Begin, and COM_Begin().

Referenced by COM_Begin().

◆ COM_begin_raster()

void COM_begin_raster ( int mask,
int src[2][2],
double dst[2][2] )
extern

Definition at line 13 of file driver/raster.c.

References driver::Begin_raster, and COM_begin_raster().

Referenced by COM_begin_raster().

◆ COM_Bitmap()

void COM_Bitmap ( int ncols,
int nrows,
int threshold,
const unsigned char * buf )
extern

Definition at line 4 of file driver/draw.c.

References driver::Bitmap, and COM_Bitmap().

Referenced by COM_Bitmap().

◆ COM_Box_abs()

void COM_Box_abs ( double x1,
double y1,
double x2,
double y2 )
extern

Definition at line 4 of file driver/box.c.

References driver::Box, and COM_Box_abs().

Referenced by COM_Box_abs().

◆ COM_Close()

void COM_Close ( void )
extern

Definition at line 28 of file driver/draw.c.

References driver::Close, and COM_Close().

Referenced by COM_Close().

◆ COM_Color_RGB()

void COM_Color_RGB ( unsigned char r,
unsigned char g,
unsigned char b )
extern

Definition at line 5 of file driver/color.c.

References driver::Color, and COM_Color_RGB().

Referenced by COM_Color_RGB(), and COM_Standard_color().

◆ COM_Cont()

void COM_Cont ( double x,
double y )
extern

Definition at line 22 of file driver/draw.c.

References COM_Cont(), driver::Cont, and x.

Referenced by COM_Cont().

◆ COM_end_raster()

void COM_end_raster ( void )
extern

Definition at line 29 of file driver/raster.c.

References COM_end_raster(), and driver::End_raster.

Referenced by COM_end_raster().

◆ COM_Erase()

void COM_Erase ( void )
extern

Definition at line 4 of file driver/erase.c.

References COM_Erase(), and driver::Erase.

Referenced by COM_Erase().

◆ COM_Fill()

void COM_Fill ( void )
extern

Definition at line 40 of file driver/draw.c.

References COM_Fill(), and driver::Fill.

Referenced by COM_Fill().

◆ COM_Font_info()

void COM_Font_info ( char *** list,
int * count )
extern

Definition at line 154 of file font.c.

References COM_Font_info(), count, driver::Font_info, and list.

Referenced by COM_Font_info().

◆ COM_Font_list()

void COM_Font_list ( char *** list,
int * count )
extern

Definition at line 147 of file font.c.

References COM_Font_list(), count, driver::Font_list, and list.

Referenced by COM_Font_list().

◆ COM_Get_text_box()

void COM_Get_text_box ( const char * text,
double * t,
double * b,
double * l,
double * r )
extern

◆ COM_Get_window()

void COM_Get_window ( double * t,
double * b,
double * l,
double * r )
extern

Definition at line 19 of file driver/set_window.c.

References COM_Get_window().

Referenced by COM_Get_window().

◆ COM_Graph_close()

void COM_Graph_close ( void )
extern

Definition at line 12 of file driver/graph.c.

References COM_Graph_close(), and driver::Graph_close.

Referenced by COM_Graph_close().

◆ COM_Graph_get_file()

const char * COM_Graph_get_file ( void )
extern

Definition at line 18 of file driver/graph.c.

References COM_Graph_get_file(), driver::Graph_get_file, and NULL.

Referenced by COM_Graph_get_file().

◆ COM_Graph_set()

int COM_Graph_set ( void )
extern

Definition at line 5 of file driver/graph.c.

References COM_Graph_set(), and driver::Graph_set.

Referenced by COM_Graph_set(), and LIB_init().

◆ COM_Line_width()

void COM_Line_width ( double width)
extern

Definition at line 4 of file driver/line_width.c.

References COM_Line_width(), and driver::Line_width.

Referenced by COM_Line_width().

◆ COM_Move()

void COM_Move ( double x,
double y )
extern

Definition at line 16 of file driver/draw.c.

References COM_Move(), driver::Move, and x.

Referenced by COM_Move().

◆ COM_Point()

void COM_Point ( double x,
double y )
extern

Definition at line 46 of file driver/draw.c.

References COM_Point(), driver::Point, and x.

Referenced by COM_Point().

◆ COM_Pos_abs()

void COM_Pos_abs ( double x,
double y )
extern

Definition at line 4 of file move.c.

References COM_Pos_abs(), cur_x, cur_y, and x.

Referenced by COM_Pos_abs().

◆ COM_raster()

int COM_raster ( int n,
int row,
const unsigned char * red,
const unsigned char * grn,
const unsigned char * blu,
const unsigned char * nul )
extern

Definition at line 19 of file driver/raster.c.

References COM_raster(), and driver::Raster.

Referenced by COM_raster().

◆ COM_Set_encoding()

void COM_Set_encoding ( const char * enc)
extern

Definition at line 139 of file font.c.

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

Referenced by COM_Set_encoding(), and COM_Set_font().

◆ COM_Set_font()

void COM_Set_font ( const char * name)
extern

◆ COM_Set_window()

void COM_Set_window ( double t,
double b,
double l,
double r )
extern

Definition at line 8 of file driver/set_window.c.

References COM_Set_window(), and driver::Set_window.

Referenced by COM_Set_window(), and LIB_init().

◆ COM_Standard_color()

void COM_Standard_color ( int number)
extern

◆ COM_Stroke()

void COM_Stroke ( void )
extern

Definition at line 34 of file driver/draw.c.

References COM_Stroke(), and driver::Stroke.

Referenced by COM_Stroke().

◆ COM_Text()

void COM_Text ( const char * text)
extern

Definition at line 4 of file driver/text.c.

References COM_Text(), font_get_type(), soft_text(), soft_text_freetype(), and driver::Text.

Referenced by COM_Text().

◆ COM_Text_rotation()

void COM_Text_rotation ( double val)
extern

Definition at line 12 of file text_size.c.

References COM_Text_rotation(), matrix_valid, text_cosrot, text_rotation, and text_sinrot.

Referenced by COM_Text_rotation().

◆ COM_Text_size()

void COM_Text_size ( double x,
double y )
extern

Definition at line 5 of file text_size.c.

References COM_Text_size(), matrix_valid, text_size_x, text_size_y, and x.

Referenced by COM_Text_size().

◆ LIB_init()

void LIB_init ( const struct driver * drv)
extern

Initialize display driver.

Parameters
drvpointer to driver structure

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

References COM_Graph_set(), COM_Set_window(), DEF_HEIGHT, DEF_WIDTH, ftcap, LIB_init(), parse_fontcap(), screen_height, and screen_width.

Referenced by LIB_init().

Variable Documentation

◆ cur_x

◆ cur_y

◆ ftcap

struct GFONT_CAP* ftcap
extern

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

Referenced by COM_Set_font(), free_fontcap(), and LIB_init().

◆ matrix_valid

int matrix_valid
extern

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

Referenced by COM_Text_rotation(), and COM_Text_size().

◆ screen_height

int screen_height
extern

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

Referenced by HTML_Graph_close(), HTML_Graph_set(), LIB_init(), PNG_Graph_set(), and PS_Graph_set().

◆ screen_width

int screen_width
extern

◆ text_cosrot

double text_cosrot
extern

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

Referenced by COM_Text_rotation().

◆ text_rotation

double text_rotation
extern

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

Referenced by COM_Text_rotation().

◆ text_sinrot

double text_sinrot
extern

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

Referenced by COM_Text_rotation().

◆ text_size_x

double text_size_x
extern

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

Referenced by COM_Text_size().

◆ text_size_y

double text_size_y
extern

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

Referenced by COM_Text_size().