Source for file SvgGrapher.constants.php

Documentation is available at SvgGrapher.constants.php

  1. <?php
  2. /**
  3.  * $Source: /cvsroot/svggrapher/svggrapher/SvgGrapher.constants.php,v $
  4.  *
  5.  * Define the constants wich can be redefined.
  6.  *
  7.  * @version $Id: SvgGrapher.constants.php,v 1.7 2007/10/18 16:32:00 geelweb Exp $
  8.  * @author Guillaume L. <guillaume@geelweb.org>
  9.  * @copyright Copyright © 2006, Guillaume Luchet.
  10.  * @license http://opensource.org/licenses/bsd-license.php BSD License
  11.  * @package SvgGrapher
  12.  */
  13.  
  14.  
  15. // labels {{{
  16.  
  17. /**
  18.  * Default graph title
  19.  * @var string 
  20.  */
  21. if(!defined('DEFAULT_TITLE')) {
  22.     define('DEFAULT_TITLE''Svg Graph');
  23. }
  24.  
  25. /**
  26.  * define the default X label
  27.  * @var string 
  28.  */
  29. if(!defined('DEFAULT_LABEL_X')) {
  30.     define('DEFAULT_LABEL_X''Axe X');
  31. }
  32.  
  33. /**
  34.  * define the default Y label
  35.  * @var string 
  36.  */
  37. if(!defined('DEFAULT_LABEL_Y')) {
  38.     define('DEFAULT_LABEL_Y''Axe Y');
  39. }
  40.  
  41. // }}}
  42. // styles {{{
  43.  
  44. /**
  45.  * title string style
  46.  * @var string 
  47.  */
  48. if(!defined('TITLE_STYLE')) {
  49.     define('TITLE_STYLE''font-family: sans-serif; font-size: 18pt; ' .
  50.         'text-rendering: geometricPrecision; text-anchor: middle;');
  51. }
  52.  
  53. if(!defined('LEGEND_BOX_STYLE')) {
  54.     define('LEGEND_BOX_STYLE''shape-rendering: crispEdges; fill:none; stroke:#000000; stroke-width:1;');
  55. }
  56.  
  57. if(!defined('LEGEND_TEXT_STYLE')) {
  58.     define('LEGEND_TEXT_STYLE''font-family: sans-serif; font-size: 8pt; ' .
  59.         'text-rendering: geometricPrecision; text-anchor: start;');
  60. }
  61.  
  62. if(!defined('LABEL_X_STYLE')) {
  63.     define('LABEL_X_STYLE''font-family: sans-serif; font-size: 13px; ' .
  64.         'text-rendering:geometricPrecision; text-anchor: middle;');
  65. }
  66.  
  67. if(!defined('LABEL_Y_STYLE')) {
  68.     define('LABEL_Y_STYLE''font-family: sans-serif; font-size: 13px; ' .
  69.         'text-rendering:geometricPrecision; text-anchor: middle;');
  70. }
  71.  
  72. if(!defined('GRID_LINES_X_STYLE')) {
  73.     define('GRID_LINES_X_STYLE''shape-rendering:crispEdges; stroke:#ccc; stroke-width:1;');
  74. }
  75.  
  76. if(!defined('GRID_LINES_Y_STYLE')) {
  77.     define('GRID_LINES_Y_STYLE''shape-rendering:crispEdges; stroke:#ccc; stroke-width:1;');
  78. }
  79.  
  80. if(!defined('STEP_X_STYLE')) {
  81.     define('STEP_X_STYLE''shape-rendering:crispEdges; stroke:#000000; stroke-width:2;');
  82. }
  83.  
  84. if(!defined('STEP_Y_STYLE')) {
  85.     define('STEP_Y_STYLE''shape-rendering:crispEdges; stroke:#000000; stroke-width:2;');
  86. }
  87.  
  88. if(!defined('TAGS_X_STYLE')) {
  89.     define('TAGS_X_STYLE''font-family: sans-serif; font-size: 8pt;text-rendering: geometricPrecision;');
  90. }
  91.  
  92. if(!defined('TAGS_Y_STYLE')) {
  93.     define('TAGS_Y_STYLE''font-family: sans-serif; font-size: 8pt;text-rendering: geometricPrecision;');
  94. }
  95.  
  96. if(!defined('MINOR_STEP_X_STYLE')) {
  97.     define('MINOR_STEP_X_STYLE''shape-rendering:crispEdges; stroke:#000000; stroke-width:1;');
  98. }
  99.  
  100. if(!defined('MINOR_STEP_Y_STYLE')) {
  101.     define('MINOR_STEP_Y_STYLE''shape-rendering:crispEdges; stroke:#000000; stroke-width:1;');
  102. }
  103.  
  104. if(!defined('LIMITS_LINES_STYLE')) {
  105.     define('LIMITS_LINES_STYLE''shape-rendering:crispEdges; stroke-width:1;');
  106. }
  107.  
  108. if(!defined('BOX_STYLE')) {
  109.     define('BOX_STYLE''stroke:#000; stroke-width:1;shape-rendering: crispEdges; fill:none;');
  110. }
  111.  
  112. // }}}
  113. // format number {{{
  114.  
  115. /**
  116.  * Decimals separator
  117.  * @var string 
  118.  */
  119. if(!defined('DECIMAL_SEPARATOR')) {
  120.     define('DECIMAL_SEPARATOR'',');
  121. }
  122.  
  123. /**
  124.  * Thousands separator.
  125.  * @var string 
  126.  */
  127. if(!defined('THOUSANDS_SEPERATOR')) {
  128.     define('THOUSANDS_SEPERATOR''');
  129. }
  130.  
  131. /**
  132.  * Default number of decimal
  133.  * @var int 
  134.  */
  135. if(!defined('DECIMAL_NUMBER')) {
  136.     define('DECIMAL_NUMBER'2);
  137. }
  138.  
  139. // }}}
  140. // offsets {{{
  141.  
  142. /**
  143.  * define the number of pixels between each lines of the X grid
  144.  * @var int 
  145.  */
  146. if(!defined('GRID_LINES_X_DELTA')) {
  147.     define('GRID_LINES_X_DELTA'0);
  148. }
  149.  
  150. /**
  151.  * define the number of pixels between each lines of the Y grid
  152.  * @var int 
  153.  */
  154. if(!defined('GRID_LINES_Y_DELTA')) {
  155.     define('GRID_LINES_Y_DELTA'0);
  156. }
  157.  
  158. /**
  159.  * define the number of pixels between each minor steps of the Y grid
  160.  * @var int 
  161.  */
  162. if(!defined('MINOR_STEP_Y_DELTA')) {
  163.     define('MINOR_STEP_Y_DELTA'0);
  164. }
  165.  
  166. /**
  167.  * define the number of lines of the Y grid.
  168.  */
  169. if(!defined('GRID_LINES_Y')) {
  170.     define('GRID_LINES_Y'6);
  171. }
  172.  
  173. /**
  174.  * Padding of the first point from the abscisse.
  175.  * @var int 
  176.  */
  177. if(!defined('PLOT_OFFSET_X')) {
  178.     define('PLOT_OFFSET_X'0);
  179. }
  180.  
  181. /**
  182.  * Padding of the first point from the abscisse.
  183.  * @var int 
  184.  */
  185. if(!defined('PLOT_OFFSET_Y')) {
  186.     define('PLOT_OFFSET_Y'0);
  187. }
  188.  
  189. /**
  190.  * Space between graph and abscisse tags, 0 to 5% of the width limit to 15.
  191.  * @var int 
  192.  */
  193. if(!defined('NICER_LOOK_X_OFFSET')) {
  194.     define('NICER_LOOK_X_OFFSET'0);
  195. }
  196.  
  197. /**
  198.  * Space between graph and ordinate tags, 0 to 5% of the width limit to 15.
  199.  * @var int 
  200.  */
  201. if(!defined('NICER_LOOK_Y_OFFSET')) {
  202.     define('NICER_LOOK_Y_OFFSET'0);
  203. }
  204.  
  205. // }}}
  206.  
  207. /**
  208.  * Default screen resolution
  209.  * @var int 
  210.  */
  211. if(!defined('DEFAULT_DPI_RESOLUTION')) {
  212.     define('DEFAULT_DPI_RESOLUTION'96);
  213. }
  214.  
  215. /**
  216.  * true to generate auto id for the svg elements
  217.  * @var boolean 
  218.  */
  219. if(!defined('SET_AUTO_ID')) {
  220.     define('SET_AUTO_ID'true);
  221. }
  222.  
  223. /**
  224.  * TTF fonts path
  225.  * @var string 
  226.  */ 
  227. if(!defined('TTF_FONTS_PATH')) {
  228.     $dir '@DATA_DIR@' '/SvgGrapher/fonts/';
  229.     if(!is_dir($dir)) {
  230.         $dir SVGGRAPHER_CLASS_PATH '/fonts/';
  231.     }
  232.     define('TTF_FONTS_PATH'$dir);
  233. }
  234.  
  235. ?>

Documentation generated on Tue, 23 Oct 2007 11:32:09 +0200 by phpDocumentor 1.4.0