1 /*
2 Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8 
9     - Redistributions of source code must retain the above copyright
10       notice, this list of conditions and the following disclaimer.
11 
12     - Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in
14       the documentation and/or other materials provided with the
15       distribution.
16 
17     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
18       names of its contributors may be used to endorse or promote products
19       derived from this software without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33 
34 #ifndef _G_H_
35 #define _G_H_ 1
36 
37 
38 
39 
40 #define Xoption         0       /* Gdraw routine option */
41 #define PSoption                1       /* Gdraw routine option */
42 
43 #define psError         -1      /* error return status */
44 
45 /* Black and white definitions of PS */
46 
47 #define psBlack         0.0     /* def for black in PS */
48 #define psWhite         1.0     /* def for white in PS */
49 
50 /* Foreground and background definition */
51 
52 #define psForeground    psBlack /* foreground color: black */
53 #define psBackground    psWhite /* background color: white */
54 
55 /* Gray scale definitions -- same as that in src/XShade.h for XShadeMax */
56 
57 #define psShadeMax      17.0    /* same as XShadeMax */
58 #define psShadeMul      (1.0/(psShadeMax-1.0))  /* white and 16 gray shades */
59 
60 #define psNormalWidth   1       /* def for line width */
61 
62 /* These are all the line join styles available in PS */
63 
64 #define psMiterJoin     0
65 #define psRoundJoin     1
66 #define psBevelJoin     2
67 
68 /* These are all the line cap styles available in PS */
69 
70 #define psButtCap       0
71 #define psRoundCap      1
72 #define psPSqCap        2
73 
74 
75 
76 /*
77  * Structures
78  */
79 
80 /*
81  * This is used to keep track of GC name in character and in unsigned long
82  */
83 
84 typedef struct _GCstruct {
85   GC     GCint;
86   char           GCchar[12];
87   struct _GCstruct *next;
88 } GCstruct, *GCptr;
89 
90 
91 /*
92  * These global variables are expected to be declared somewehere in the
93  * client application source, eg, in main.c for view2D and view3D.
94  */
95 
96 extern char PSfilename[280];  /* used as ps file pathname */
97 
98 extern int   psInit;      /* Flag for one-time PS initialization routine. */
99 
100 extern GCptr GChead;      /* Points to the head of GCstruct linked list. */
101 
102 #endif
103