source: trunk/xgraph/jpgraph/jpg-config.inc

Last change on this file was 42, checked in by marrucho, 10 years ago
File size: 8.5 KB
Line 
1<?php
2//=======================================================================
3// File:        JPG-CONFIG.INC
4// Description: Configuration file for JpGraph library
5// Created:     2004-03-27
6// Author:      Johan Persson (johanp@aditus.nu)
7// Ver:         $Id: jpg-config.inc,v 1.1.2.2 2005/01/16 20:51:37 aditus Exp $
8//
9// License:     This code is released under QPL 1.0
10// Copyright (C) 2004 Johan Persson
11//========================================================================
12
13
14
15//------------------------------------------------------------------------
16// Directories for cache and font directory.
17//
18// CACHE_DIR:
19// The full absolute name of the directory to be used to store the
20// cached image files. This directory will not be used if the USE_CACHE
21// define (further down) is false. If you enable the cache please note that
22// this directory MUST be readable and writable for the process running PHP.
23// Must end with '/'
24//
25// TTF_DIR:
26// Directory where TTF fonts can be found. Must end with '/'
27//
28// The default values used if these defines are left commented out are:
29//
30// UNIX:
31//   CACHE_DIR /tmp/jpgraph_cache/
32//   TTF_DIR   /usr/X11R6/lib/X11/fonts/truetype/
33//   MBTTF_DIR /usr/share/fonts/ja/TrueType/
34//
35// WINDOWS:
36//   CACHE_DIR $SERVER_TEMP/jpgraph_cache/
37//   TTF_DIR   $SERVER_SYSTEMROOT/fonts/
38//   MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
39//
40//------------------------------------------------------------------------
41// DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
42// DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
43    DEFINE("TTF_DIR","../lib/fonts/");
44// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
45DEFINE("CACHE_DIR",".");
46// DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
47// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
48
49//-------------------------------------------------------------------------
50// Cache directory specification for use with CSIM graphs that are
51// using the cache.
52// The directory must be the filesysystem name as seen by PHP
53// and the 'http' version must be the same directory but as
54// seen by the HTTP server relative to the 'htdocs' ddirectory.
55// If a relative path is specified it is taken to be relative from where
56// the image script is executed.
57// Note: The default setting is to create a subdirectory in the
58// directory from where the image script is executed and store all files
59// there. As ususal this directory must be writeable by the PHP process.
60DEFINE("CSIMCACHE_DIR","csimcache/");
61DEFINE("CSIMCACHE_HTTP_DIR","csimcache/");
62
63//------------------------------------------------------------------------
64// Defines for font setup
65//------------------------------------------------------------------------
66
67// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
68// This is the TTF file being used when the font family is specified as
69// either FF_CHINESE or FF_BIG5
70DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
71
72// Special unicode cyrillic language support
73DEFINE("LANGUAGE_CYRILLIC",false);
74
75// If you are setting this config to true the conversion
76// will assume that the input text is windows 1251, if
77// false it will assume koi8-r
78DEFINE("CYRILLIC_FROM_WINDOWS",false);
79
80// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
81DEFINE('MINCHO_TTF_FONT','ipam.ttf');
82DEFINE('PMINCHO_TTF_FONT','ipamp.ttf');
83DEFINE('GOTHIC_TTF_FONT','ipag.ttf');
84DEFINE('PGOTHIC_TTF_FONT','ipagp.ttf');
85
86//------------------------------------------------------------------------
87// Various JpGraph Settings. Adjust accordingly to your
88// preferences. Note that cache functionality is turned off by
89// default (Enable by setting USE_CACHE to true)
90//------------------------------------------------------------------------
91
92// Deafult graphic format set to "auto" which will automatically
93// choose the best available format in the order png,gif,jpeg
94// (The supported format depends on what your PHP installation supports)
95DEFINE("DEFAULT_GFORMAT","auto");
96
97// Should the image be a truecolor image?
98// Note 1: Has only effect with GD 2.0.1 and above.
99// Note 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use
100// trucolor.
101// Note 3: MUST be enabled to get background images working with GD2
102DEFINE('USE_TRUECOLOR',true);
103
104// Specify what version of the GD library is installed.
105// If this is set to 'auto' the version will be automatically
106// determined.
107// However since determining the library takes ~1ms you can also
108// manually specify the version if you know what version you have.
109// This means that you should
110// set this define to true if you have GD 2.x installed to save 1ms.
111DEFINE("USE_LIBRARY_GD2",'auto');
112
113// Should the cache be used at all? By setting this to false no
114// files will be generated in the cache directory. 
115// The difference from READ_CACHE being that setting READ_CACHE to
116// false will still create the image in the cache directory
117// just not use it. By setting USE_CACHE=false no files will even
118// be generated in the cache directory.
119DEFINE("USE_CACHE",false);
120
121// Should we try to find an image in the cache before generating it?
122// Set this define to false to bypass the reading of the cache and always
123// regenerate the image. Note that even if reading the cache is
124// disabled the cached will still be updated with the newly generated
125// image. Set also "USE_CACHE" below.
126DEFINE("READ_CACHE",true);
127
128// Determine if the error handler should be image based or purely
129// text based. Image based makes it easier since the script will
130// always return an image even in case of errors.
131DEFINE("USE_IMAGE_ERROR_HANDLER",true);
132
133// Determine if the library should also setup the default PHP
134// error handler to generate a graphic error mesage. This is useful
135// during development to be able to see the error message as an image
136// instead as a "red-cross" in a page where an image is expected.
137DEFINE("INSTALL_PHP_ERR_HANDLER",false);
138
139// If the color palette is full should JpGraph try to allocate
140// the closest match? If you plan on using background images or
141// gradient fills it might be a good idea to enable this.
142// If not you will otherwise get an error saying that the color palette is
143// exhausted. The drawback of using approximations is that the colors
144// might not be exactly what you specified.
145// Note1: This does only apply to paletted images, not truecolor
146// images since they don't have the limitations of maximum number
147// of colors.
148DEFINE("USE_APPROX_COLORS",true);
149
150// Should usage of deprecated functions and parameters give a fatal error?
151// (Useful to check if code is future proof.)
152DEFINE("ERR_DEPRECATED",true);
153
154// Should the time taken to generate each picture be branded to the lower
155// left in corner in each generated image? Useful for performace measurements
156// generating graphs
157DEFINE("BRAND_TIMING",false);
158
159// What format should be used for the timing string?
160DEFINE("BRAND_TIME_FORMAT","(%01.3fs)");
161
162//------------------------------------------------------------------------
163// The following constants should rarely have to be changed !
164//------------------------------------------------------------------------
165
166// What group should the cached file belong to
167// (Set to "" will give the default group for the "PHP-user")
168// Please note that the Apache user must be a member of the
169// specified group since otherwise it is impossible for Apache
170// to set the specified group.
171DEFINE("CACHE_FILE_GROUP","wwwadmin");
172
173// What permissions should the cached file have
174// (Set to "" will give the default persmissions for the "PHP-user")
175DEFINE("CACHE_FILE_MOD",0664);
176
177// Decide if we should use the bresenham circle algorithm or the
178// built in Arc(). Bresenham gives better visual apperance of circles
179// but is more CPU intensive and slower then the built in Arc() function
180// in GD. Turned off by default for speed
181DEFINE("USE_BRESENHAM",false);
182
183// Special file name to indicate that we only want to calc
184// the image map in the call to Graph::Stroke() used
185// internally from the GetHTMLCSIM() method.
186DEFINE("_CSIM_SPECIALFILE","_csim_special_");
187
188// HTTP GET argument that is used with image map
189// to indicate to the script to just generate the image
190// and not the full CSIM HTML page.
191DEFINE("_CSIM_DISPLAY","_jpg_csimd");
192
193// Special filename for Graph::Stroke(). If this filename is given
194// then the image will NOT be streamed to browser of file. Instead the
195// Stroke call will return the handler for the created GD image.
196DEFINE("_IMG_HANDLER","__handle");
197
198
199?>
Note: See TracBrowser for help on using the repository browser.