open-axiom repository from github
/*1Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2008, Gabriel Dos Reis.4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical ALgorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435#ifndef _GDRAWS0_H_36#define _GDRAWS0_H_ 13738#include "openaxiom-c-macros.h"39#include <X11/Xlib.h>404142#define yes 143#define no 04445/*46* Indices for PostScript draw procedures.47*48* The order of these defined variables are very important; they are used49* to create the OUTPUT file. Essentially, PSCreateFile() loops through the50* index of 0 to psDrawNo and checks if the file/procedure is used. If so,51* the file is copied to the output file.52*/5354#define output 0 /* output file */55#define headerps 1 /* postscript header file */56#define drawps 2 /* draw procedure */57#define drawarcps 3 /* draw arc procedure */58#define drawfilledps 4 /* draw filled procedure */59#define drawcolorps 5 /* draw color filled procedure */60#define drawpointps 6 /* draw point procedure */61#define fillpolyps 7 /* polygon filled procedure */62#define fillwolps 8 /* polygon filled with outline proc */63#define colorpolyps 9 /* polygon fill with color procedure */64#define colorwolps 10 /* polygon fill with color procedure */65#define drawlineps 11 /* draw line procedure */66#define drawlinesps 12 /* draw lines procedure */67#define drawIstrps 13 /* draw image string procedure */68#define drawstrps 14 /* draw string procedure */69#define drawrectps 15 /* draw rectangle procedure */70#define fillarcps 16 /* filled arc procedure */71#define setupps 17 /* setup, or pre-script */72#define GCdictps 18 /* grahphics context definition file */73#define scriptps 19 /* script file */74#define endps 20 /* wrap up, close down, procedure */7576#define psDrawNo 21 /* for use in createPSfile() */777879/*80* PostScript structures81*/8283typedef struct _psStruct { /* data structure for ps routines info */84int flag;85char filename[200];86} psStruct;8788psStruct psData[psDrawNo]; /* need psDrawNo of them */899091/*92* These variables are expected to be declared in within client programs, eg,93* main.c in view2D and view3D.94*/9596extern int scrn; /* screen */97extern Display *dsply; /* display */98extern char *envAXIOM; /* environment variable AXIOM or DEVE */99100101#endif102103104105106