Loading...
Searching...
No Matches
cairodriver/driver.c
Go to the documentation of this file.
/*!
\file lib/cairodriver/driver.c
\brief GRASS cairo display driver - driver initialization
(C) 2007-2014 by Lars Ahlzen and the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
\author Lars Ahlzen <lars ahlzen.com> (original contributor)
\author Glynn Clements
*/
#include "cairodriver.h"
/*!
\brief Initialize display driver
\return pointer driver structure
*/
const struct driver *Cairo_Driver(void)
{
static struct driver drv;
static int initialized;
if (initialized)
return &drv;
drv.name = "cairo";
drv.Box = Cairo_Box;
drv.Erase = Cairo_Erase;
drv.Graph_set = Cairo_Graph_set;
drv.Graph_get_file = Cairo_Graph_get_file;
drv.Graph_close = Cairo_Graph_close;
drv.Line_width = Cairo_Line_width;
drv.Set_window = Cairo_Set_window;
drv.Begin_raster = Cairo_begin_raster;
drv.Raster = Cairo_raster;
drv.End_raster = Cairo_end_raster;
drv.Begin = Cairo_Begin;
drv.Move = Cairo_Move;
drv.Cont = Cairo_Cont;
drv.Close = Cairo_Close;
drv.Stroke = Cairo_Stroke;
drv.Fill = Cairo_Fill;
drv.Point = Cairo_Point;
drv.Color = Cairo_Color;
drv.Bitmap = Cairo_Bitmap;
drv.Text = Cairo_Text;
drv.Text_box = Cairo_text_box;
drv.Set_font = Cairo_set_font;
drv.Font_list = Cairo_font_list;
drv.Font_info = Cairo_font_info;
initialized = 1;
return &drv;
}
Cairo_Box
void Cairo_Box(double x1, double y1, double x2, double y2)
Draw a (filled) rectangle.
Definition cairodriver/box.c:22
Cairo_Driver
const struct driver * Cairo_Driver(void)
Initialize display driver.
Definition cairodriver/driver.c:22
cairodriver.h
GRASS cairo display driver - header file.
Cairo_Point
void Cairo_Point(double, double)
Definition cairodriver/draw.c:49
Cairo_Color
void Cairo_Color(int, int, int)
Set source color (opaque).
Definition cairodriver/color.c:27
Cairo_Graph_get_file
const char * Cairo_Graph_get_file(void)
Get render file.
Definition cairodriver/graph.c:294
Cairo_Begin
void Cairo_Begin(void)
Definition cairodriver/draw.c:17
Cairo_Erase
void Cairo_Erase(void)
Erase screen.
Definition cairodriver/erase.c:20
Cairo_Move
void Cairo_Move(double, double)
Definition cairodriver/draw.c:22
Cairo_Close
void Cairo_Close(void)
Definition cairodriver/draw.c:32
Cairo_Stroke
void Cairo_Stroke(void)
Definition cairodriver/draw.c:37
Cairo_raster
int Cairo_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
Definition cairodriver/raster.c:130
Cairo_Fill
void Cairo_Fill(void)
Definition cairodriver/draw.c:43
Cairo_font_info
void Cairo_font_info(char ***, int *)
Get fonts into.
Definition cairodriver/text.c:338
Cairo_Line_width
void Cairo_Line_width(double)
Set line width.
Definition cairodriver/line_width.c:27
Cairo_font_list
void Cairo_font_list(char ***, int *)
Get list of fonts.
Definition cairodriver/text.c:324
Cairo_Cont
void Cairo_Cont(double, double)
Definition cairodriver/draw.c:27
Cairo_end_raster
void Cairo_end_raster(void)
Finish drawing raster.
Definition cairodriver/raster.c:180
Cairo_set_font
void Cairo_set_font(const char *)
Set font.
Definition cairodriver/text.c:283
Cairo_Graph_set
int Cairo_Graph_set(void)
Initialize driver.
Definition cairodriver/graph.c:237
Cairo_Graph_close
void Cairo_Graph_close(void)
Close driver.
Definition cairodriver/graph.c:302
Cairo_Text
void Cairo_Text(const char *)
Draw text.
Definition cairodriver/text.c:110
Cairo_begin_raster
void Cairo_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
Definition cairodriver/raster.c:71
Cairo_Bitmap
void Cairo_Bitmap(int, int, int, const unsigned char *)
Draw bitmap.
Definition cairodriver/draw_bitmap.c:26
Cairo_Set_window
void Cairo_Set_window(double, double, double, double)
Set window.
Definition cairodriver/set_window.c:22
Cairo_text_box
void Cairo_text_box(const char *, double *, double *, double *, double *)
Definition cairodriver/text.c:133
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::Graph_get_file
const char *(* Graph_get_file)(void)
Definition driver.h:34
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