PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
metadefs.h
Go to the documentation of this file.
1 // Geoffrey Furnish
2 // 5 May 1991
3 //
4 // This file contains definitions of constants and structures which
5 // are needed by the PLplot metafile writer and renderer.
6 //
7 
8 //
9 // PLMETA_HEADER holds the magic string at head of metafile.
10 // PLMETA_VERSION holds the version number (year & letter).
11 //
12 // Note: All strings written into the file header are limited to a maximum
13 // of 80 characters.
14 //
15 
16 #define PLMETA_HEADER "PLPLOT"
17 #define PLMETA_VERSION "2005a"
18 
19 // These are used by the TK driver client/server code
20 
21 #define PLSERV_HEADER "PLPLOT"
22 #define PLSERV_VERSION "2005b"
23 
24 // Symbolic constants for old metafile versions (prior to 1992a).
25 // Now these are stored in the metafile header.
26 
27 #define PLMETA_X_OLD 10000
28 #define PLMETA_Y_OLD 10000
29 
30 // Virtual dots/mm for our virtual display space.
31 
32 #define PIXEL_RES_X_OLD 42
33 #define PIXEL_RES_Y_OLD 56
34 
35 // Macros to make it easier to abort on nonzero return code
36 // Can't call plexit on a write failure since that would be circular
37 
38 #define plm_wr( code ) \
39  if ( code ) { fprintf( stderr, "Unable to write to MetaFile\n" ); exit( 1 ); }
40 
41 #define plm_rd( code ) \
42  if ( code ) plexit( "Unable to read from MetaFile" )
43 
44 //
45 // Metafile commands.
46 //
47 //** NOTICE !!! ***
48 // If you change ANY of the following, you will wreck backward
49 // backward compatibility with old metafiles. You may add, but do
50 // NOT delete !!!
51 //
52 
53 #define INITIALIZE 1
54 #define CLOSE 2
55 #define SWITCH_TO_TEXT 3 // Obsolete, replaced by ESCAPE
56 #define SWITCH_TO_GRAPH 4 // Obsolete, replaced by ESCAPE
57 #define EOP 5
58 #define BOP 6
59 #define NEW_COLOR 7 // Obsolete, replaced by CHANGE_STATE
60 #define NEW_WIDTH 8 // Obsolete, replaced by CHANGE_STATE
61 #define LINE 9
62 #define LINETO 10
63 #define ESCAPE 11
64 #define ADVANCE 12 // Obsolete, BOP/EOP used instead
65 #define POLYLINE 13
66 #define NEW_COLOR0 NEW_COLOR
67 #define NEW_COLOR1 14
68 #define CHANGE_STATE 15
69 #define BOP0 16 // First BOP in a file
70 #define END_OF_FIELD 255