Loading...
Searching...
No Matches
pngdriver/driver.c
Go to the documentation of this file.
/*!
\file lib/pngdriver/driver.c
\brief GRASS png display driver - driver initialization
(C) 2007-2014 by Glynn Clements 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 Glynn Clements
*/
#include "pngdriver.h"
/*!
\brief Initialize display driver
\return pointer driver structure
*/
const struct driver *PNG_Driver(void)
{
static struct driver drv;
static int initialized;
if (initialized)
return &drv;
drv.name = "png";
drv.Box = PNG_Box;
drv.Erase = PNG_Erase;
drv.Graph_set = PNG_Graph_set;
drv.Graph_close = PNG_Graph_close;
drv.Graph_get_file = PNG_Graph_get_file;
drv.Line_width = PNG_Line_width;
drv.Set_window = PNG_Set_window;
drv.Begin_raster = PNG_begin_raster;
drv.Raster = PNG_raster;
drv.End_raster = NULL;
drv.Begin = PNG_Begin;
drv.Move = PNG_Move;
drv.Cont = PNG_Cont;
drv.Close = PNG_Close;
drv.Stroke = PNG_Stroke;
drv.Fill = PNG_Fill;
drv.Point = PNG_Point;
drv.Color = PNG_color_rgb;
drv.Bitmap = PNG_draw_bitmap;
drv.Text = NULL;
drv.Text_box = NULL;
drv.Set_font = NULL;
drv.Font_list = NULL;
drv.Font_info = NULL;
initialized = 1;
return &drv;
}
NULL
#define NULL
Definition ccmath.h:32
PNG_Box
void PNG_Box(double fx1, double fy1, double fx2, double fy2)
Draw a (filled) rectangle.
Definition pngdriver/box.c:23
PNG_color_rgb
void PNG_color_rgb(int r, int g, int b)
Identify a color.
Definition pngdriver/color.c:31
PNG_Close
void PNG_Close(void)
Definition pngdriver/draw.c:36
PNG_Begin
void PNG_Begin(void)
Definition pngdriver/draw.c:21
PNG_Cont
void PNG_Cont(double x, double y)
Definition pngdriver/draw.c:31
PNG_Move
void PNG_Move(double x, double y)
Definition pngdriver/draw.c:26
PNG_Stroke
void PNG_Stroke(void)
Definition pngdriver/draw.c:41
PNG_Fill
void PNG_Fill(void)
Definition pngdriver/draw.c:46
PNG_draw_bitmap
void PNG_draw_bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Draw bitmap.
Definition pngdriver/draw_bitmap.c:32
PNG_Driver
const struct driver * PNG_Driver(void)
Initialize display driver.
Definition pngdriver/driver.c:21
PNG_Erase
void PNG_Erase(void)
Erase screen.
Definition pngdriver/erase.c:20
PNG_Graph_close
void PNG_Graph_close(void)
Close down the graphics processing. This gets called only at driver termination time.
Definition pngdriver/graph_close.c:50
PNG_Graph_set
int PNG_Graph_set(void)
Start up graphics processing.
Definition pngdriver/graph_set.c:86
PNG_Graph_get_file
const char * PNG_Graph_get_file(void)
Get render file.
Definition pngdriver/graph_set.c:184
PNG_Line_width
void PNG_Line_width(double width)
Set line width.
Definition pngdriver/line_width.c:23
pngdriver.h
GRASS png display driver - header file.
PNG_raster
int PNG_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
Definition pngdriver/raster.c:111
PNG_begin_raster
void PNG_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
Definition pngdriver/raster.c:80
PNG_Point
void PNG_Point(double, double)
Draw point.
Definition point.c:20
PNG_Set_window
void PNG_Set_window(double, double, double, double)
Set window.
Definition pngdriver/set_window.c:23
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