Loading...
Searching...
No Matches
driver.h
Go to the documentation of this file.
#ifndef _DRIVER_H
#define _DRIVER_H
#include <grass/fontcap.h>
#ifdef GRASS_CMAKE_BUILD
#include <export/grass_driver_export.h>
#else
#define GRASS_DRIVER_EXPORT
#endif
GRASS_DRIVER_EXPORT extern int screen_width;
GRASS_DRIVER_EXPORT extern int screen_height;
GRASS_DRIVER_EXPORT extern double cur_x;
GRASS_DRIVER_EXPORT extern double cur_y;
GRASS_DRIVER_EXPORT extern double text_size_x;
GRASS_DRIVER_EXPORT extern double text_size_y;
GRASS_DRIVER_EXPORT extern double text_rotation;
extern double text_sinrot;
extern double text_cosrot;
GRASS_DRIVER_EXPORT extern int matrix_valid;
extern struct GFONT_CAP *ftcap;
struct driver {
char *name;
void (*Box)(double, double, double, double);
void (*Erase)(void);
int (*Graph_set)(void);
void (*Graph_close)(void);
const char *(*Graph_get_file)(void);
void (*Line_width)(double);
void (*Set_window)(double, double, double, double);
void (*Begin_raster)(int, int[2][2], double[2][2]);
int (*Raster)(int, int, const unsigned char *, const unsigned char *,
const unsigned char *, const unsigned char *);
void (*End_raster)(void);
void (*Begin)(void);
void (*Move)(double, double);
void (*Cont)(double, double);
void (*Close)(void);
void (*Stroke)(void);
void (*Fill)(void);
void (*Point)(double, double);
void (*Color)(int, int, int);
void (*Bitmap)(int, int, int, const unsigned char *);
void (*Text)(const char *);
void (*Text_box)(const char *, double *, double *, double *, double *);
void (*Set_font)(const char *);
void (*Font_list)(char ***, int *);
void (*Font_info)(char ***, int *);
};
/* Library Functions */
/* init.c */
extern void LIB_init(const struct driver *drv);
/* Commands */
/* box.c */
extern void COM_Box_abs(double, double, double, double);
/* color.c */
extern void COM_Color_RGB(unsigned char, unsigned char, unsigned char);
extern void COM_Standard_color(int);
/* erase.c */
extern void COM_Erase(void);
/* font.c */
extern void COM_Set_font(const char *);
extern void COM_Set_encoding(const char *);
extern void COM_Font_list(char ***, int *);
extern void COM_Font_info(char ***, int *);
/* get_t_box.c */
extern void COM_Get_text_box(const char *, double *, double *, double *,
double *);
/* graph.c */
extern int COM_Graph_set(void);
extern void COM_Graph_close(void);
extern const char *COM_Graph_get_file(void);
/* line_width.c */
extern void COM_Line_width(double);
/* move.c */
extern void COM_Pos_abs(double, double);
/* raster.c */
extern void COM_begin_raster(int, int[2][2], double[2][2]);
extern int COM_raster(int, int, const unsigned char *, const unsigned char *,
const unsigned char *, const unsigned char *);
extern void COM_end_raster(void);
/* set_window.c */
extern void COM_Set_window(double, double, double, double);
extern void COM_Get_window(double *, double *, double *, double *);
/* text.c */
extern void COM_Text(const char *);
/* text_size.c */
extern void COM_Text_size(double, double);
extern void COM_Text_rotation(double);
/* Driver Operations */
/* draw.c */
extern void COM_Bitmap(int, int, int, const unsigned char *);
extern void COM_Begin(void);
extern void COM_Move(double, double);
extern void COM_Cont(double, double);
extern void COM_Close(void);
extern void COM_Stroke(void);
extern void COM_Fill(void);
extern void COM_Point(double, double);
#endif /* _DRIVER_H */
COM_Get_window
void COM_Get_window(double *, double *, double *, double *)
Definition driver/set_window.c:19
COM_Graph_close
void COM_Graph_close(void)
Definition driver/graph.c:12
COM_Text_size
void COM_Text_size(double, double)
Definition text_size.c:5
text_size_y
double text_size_y
Definition driver/init.c:36
COM_Close
void COM_Close(void)
Definition driver/draw.c:28
text_rotation
double text_rotation
Definition driver/init.c:37
COM_Bitmap
void COM_Bitmap(int, int, int, const unsigned char *)
Definition driver/draw.c:4
COM_Standard_color
void COM_Standard_color(int)
Definition driver/color.c:11
COM_Graph_set
int COM_Graph_set(void)
Definition driver/graph.c:5
screen_height
int screen_height
Definition driver/init.c:30
COM_Point
void COM_Point(double, double)
Definition driver/draw.c:46
COM_raster
int COM_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition driver/raster.c:19
matrix_valid
int matrix_valid
Definition driver/init.c:40
COM_Pos_abs
void COM_Pos_abs(double, double)
Definition move.c:4
GRASS_DRIVER_EXPORT
#define GRASS_DRIVER_EXPORT
Definition driver.h:9
COM_Text_rotation
void COM_Text_rotation(double)
Definition text_size.c:12
text_cosrot
double text_cosrot
Definition driver/init.c:39
COM_Text
void COM_Text(const char *)
Definition driver/text.c:4
COM_end_raster
void COM_end_raster(void)
Definition driver/raster.c:29
COM_Get_text_box
void COM_Get_text_box(const char *, double *, double *, double *, double *)
Definition get_t_box.c:4
ftcap
struct GFONT_CAP * ftcap
Definition driver/init.c:27
COM_Line_width
void COM_Line_width(double)
Definition driver/line_width.c:4
COM_Move
void COM_Move(double, double)
Definition driver/draw.c:16
text_size_x
double text_size_x
Definition driver/init.c:35
COM_Fill
void COM_Fill(void)
Definition driver/draw.c:40
COM_Set_font
void COM_Set_font(const char *)
Definition font.c:84
screen_width
int screen_width
Definition driver/init.c:29
COM_begin_raster
void COM_begin_raster(int, int[2][2], double[2][2])
Definition driver/raster.c:13
COM_Set_window
void COM_Set_window(double, double, double, double)
Definition driver/set_window.c:8
COM_Font_info
void COM_Font_info(char ***, int *)
Definition font.c:154
cur_x
double cur_x
Definition driver/init.c:32
text_sinrot
double text_sinrot
Definition driver/init.c:38
cur_y
double cur_y
Definition driver/init.c:33
COM_Graph_get_file
const char * COM_Graph_get_file(void)
Definition driver/graph.c:18
LIB_init
void LIB_init(const struct driver *drv)
Initialize display driver.
Definition driver/init.c:47
COM_Box_abs
void COM_Box_abs(double, double, double, double)
Definition driver/box.c:4
COM_Color_RGB
void COM_Color_RGB(unsigned char, unsigned char, unsigned char)
Definition driver/color.c:5
COM_Stroke
void COM_Stroke(void)
Definition driver/draw.c:34
COM_Erase
void COM_Erase(void)
Definition driver/erase.c:4
COM_Set_encoding
void COM_Set_encoding(const char *)
Definition font.c:139
COM_Begin
void COM_Begin(void)
Definition driver/draw.c:10
COM_Cont
void COM_Cont(double, double)
Definition driver/draw.c:22
COM_Font_list
void COM_Font_list(char ***, int *)
Definition font.c:147
driver
Definition driver.h:27
driver::Graph_close
void(* Graph_close)(void)
Definition driver.h:33
driver::Line_width
void(* Line_width)(double)
Definition driver.h:35
driver::Font_info
void(* Font_info)(char ***, int *)
Definition driver.h:55
driver::Text_box
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition driver.h:52
driver::Point
void(* Point)(double, double)
Definition driver.h:47
driver::Fill
void(* Fill)(void)
Definition driver.h:46
driver::Erase
void(* Erase)(void)
Definition driver.h:31
driver::Raster
int(* Raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition driver.h:38
driver::Stroke
void(* Stroke)(void)
Definition driver.h:45
driver::Begin
void(* Begin)(void)
Definition driver.h:41
driver::Font_list
void(* Font_list)(char ***, int *)
Definition driver.h:54
driver::End_raster
void(* End_raster)(void)
Definition driver.h:40
driver::Box
void(* Box)(double, double, double, double)
Definition driver.h:30
driver::Move
void(* Move)(double, double)
Definition driver.h:42
driver::Begin_raster
void(* Begin_raster)(int, int[2][2], double[2][2])
Definition driver.h:37
driver::name
char * name
Definition driver.h:28
driver::Close
void(* Close)(void)
Definition driver.h:44
driver::Set_window
void(* Set_window)(double, double, double, double)
Definition driver.h:36
driver::Graph_set
int(* Graph_set)(void)
Definition driver.h:32
driver::Set_font
void(* Set_font)(const char *)
Definition driver.h:53
driver::Text
void(* Text)(const char *)
Definition driver.h:51
driver::Cont
void(* Cont)(double, double)
Definition driver.h:43
driver::Color
void(* Color)(int, int, int)
Definition driver.h:49
driver::Bitmap
void(* Bitmap)(int, int, int, const unsigned char *)
Definition driver.h:50