2 Copyright (C) 2005,2006,2007,2008 Eugene K. Ressler, Jr.
4 This file is part of Sketch, a small, simple system for making
5 3d drawings with LaTeX and the PSTricks or TikZ package.
7 Sketch is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 Sketch is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Sketch; see the file COPYING.txt. If not, see
19 http://www.gnu.org/copyleft */
35 #define GE_OUTPUT_LANGUAGE 9
37 // these must match table in opt.c and global.c
38 #define GEOL_GRAPHICS_BIT 1
39 #define GEOL_TEX_MACROS_BIT 2
40 #define GEOL_PSTRICKS (GEOL_GRAPHICS_BIT*0)
41 #define GEOL_TIKZ (GEOL_GRAPHICS_BIT*1)
42 #define GEOL_LATEX (GEOL_TEX_MACROS_BIT*0)
43 #define GEOL_CONTEXT (GEOL_TEX_MACROS_BIT*1)
45 // this must match string table in global.c
46 extern char *output_language_str
[];
48 typedef struct global_env_t
52 POINT_3D bb1
, bb2
; // bounding box
53 char *frame_opts
; // null if frame has none
58 PST_VERSION pst_version
[1];
59 TIKZ_VERSION tikz_version
[1];
63 #define global_env_is_set_p(Env, F) ((Env)->set_p_mask & bit(F))
65 void init_global_env (GLOBAL_ENV
* env
, PST_VERSION
*pst_version
, TIKZ_VERSION
*tikz_version
);
66 void set_global_baseline (GLOBAL_ENV
* env
, FLOAT baseline
, SRC_LINE line
);
67 #define NO_BASELINE FLT_MAX
68 void set_global_env_extent (GLOBAL_ENV
* env
, POINT_3D p1
, POINT_3D p2
,
70 int get_transformed_global_env_extent (BOX_3D
* extent
, GLOBAL_ENV
* env
);
71 void set_global_env_opts (GLOBAL_ENV
* env
, char *opt_str
, SRC_LINE line
);
72 void set_global_env_frame (GLOBAL_ENV
* env
, char *opt_str
, SRC_LINE line
);
73 void set_global_env_camera (GLOBAL_ENV
* env
, TRANSFORM camera
,
75 void set_global_output_language (GLOBAL_ENV
* env
, int output_language
,
77 int get_global_output_language (int *output_language
, GLOBAL_ENV
* env
);
78 int cmp_with_global_pst_version(GLOBAL_ENV
* env
,
82 extern GLOBAL_ENV __the_global_env
[1];
84 #define global_env __the_global_env