Reset parser in grace_set_project().
[grace.git] / src / psdrv.h
blob7a5126eaca5bc8ea9de82d03b012ec1cb5108d41
1 /*
2 * Grace - GRaphing, Advanced Computation and Exploration of data
3 *
4 * Home page: http://plasma-gate.weizmann.ac.il/Grace/
5 *
6 * Copyright (c) 1996-2002 Grace Development Team
7 *
8 * Maintained by Evgeny Stambulchik
9 *
11 * All Rights Reserved
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include "defines.h"
30 #define PS_FORMAT 0
31 #define EPS_FORMAT 1
32 /* #define EPSI_FORMAT 2 */
34 typedef enum {
35 COLORSPACE_GRAYSCALE,
36 COLORSPACE_RGB,
37 COLORSPACE_CMYK
38 } PSColorSpace;
40 typedef struct {
41 int embed;
42 char *name;
43 } PSFont;
45 #define DEFAULT_COLORSPACE COLORSPACE_RGB
47 #define MEDIA_FEED_AUTO 0
48 #define MEDIA_FEED_MATCH 1
49 #define MEDIA_FEED_MANUAL 2
51 #define DOCDATA_7BIT 0
52 #define DOCDATA_8BIT 1
53 #define DOCDATA_BINARY 2
55 #define FONT_EMBED_NONE 0
56 #define FONT_EMBED_BUT13 1
57 #define FONT_EMBED_BUT35 2
58 #define FONT_EMBED_ALL 3
60 #define MAX_PS_LINELEN 70
62 int ps_initgraphics(const Canvas *canvas, void *data,
63 const CanvasStats *cstats);
65 void ps_drawpixel(const Canvas *canvas, void *data, const VPoint *vp);
66 void ps_drawpolyline(const Canvas *canvas, void *data,
67 const VPoint *vps, int n, int mode);
68 void ps_fillpolygon(const Canvas *canvas, void *data,
69 const VPoint *vps, int nc);
70 void ps_drawarc(const Canvas *canvas, void *data,
71 const VPoint *vp1, const VPoint *vp2, double a1, double a2);
72 void ps_fillarc(const Canvas *canvas, void *data,
73 const VPoint *vp1, const VPoint *vp2, double a1, double a2, int mode);
74 void ps_putpixmap(const Canvas *canvas, void *data,
75 const VPoint *vp, const CPixmap *pm);
76 void ps_puttext(const Canvas *canvas, void *data,
77 const VPoint *vp, const char *s, int len, int font, const TextMatrix *tm,
78 int underline, int overline, int kerning);
80 void ps_leavegraphics(const Canvas *canvas, void *data,
81 const CanvasStats *cstats);
83 int ps_op_parser(const Canvas *canvas, void *data, const char *opstring);
85 #if defined(NONE_GUI)
86 # define ps_gui_setup NULL
87 #else
88 void ps_gui_setup(const Canvas *canvas, void *data);
89 #endif