Ignore:
Timestamp:
Apr 13, 2019, 8:05:15 PM (5 years ago)
Author:
roby
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/grafici/jpg-config.inc.php

    r21 r265  
    11<?php
    22//=======================================================================
    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 $
     3// File:        JPG-CONFIG.INC
     4// Description: Configuration file for JpGraph library
     5// Created:     2004-03-27
     6// Ver:         $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
    77//
    8 // Copyright (c) Aditus Consulting. All rights reserved.
     8// Copyright (c) Asial Corporation. All rights reserved.
    99//========================================================================
    1010
    1111
    12 
    1312//------------------------------------------------------------------------
    14 // Directories for cache and font directory. 
     13// Directories for cache and font directory.
    1514//
    1615// CACHE_DIR:
     
    2928//   CACHE_DIR /tmp/jpgraph_cache/
    3029//   TTF_DIR   /usr/share/fonts/truetype/
    31 //   MBTTF_DIR /usr/share/fonts/ja/TrueType/
     30//   MBTTF_DIR /usr/share/fonts/truetype/
    3231//
    33 define("TTF_DIR","/usr/share/fonts/truetype/ttf-dejavu/");
    3432// WINDOWS:
    3533//   CACHE_DIR $SERVER_TEMP/jpgraph_cache/
     
    3836//
    3937//------------------------------------------------------------------------
    40 // define("CACHE_DIR","/tmp/jpgraph_cache/");
    41 // define("TTF_DIR","/usr/share/fonts/truetype/");
    42 // define("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
     38// define('CACHE_DIR','/tmp/jpgraph_cache/');
     39// define('TTF_DIR','/usr/share/fonts/TrueType/');
     40// define('MBTTF_DIR','/usr/share/fonts/TrueType/');
    4341
    4442//-------------------------------------------------------------------------
     
    4644// using the cache.
    4745// The directory must be the filesysystem name as seen by PHP
    48 // and the 'http' version must be the same directory but as 
    49 // seen by the HTTP server relative to the 'htdocs' ddirectory. 
     46// and the 'http' version must be the same directory but as
     47// seen by the HTTP server relative to the 'htdocs' ddirectory.
    5048// If a relative path is specified it is taken to be relative from where
    5149// the image script is executed.
    52 // Note: The default setting is to create a subdirectory in the 
     50// Note: The default setting is to create a subdirectory in the
    5351// directory from where the image script is executed and store all files
    5452// there. As ususal this directory must be writeable by the PHP process.
    55 define("CSIMCACHE_DIR","csimcache/");
    56 define("CSIMCACHE_HTTP_DIR","csimcache/");
    57 
    58 //------------------------------------------------------------------------
    59 // Defines for font setup
    60 //------------------------------------------------------------------------
    61 
    62 // Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
    63 // This is the TTF file being used when the font family is specified as
    64 // either FF_CHINESE or FF_BIG5
    65 define('CHINESE_TTF_FONT','bkai00mp.ttf');
    66 
    67 // Special unicode greek language support
    68 define("LANGUAGE_GREEK",false);
    69 
    70 // If you are setting this config to true the conversion of greek characters
    71 // will assume that the input text is windows 1251
    72 define("GREEK_FROM_WINDOWS",false);
    73 
    74 // Special unicode cyrillic language support
    75 define("LANGUAGE_CYRILLIC",false);
    76 
    77 // If you are setting this config to true the conversion
    78 // will assume that the input text is windows 1251, if
    79 // false it will assume koi8-r
    80 define("CYRILLIC_FROM_WINDOWS",false);
    81 
    82 // The following constant is used to auto-detect
    83 // whether cyrillic conversion is really necessary
    84 // if enabled. Just replace 'windows-1251' with a variable
    85 // containing the input character encoding string
    86 // of your application calling jpgraph.
    87 // A typical such string would be 'UTF-8' or 'utf-8'.
    88 // The comparison is case-insensitive.
    89 // If this charset is not a 'koi8-r' or 'windows-1251'
    90 // derivate then no conversion is done.
    91 //
    92 // This constant can be very important in multi-user
    93 // multi-language environments where a cyrillic conversion
    94 // could be needed for some cyrillic people
    95 // and resulting in just erraneous conversions
    96 // for not-cyrillic language based people.
    97 //
    98 // Example: In the free project management
    99 // software dotproject.net $locale_char_set is dynamically
    100 // set by the language environment the user has chosen.
    101 //
    102 // Usage: define('LANGUAGE_CHARSET', $locale_char_set);
    103 //
    104 // where $locale_char_set is a GLOBAL (string) variable
    105 // from the application including JpGraph.
    106 //
    107 define('LANGUAGE_CHARSET', null);
    108 
    109 // Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
    110 define('MINCHO_TTF_FONT','ipam.ttf');
    111 define('PMINCHO_TTF_FONT','ipamp.ttf');
    112 define('GOTHIC_TTF_FONT','ipag.ttf');
    113 define('PGOTHIC_TTF_FONT','ipagp.ttf');
    114 
    115 // Assume that Japanese text have been entered in EUC-JP encoding.
    116 // If this define is true then conversion from EUC-JP to UTF8 is done
    117 // automatically in the library using the mbstring module in PHP.
    118 define('ASSUME_EUCJP_ENCODING',false);
     53define('CSIMCACHE_DIR','csimcache/');
     54define('CSIMCACHE_HTTP_DIR','csimcache/');
    11955
    12056//------------------------------------------------------------------------
     
    12864define('DEFAULT_ERR_LOCALE','en');
    12965
    130 // Deafult graphic format set to "auto" which will automatically
     66// Deafult graphic format set to 'auto' which will automatically
    13167// choose the best available format in the order png,gif,jpeg
    13268// (The supported format depends on what your PHP installation supports)
    133 define("DEFAULT_GFORMAT","auto");
     69define('DEFAULT_GFORMAT','auto');
    13470
    13571// Should the cache be used at all? By setting this to false no
    136 // files will be generated in the cache directory. 
     72// files will be generated in the cache directory.
    13773// The difference from READ_CACHE being that setting READ_CACHE to
    13874// false will still create the image in the cache directory
    13975// just not use it. By setting USE_CACHE=false no files will even
    14076// be generated in the cache directory.
    141 define("USE_CACHE",false);
     77define('USE_CACHE',false);
    14278
    143 // Should we try to find an image in the cache before generating it? 
     79// Should we try to find an image in the cache before generating it?
    14480// Set this define to false to bypass the reading of the cache and always
    145 // regenerate the image. Note that even if reading the cache is 
     81// regenerate the image. Note that even if reading the cache is
    14682// disabled the cached will still be updated with the newly generated
    147 // image. Set also "USE_CACHE" below.
    148 define("READ_CACHE",true);
     83// image. Set also 'USE_CACHE' below.
     84define('READ_CACHE',true);
    14985
    15086// Determine if the error handler should be image based or purely
    15187// text based. Image based makes it easier since the script will
    15288// always return an image even in case of errors.
    153 define("USE_IMAGE_ERROR_HANDLER",true);
     89define('USE_IMAGE_ERROR_HANDLER',true);
    15490
    155 // Should the library examin the global php_errmsg string and convert
     91// Should the library examine the global php_errmsg string and convert
    15692// any error in it to a graphical representation. This is handy for the
    15793// occasions when, for example, header files cannot be found and this results
    158 // in the graph not being created and just a "red-cross" image would be seen.
     94// in the graph not being created and just a 'red-cross' image would be seen.
    15995// This should be turned off for a production site.
    160 define("CATCH_PHPERRMSG",true);
     96define('CATCH_PHPERRMSG',true);
    16197
    16298// Determine if the library should also setup the default PHP
    16399// error handler to generate a graphic error mesage. This is useful
    164100// during development to be able to see the error message as an image
    165 // instead as a "red-cross" in a page where an image is expected.
    166 define("INSTALL_PHP_ERR_HANDLER",false);
    167 
    168 // If the color palette is full should JpGraph try to allocate
    169 // the closest match? If you plan on using background images or
    170 // gradient fills it might be a good idea to enable this.
    171 // If not you will otherwise get an error saying that the color palette is
    172 // exhausted. The drawback of using approximations is that the colors
    173 // might not be exactly what you specified.
    174 // Note1: This does only apply to paletted images, not truecolor
    175 // images since they don't have the limitations of maximum number
    176 // of colors.
    177 define("USE_APPROX_COLORS",true);
     101// instead as a 'red-cross' in a page where an image is expected.
     102define('INSTALL_PHP_ERR_HANDLER',false);
    178103
    179104// Should usage of deprecated functions and parameters give a fatal error?
    180105// (Useful to check if code is future proof.)
    181 define("ERR_DEPRECATED",true);
     106define('ERR_DEPRECATED',true);
    182107
    183 // Should the time taken to generate each picture be branded to the lower
    184 // left in corner in each generated image? Useful for performace measurements
    185 // generating graphs
    186 define("BRAND_TIMING",false);
    187 
    188 // What format should be used for the timing string?
    189 define("BRAND_TIME_FORMAT","(%01.3fs)");
     108// The builtin GD function imagettfbbox() fuction which calculates the bounding box for
     109// text using TTF fonts is buggy. By setting this define to true the library
     110// uses its own compensation for this bug. However this will give a
     111// slightly different visual apparance than not using this compensation.
     112// Enabling this compensation will in general give text a bit more space to more
     113// truly reflect the actual bounding box which is a bit larger than what the
     114// GD function thinks.
     115define('USE_LIBRARY_IMAGETTFBBOX',true);
    190116
    191117//------------------------------------------------------------------------
     
    194120
    195121// What group should the cached file belong to
    196 // (Set to "" will give the default group for the "PHP-user")
     122// (Set to '' will give the default group for the 'PHP-user')
    197123// Please note that the Apache user must be a member of the
    198124// specified group since otherwise it is impossible for Apache
    199125// to set the specified group.
    200 define("CACHE_FILE_GROUP","wwwadmin");
     126define('CACHE_FILE_GROUP','www');
    201127
    202128// What permissions should the cached file have
    203 // (Set to "" will give the default persmissions for the "PHP-user")
    204 define("CACHE_FILE_MOD",0664);
     129// (Set to '' will give the default persmissions for the 'PHP-user')
     130define('CACHE_FILE_MOD',0664);
    205131
    206 // Decide if we should use the bresenham circle algorithm or the
    207 // built in Arc(). Bresenham gives better visual apperance of circles
    208 // but is more CPU intensive and slower then the built in Arc() function
    209 // in GD. Turned off by default for speed
    210 define("USE_BRESENHAM",false);
     132// Default theme class name
     133define('DEFAULT_THEME_CLASS', 'UniversalTheme');
    211134
    212 // Special file name to indicate that we only want to calc
    213 // the image map in the call to Graph::Stroke() used
    214 // internally from the GetHTMLCSIM() method.
    215 define("_CSIM_SPECIALFILE","_csim_special_");
    216 
    217 // HTTP GET argument that is used with image map
    218 // to indicate to the script to just generate the image
    219 // and not the full CSIM HTML page.
    220 define("_CSIM_DISPLAY","_jpg_csimd");
    221 
    222 // Special filename for Graph::Stroke(). If this filename is given
    223 // then the image will NOT be streamed to browser of file. Instead the
    224 // Stroke call will return the handler for the created GD image.
    225 define("_IMG_HANDLER","__handle");
    226 
     135define('SUPERSAMPLING', true);
     136define('SUPERSAMPLING_SCALE', 1);
    227137
    228138?>
Note: See TracChangeset for help on using the changeset viewer.