source: trunk/client/modules/Elezioni/grafici/jpg-config.inc.php@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 9.3 KB
RevLine 
[2]1<?php
2//=======================================================================
3// File: JPG-CONFIG.INC
4// Description: Configuration file for JpGraph library
5// Created: 2004-03-27
6// Ver: $Id: jpg-config.inc.php 1091 2009-01-18 22:57:40Z ljp $
7//
8// Copyright (c) Aditus Consulting. All rights reserved.
9//========================================================================
10
11
12
13//------------------------------------------------------------------------
14// Directories for cache and font directory.
15//
16// CACHE_DIR:
17// The full absolute name of the directory to be used to store the
18// cached image files. This directory will not be used if the USE_CACHE
19// define (further down) is false. If you enable the cache please note that
20// this directory MUST be readable and writable for the process running PHP.
21// Must end with '/'
22//
23// TTF_DIR:
24// Directory where TTF fonts can be found. Must end with '/'
25//
26// The default values used if these defines are left commented out are:
27//
28// UNIX:
29// CACHE_DIR /tmp/jpgraph_cache/
30// TTF_DIR /usr/share/fonts/truetype/
31// MBTTF_DIR /usr/share/fonts/ja/TrueType/
32//
33// WINDOWS:
34// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
35// TTF_DIR $SERVER_SYSTEMROOT/fonts/
36// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
37//
38//------------------------------------------------------------------------
39// define("CACHE_DIR","/tmp/jpgraph_cache/");
40// define("TTF_DIR","/usr/share/fonts/truetype/");
41// define("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
42
43//-------------------------------------------------------------------------
44// Cache directory specification for use with CSIM graphs that are
45// using the cache.
46// The directory must be the filesysystem name as seen by PHP
47// and the 'http' version must be the same directory but as
48// seen by the HTTP server relative to the 'htdocs' ddirectory.
49// If a relative path is specified it is taken to be relative from where
50// the image script is executed.
51// Note: The default setting is to create a subdirectory in the
52// directory from where the image script is executed and store all files
53// there. As ususal this directory must be writeable by the PHP process.
54define("CSIMCACHE_DIR","csimcache/");
55define("CSIMCACHE_HTTP_DIR","csimcache/");
56
57//------------------------------------------------------------------------
58// Defines for font setup
59//------------------------------------------------------------------------
60
61// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
62// This is the TTF file being used when the font family is specified as
63// either FF_CHINESE or FF_BIG5
64define('CHINESE_TTF_FONT','bkai00mp.ttf');
65
66// Special unicode greek language support
67define("LANGUAGE_GREEK",false);
68
69// If you are setting this config to true the conversion of greek characters
70// will assume that the input text is windows 1251
71define("GREEK_FROM_WINDOWS",false);
72
73// Special unicode cyrillic language support
74define("LANGUAGE_CYRILLIC",false);
75
76// If you are setting this config to true the conversion
77// will assume that the input text is windows 1251, if
78// false it will assume koi8-r
79define("CYRILLIC_FROM_WINDOWS",false);
80
81// The following constant is used to auto-detect
82// whether cyrillic conversion is really necessary
83// if enabled. Just replace 'windows-1251' with a variable
84// containing the input character encoding string
85// of your application calling jpgraph.
86// A typical such string would be 'UTF-8' or 'utf-8'.
87// The comparison is case-insensitive.
88// If this charset is not a 'koi8-r' or 'windows-1251'
89// derivate then no conversion is done.
90//
91// This constant can be very important in multi-user
92// multi-language environments where a cyrillic conversion
93// could be needed for some cyrillic people
94// and resulting in just erraneous conversions
95// for not-cyrillic language based people.
96//
97// Example: In the free project management
98// software dotproject.net $locale_char_set is dynamically
99// set by the language environment the user has chosen.
100//
101// Usage: define('LANGUAGE_CHARSET', $locale_char_set);
102//
103// where $locale_char_set is a GLOBAL (string) variable
104// from the application including JpGraph.
105//
106define('LANGUAGE_CHARSET', null);
107
108// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
109define('MINCHO_TTF_FONT','ipam.ttf');
110define('PMINCHO_TTF_FONT','ipamp.ttf');
111define('GOTHIC_TTF_FONT','ipag.ttf');
112define('PGOTHIC_TTF_FONT','ipagp.ttf');
113
114// Assume that Japanese text have been entered in EUC-JP encoding.
115// If this define is true then conversion from EUC-JP to UTF8 is done
116// automatically in the library using the mbstring module in PHP.
117define('ASSUME_EUCJP_ENCODING',false);
118
119//------------------------------------------------------------------------
120// Various JpGraph Settings. Adjust accordingly to your
121// preferences. Note that cache functionality is turned off by
122// default (Enable by setting USE_CACHE to true)
123//------------------------------------------------------------------------
124
125// Deafult locale for error messages.
126// This defaults to English = 'en'
127define('DEFAULT_ERR_LOCALE','en');
128
129// Deafult graphic format set to "auto" which will automatically
130// choose the best available format in the order png,gif,jpeg
131// (The supported format depends on what your PHP installation supports)
132define("DEFAULT_GFORMAT","auto");
133
134// Should the cache be used at all? By setting this to false no
135// files will be generated in the cache directory.
136// The difference from READ_CACHE being that setting READ_CACHE to
137// false will still create the image in the cache directory
138// just not use it. By setting USE_CACHE=false no files will even
139// be generated in the cache directory.
140define("USE_CACHE",false);
141
142// Should we try to find an image in the cache before generating it?
143// Set this define to false to bypass the reading of the cache and always
144// regenerate the image. Note that even if reading the cache is
145// disabled the cached will still be updated with the newly generated
146// image. Set also "USE_CACHE" below.
147define("READ_CACHE",true);
148
149// Determine if the error handler should be image based or purely
150// text based. Image based makes it easier since the script will
151// always return an image even in case of errors.
152define("USE_IMAGE_ERROR_HANDLER",true);
153
154// Should the library examin the global php_errmsg string and convert
155// any error in it to a graphical representation. This is handy for the
156// occasions when, for example, header files cannot be found and this results
157// in the graph not being created and just a "red-cross" image would be seen.
158// This should be turned off for a production site.
159define("CATCH_PHPERRMSG",true);
160
161// Determine if the library should also setup the default PHP
162// error handler to generate a graphic error mesage. This is useful
163// during development to be able to see the error message as an image
164// instead as a "red-cross" in a page where an image is expected.
165define("INSTALL_PHP_ERR_HANDLER",false);
166
167// If the color palette is full should JpGraph try to allocate
168// the closest match? If you plan on using background images or
169// gradient fills it might be a good idea to enable this.
170// If not you will otherwise get an error saying that the color palette is
171// exhausted. The drawback of using approximations is that the colors
172// might not be exactly what you specified.
173// Note1: This does only apply to paletted images, not truecolor
174// images since they don't have the limitations of maximum number
175// of colors.
176define("USE_APPROX_COLORS",true);
177
178// Should usage of deprecated functions and parameters give a fatal error?
179// (Useful to check if code is future proof.)
180define("ERR_DEPRECATED",true);
181
182// Should the time taken to generate each picture be branded to the lower
183// left in corner in each generated image? Useful for performace measurements
184// generating graphs
185define("BRAND_TIMING",false);
186
187// What format should be used for the timing string?
188define("BRAND_TIME_FORMAT","(%01.3fs)");
189
190//------------------------------------------------------------------------
191// The following constants should rarely have to be changed !
192//------------------------------------------------------------------------
193
194// What group should the cached file belong to
195// (Set to "" will give the default group for the "PHP-user")
196// Please note that the Apache user must be a member of the
197// specified group since otherwise it is impossible for Apache
198// to set the specified group.
199define("CACHE_FILE_GROUP","wwwadmin");
200
201// What permissions should the cached file have
202// (Set to "" will give the default persmissions for the "PHP-user")
203define("CACHE_FILE_MOD",0664);
204
205// Decide if we should use the bresenham circle algorithm or the
206// built in Arc(). Bresenham gives better visual apperance of circles
207// but is more CPU intensive and slower then the built in Arc() function
208// in GD. Turned off by default for speed
209define("USE_BRESENHAM",false);
210
211// Special file name to indicate that we only want to calc
212// the image map in the call to Graph::Stroke() used
213// internally from the GetHTMLCSIM() method.
214define("_CSIM_SPECIALFILE","_csim_special_");
215
216// HTTP GET argument that is used with image map
217// to indicate to the script to just generate the image
218// and not the full CSIM HTML page.
219define("_CSIM_DISPLAY","_jpg_csimd");
220
221// Special filename for Graph::Stroke(). If this filename is given
222// then the image will NOT be streamed to browser of file. Instead the
223// Stroke call will return the handler for the created GD image.
224define("_IMG_HANDLER","__handle");
225
226
227?>
Note: See TracBrowser for help on using the repository browser.