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