GRASS GIS 8 Programmer's Manual 8.2.1(2023)-exported
psdriver/driver.c
Go to the documentation of this file.
1
2/****************************************************************************
3 *
4 * MODULE: PS driver
5 * AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
6 * COPYRIGHT: (C) 2007 Glynn Clements
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 *****************************************************************************/
19
20#include "psdriver.h"
21
22const struct driver *PS_Driver(void)
23{
24 static struct driver drv;
25 static int initialized;
26
27 if (initialized)
28 return &drv;
29
30 drv.name = "ps";
31 drv.Box = PS_Box;
32 drv.Erase = PS_Erase;
39 drv.Raster = PS_raster;
41 drv.Begin = PS_Begin;
42 drv.Move = PS_Move;
43 drv.Cont = PS_Cont;
44 drv.Close = PS_Close;
45 drv.Stroke = PS_Stroke;
46 drv.Fill = PS_Fill;
47 drv.Point = PS_Point;
48 drv.Color = PS_Color;
49 drv.Bitmap = PS_Bitmap;
50 drv.Text = NULL;
51 drv.Text_box = NULL;
52 drv.Set_font = NULL;
53 drv.Font_list = NULL;
54 drv.Font_info = NULL;
55
56 initialized = 1;
57
58 return &drv;
59}
#define NULL
Definition: ccmath.h:32
void PS_Box(double x1, double y1, double x2, double y2)
Definition: psdriver/box.c:4
void PS_Color(int r, int g, int b)
Definition: psdriver/color.c:5
void PS_Stroke(void)
Definition: psdriver/draw.c:36
void PS_Fill(void)
Definition: psdriver/draw.c:41
void PS_Close(void)
Definition: psdriver/draw.c:31
void PS_Begin(void)
Definition: psdriver/draw.c:16
void PS_Point(double x, double y)
Definition: psdriver/draw.c:46
void PS_Cont(double x, double y)
Definition: psdriver/draw.c:26
void PS_Move(double x, double y)
Definition: psdriver/draw.c:21
void PS_Bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
const struct driver * PS_Driver(void)
void PS_Erase(void)
Definition: psdriver/erase.c:3
void PS_Graph_close(void)
int PS_Graph_set(void)
const char * PS_Graph_get_file(void)
Get render file.
void PS_Line_width(double width)
int PS_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void PS_Set_window(double, double, double, double)
void PS_begin_raster(int, int[2][2], double[2][2])
void PS_end_raster(void)
Definition: driver.h:23
void(* Graph_close)(void)
Definition: driver.h:29
void(* Line_width)(double)
Definition: driver.h:31
void(* Font_info)(char ***, int *)
Definition: driver.h:54
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition: driver.h:51
void(* Point)(double, double)
Definition: driver.h:46
void(* Fill)(void)
Definition: driver.h:45
const char *(* Graph_get_file)(void)
Definition: driver.h:30
void(* Erase)(void)
Definition: driver.h:27
int(* Raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition: driver.h:34
void(* Stroke)(void)
Definition: driver.h:44
void(* Begin)(void)
Definition: driver.h:40
void(* Font_list)(char ***, int *)
Definition: driver.h:53
void(* End_raster)(void)
Definition: driver.h:39
void(* Box)(double, double, double, double)
Definition: driver.h:26
void(* Move)(double, double)
Definition: driver.h:41
void(* Begin_raster)(int, int[2][2], double[2][2])
Definition: driver.h:33
char * name
Definition: driver.h:24
void(* Close)(void)
Definition: driver.h:43
void(* Set_window)(double, double, double, double)
Definition: driver.h:32
int(* Graph_set)(void)
Definition: driver.h:28
void(* Set_font)(const char *)
Definition: driver.h:52
void(* Text)(const char *)
Definition: driver.h:50
void(* Cont)(double, double)
Definition: driver.h:42
void(* Color)(int, int, int)
Definition: driver.h:48
void(* Bitmap)(int, int, int, const unsigned char *)
Definition: driver.h:49