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