GRASS 8 Programmer's Manual 8.5.0(2026)-8d6ceba290
Loading...
Searching...
No Matches
cairodriver/driver.c
Go to the documentation of this file.
1/*!
2 \file lib/cairodriver/driver.c
3
4 \brief GRASS cairo display driver - driver initialization
5
6 (C) 2007-2014 by Lars Ahlzen and the GRASS Development Team
7
8 This program is free software under the GNU General Public License
9 (>=v2). Read the file COPYING that comes with GRASS for details.
10
11 \author Lars Ahlzen <lars ahlzen.com> (original contributor)
12 \author Glynn Clements
13 */
14
15#include "cairodriver.h"
16
17/*!
18 \brief Initialize display driver
19
20 \return pointer driver structure
21 */
22const struct driver *Cairo_Driver(void)
23{
24 static struct driver drv;
25 static int initialized;
26
27 if (initialized)
28 return &drv;
29
30 drv.name = "cairo";
31 drv.Box = Cairo_Box;
32 drv.Erase = Cairo_Erase;
39 drv.Raster = Cairo_raster;
41 drv.Begin = Cairo_Begin;
42 drv.Move = Cairo_Move;
43 drv.Cont = Cairo_Cont;
44 drv.Close = Cairo_Close;
45 drv.Stroke = Cairo_Stroke;
46 drv.Fill = Cairo_Fill;
47 drv.Point = Cairo_Point;
48 drv.Color = Cairo_Color;
49 drv.Bitmap = Cairo_Bitmap;
50 drv.Text = Cairo_Text;
55
56 initialized = 1;
57
58 return &drv;
59}
void Cairo_Box(double x1, double y1, double x2, double y2)
Draw a (filled) rectangle.
GRASS cairo display driver - header file.
void Cairo_Point(double, double)
void Cairo_Color(int, int, int)
Set source color (opaque).
const struct driver * Cairo_Driver(void)
Initialize display driver.
const char * Cairo_Graph_get_file(void)
Get render file.
void Cairo_Begin(void)
void Cairo_Erase(void)
Erase screen.
void Cairo_Move(double, double)
void Cairo_Close(void)
void Cairo_Stroke(void)
int Cairo_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
void Cairo_Fill(void)
void Cairo_font_info(char ***, int *)
Get fonts into.
void Cairo_Line_width(double)
Set line width.
void Cairo_font_list(char ***, int *)
Get list of fonts.
void Cairo_Cont(double, double)
void Cairo_end_raster(void)
Finish drawing raster.
void Cairo_set_font(const char *)
Set font.
int Cairo_Graph_set(void)
Initialize driver.
void Cairo_Graph_close(void)
Close driver.
void Cairo_Text(const char *)
Draw text.
void Cairo_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
void Cairo_Bitmap(int, int, int, const unsigned char *)
Draw bitmap.
void Cairo_Set_window(double, double, double, double)
Set window.
void Cairo_text_box(const char *, double *, double *, double *, double *)
void(*) Text_box(const char *, double *, double *, double *, double *)
Definition driver.h:52
void(*) Erase(void)
Definition driver.h:31
void(*) Point(double, double)
Definition driver.h:47
void(*) Stroke(void)
Definition driver.h:45
void(*) Set_font(const char *)
Definition driver.h:53
void(*) End_raster(void)
Definition driver.h:40
void(*) Font_list(char ***, int *)
Definition driver.h:54
void(*) Set_window(double, double, double, double)
Definition driver.h:36
void(*) Box(double, double, double, double)
Definition driver.h:30
void(*) Font_info(char ***, int *)
Definition driver.h:55
void(*) Color(int, int, int)
Definition driver.h:49
void(*) Begin(void)
Definition driver.h:41
void(*) Close(void)
Definition driver.h:44
void(*) Fill(void)
Definition driver.h:46
char * name
Definition driver.h:28
int(*) Raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition driver.h:38
void(*) Move(double, double)
Definition driver.h:42
void(*) Text(const char *)
Definition driver.h:51
const char *(*) Graph_get_file(void)
Definition driver.h:34
void(*) Graph_close(void)
Definition driver.h:33
void(*) Bitmap(int, int, int, const unsigned char *)
Definition driver.h:50
int(*) Graph_set(void)
Definition driver.h:32
void(*) Begin_raster(int, int[2][2], double[2][2])
Definition driver.h:37
void(*) Line_width(double)
Definition driver.h:35
void(*) Cont(double, double)
Definition driver.h:43