mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Updated jpgraph classes to latest version 3.0.2, this also removed depreceated warnings in php 5.3
This commit is contained in:
parent
ae635aeaa6
commit
51e565c191
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,14 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPG-CONFIG.INC
|
||||
// Description: Configuration file for JpGraph library
|
||||
// Created: 2004-03-27
|
||||
// Ver: $Id: jpg-config.inc.php 781 2006-10-08 08:07:47Z ljp $
|
||||
// File: JPG-CONFIG.INC
|
||||
// Description: Configuration file for JpGraph library
|
||||
// Created: 2004-03-27
|
||||
// Ver: $Id: jpg-config.inc.php 1749 2009-07-31 10:58:41Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Directories for cache and font directory.
|
||||
//
|
||||
@ -27,8 +26,8 @@
|
||||
//
|
||||
// UNIX:
|
||||
// CACHE_DIR /tmp/jpgraph_cache/
|
||||
// TTF_DIR /usr/X11R6/lib/X11/fonts/truetype/
|
||||
// MBTTF_DIR /usr/share/fonts/ja/TrueType/
|
||||
// TTF_DIR /usr/share/fonts/truetype/
|
||||
// MBTTF_DIR /usr/share/fonts/truetype/
|
||||
//
|
||||
// WINDOWS:
|
||||
// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
|
||||
@ -36,11 +35,11 @@
|
||||
// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
// DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
|
||||
// DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
|
||||
// define('CACHE_DIR','/tmp/jpgraph_cache/');
|
||||
// define('TTF_DIR','/usr/share/fonts/truetype/');
|
||||
// define('MBTTF_DIR','/usr/share/fonts/truetype/');
|
||||
DEFINE("TTF_DIR", $gl_root_path . "BitstreamVeraFonts/");
|
||||
|
||||
// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Cache directory specification for use with CSIM graphs that are
|
||||
@ -53,70 +52,8 @@ DEFINE("TTF_DIR", $gl_root_path . "BitstreamVeraFonts/");
|
||||
// Note: The default setting is to create a subdirectory in the
|
||||
// directory from where the image script is executed and store all files
|
||||
// there. As ususal this directory must be writeable by the PHP process.
|
||||
DEFINE("CSIMCACHE_DIR","csimcache/");
|
||||
DEFINE("CSIMCACHE_HTTP_DIR","csimcache/");
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Defines for font setup
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
|
||||
// This is the TTF file being used when the font family is specified as
|
||||
// either FF_CHINESE or FF_BIG5
|
||||
DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
|
||||
|
||||
// Special unicode greek language support
|
||||
DEFINE("LANGUAGE_GREEK",false);
|
||||
|
||||
// If you are setting this config to true the conversion of greek characters
|
||||
// will assume that the input text is windows 1251
|
||||
DEFINE("GREEK_FROM_WINDOWS",false);
|
||||
|
||||
// Special unicode cyrillic language support
|
||||
DEFINE("LANGUAGE_CYRILLIC",false);
|
||||
|
||||
// If you are setting this config to true the conversion
|
||||
// will assume that the input text is windows 1251, if
|
||||
// false it will assume koi8-r
|
||||
DEFINE("CYRILLIC_FROM_WINDOWS",false);
|
||||
|
||||
// The following constant is used to auto-detect
|
||||
// whether cyrillic conversion is really necessary
|
||||
// if enabled. Just replace 'windows-1251' with a variable
|
||||
// containing the input character encoding string
|
||||
// of your application calling jpgraph.
|
||||
// A typical such string would be 'UTF-8' or 'utf-8'.
|
||||
// The comparison is case-insensitive.
|
||||
// If this charset is not a 'koi8-r' or 'windows-1251'
|
||||
// derivate then no conversion is done.
|
||||
//
|
||||
// This constant can be very important in multi-user
|
||||
// multi-language environments where a cyrillic conversion
|
||||
// could be needed for some cyrillic people
|
||||
// and resulting in just erraneous conversions
|
||||
// for not-cyrillic language based people.
|
||||
//
|
||||
// Example: In the free project management
|
||||
// software dotproject.net $locale_char_set is dynamically
|
||||
// set by the language environment the user has chosen.
|
||||
//
|
||||
// Usage: DEFINE('LANGUAGE_CHARSET', $locale_char_set);
|
||||
//
|
||||
// where $locale_char_set is a GLOBAL (string) variable
|
||||
// from the application including JpGraph.
|
||||
//
|
||||
DEFINE('LANGUAGE_CHARSET', null);
|
||||
|
||||
// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
|
||||
DEFINE('MINCHO_TTF_FONT','ipam.ttf');
|
||||
DEFINE('PMINCHO_TTF_FONT','ipamp.ttf');
|
||||
DEFINE('GOTHIC_TTF_FONT','ipag.ttf');
|
||||
DEFINE('PGOTHIC_TTF_FONT','ipagp.ttf');
|
||||
|
||||
// Assume that Japanese text have been entered in EUC-JP encoding.
|
||||
// If this define is true then conversion from EUC-JP to UTF8 is done
|
||||
// automatically in the library using the mbstring module in PHP.
|
||||
DEFINE('ASSUME_EUCJP_ENCODING',false);
|
||||
define('CSIMCACHE_DIR','csimcache/');
|
||||
define('CSIMCACHE_HTTP_DIR','csimcache/');
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Various JpGraph Settings. Adjust accordingly to your
|
||||
@ -126,12 +63,12 @@ DEFINE('ASSUME_EUCJP_ENCODING',false);
|
||||
|
||||
// Deafult locale for error messages.
|
||||
// This defaults to English = 'en'
|
||||
DEFINE('DEFAULT_ERR_LOCALE','en');
|
||||
define('DEFAULT_ERR_LOCALE','en');
|
||||
|
||||
// Deafult graphic format set to "auto" which will automatically
|
||||
// Deafult graphic format set to 'auto' which will automatically
|
||||
// choose the best available format in the order png,gif,jpeg
|
||||
// (The supported format depends on what your PHP installation supports)
|
||||
DEFINE("DEFAULT_GFORMAT","auto");
|
||||
define('DEFAULT_GFORMAT','auto');
|
||||
|
||||
// Should the cache be used at all? By setting this to false no
|
||||
// files will be generated in the cache directory.
|
||||
@ -139,91 +76,57 @@ DEFINE("DEFAULT_GFORMAT","auto");
|
||||
// false will still create the image in the cache directory
|
||||
// just not use it. By setting USE_CACHE=false no files will even
|
||||
// be generated in the cache directory.
|
||||
DEFINE("USE_CACHE",false);
|
||||
define('USE_CACHE',false);
|
||||
|
||||
// Should we try to find an image in the cache before generating it?
|
||||
// Set this define to false to bypass the reading of the cache and always
|
||||
// regenerate the image. Note that even if reading the cache is
|
||||
// disabled the cached will still be updated with the newly generated
|
||||
// image. Set also "USE_CACHE" below.
|
||||
DEFINE("READ_CACHE",true);
|
||||
// image. Set also 'USE_CACHE' below.
|
||||
define('READ_CACHE',true);
|
||||
|
||||
// Determine if the error handler should be image based or purely
|
||||
// text based. Image based makes it easier since the script will
|
||||
// always return an image even in case of errors.
|
||||
DEFINE("USE_IMAGE_ERROR_HANDLER",true);
|
||||
define('USE_IMAGE_ERROR_HANDLER',true);
|
||||
|
||||
// Should the library examin the global php_errmsg string and convert
|
||||
// any error in it to a graphical representation. This is handy for the
|
||||
// occasions when, for example, header files cannot be found and this results
|
||||
// in the graph not being created and just a "red-cross" image would be seen.
|
||||
// in the graph not being created and just a 'red-cross' image would be seen.
|
||||
// This should be turned off for a production site.
|
||||
DEFINE("CATCH_PHPERRMSG",true);
|
||||
define('CATCH_PHPERRMSG',true);
|
||||
|
||||
// Determine if the library should also setup the default PHP
|
||||
// error handler to generate a graphic error mesage. This is useful
|
||||
// during development to be able to see the error message as an image
|
||||
// instead as a "red-cross" in a page where an image is expected.
|
||||
DEFINE("INSTALL_PHP_ERR_HANDLER",false);
|
||||
|
||||
// If the color palette is full should JpGraph try to allocate
|
||||
// the closest match? If you plan on using background images or
|
||||
// gradient fills it might be a good idea to enable this.
|
||||
// If not you will otherwise get an error saying that the color palette is
|
||||
// exhausted. The drawback of using approximations is that the colors
|
||||
// might not be exactly what you specified.
|
||||
// Note1: This does only apply to paletted images, not truecolor
|
||||
// images since they don't have the limitations of maximum number
|
||||
// of colors.
|
||||
DEFINE("USE_APPROX_COLORS",true);
|
||||
// instead as a 'red-cross' in a page where an image is expected.
|
||||
define('INSTALL_PHP_ERR_HANDLER',false);
|
||||
|
||||
// Should usage of deprecated functions and parameters give a fatal error?
|
||||
// (Useful to check if code is future proof.)
|
||||
DEFINE("ERR_DEPRECATED",true);
|
||||
|
||||
// Should the time taken to generate each picture be branded to the lower
|
||||
// left in corner in each generated image? Useful for performace measurements
|
||||
// generating graphs
|
||||
DEFINE("BRAND_TIMING",false);
|
||||
|
||||
// What format should be used for the timing string?
|
||||
DEFINE("BRAND_TIME_FORMAT","(%01.3fs)");
|
||||
define('ERR_DEPRECATED',true);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// The following constants should rarely have to be changed !
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// What group should the cached file belong to
|
||||
// (Set to "" will give the default group for the "PHP-user")
|
||||
// (Set to '' will give the default group for the 'PHP-user')
|
||||
// Please note that the Apache user must be a member of the
|
||||
// specified group since otherwise it is impossible for Apache
|
||||
// to set the specified group.
|
||||
DEFINE("CACHE_FILE_GROUP","wwwadmin");
|
||||
define('CACHE_FILE_GROUP','wwwadmin');
|
||||
|
||||
// What permissions should the cached file have
|
||||
// (Set to "" will give the default persmissions for the "PHP-user")
|
||||
DEFINE("CACHE_FILE_MOD",0664);
|
||||
// (Set to '' will give the default persmissions for the 'PHP-user')
|
||||
define('CACHE_FILE_MOD',0664);
|
||||
|
||||
// Decide if we should use the bresenham circle algorithm or the
|
||||
// built in Arc(). Bresenham gives better visual apperance of circles
|
||||
// but is more CPU intensive and slower then the built in Arc() function
|
||||
// in GD. Turned off by default for speed
|
||||
DEFINE("USE_BRESENHAM",false);
|
||||
|
||||
// Special file name to indicate that we only want to calc
|
||||
// the image map in the call to Graph::Stroke() used
|
||||
// internally from the GetHTMLCSIM() method.
|
||||
DEFINE("_CSIM_SPECIALFILE","_csim_special_");
|
||||
|
||||
// HTTP GET argument that is used with image map
|
||||
// to indicate to the script to just generate the image
|
||||
// and not the full CSIM HTML page.
|
||||
DEFINE("_CSIM_DISPLAY","_jpg_csimd");
|
||||
|
||||
// Special filename for Graph::Stroke(). If this filename is given
|
||||
// then the image will NOT be streamed to browser of file. Instead the
|
||||
// Stroke call will return the handler for the created GD image.
|
||||
DEFINE("_IMG_HANDLER","__handle");
|
||||
define('USE_BRESENHAM',false);
|
||||
|
||||
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,88 +1,95 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ERRHANDLER.PHP
|
||||
// Description: Error handler class together with handling of localized
|
||||
// error messages. All localized error messages are stored
|
||||
// in a separate file under the "lang/" subdirectory.
|
||||
// Created: 2006-09-24
|
||||
// Ver: $Id: jpgraph_errhandler.inc.php 973 2008-03-09 15:29:44Z ljp $
|
||||
// File: JPGRAPH_ERRHANDLER.PHP
|
||||
// Description: Error handler class together with handling of localized
|
||||
// error messages. All localized error messages are stored
|
||||
// in a separate file under the "lang/" subdirectory.
|
||||
// Created: 2006-09-24
|
||||
// Ver: $Id: jpgraph_errhandler.inc.php 1619 2009-07-16 19:15:36Z ljp $
|
||||
//
|
||||
// Copyright 2006 (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
if( !defined('DEFAULT_ERR_LOCALE') ) {
|
||||
define('DEFAULT_ERR_LOCALE','en');
|
||||
}
|
||||
|
||||
if( !defined('USE_IMAGE_ERROR_HANDLER') ) {
|
||||
define('USE_IMAGE_ERROR_HANDLER',true);
|
||||
}
|
||||
|
||||
GLOBAL $__jpg_err_locale ;
|
||||
$__jpg_err_locale = DEFAULT_ERR_LOCALE;
|
||||
|
||||
class ErrMsgText {
|
||||
private $lt=NULL;
|
||||
function ErrMsgText() {
|
||||
GLOBAL $__jpg_err_locale;
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
function __construct() {
|
||||
GLOBAL $__jpg_err_locale;
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
|
||||
// If the chosen locale doesn't exist try english
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
$__jpg_err_locale = 'en';
|
||||
}
|
||||
// If the chosen locale doesn't exist try english
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
$__jpg_err_locale = 'en';
|
||||
}
|
||||
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
die('Chosen locale file ("'.$file.'") for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.');
|
||||
}
|
||||
require($file);
|
||||
$this->lt = $_jpg_messages;
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
die('Chosen locale file ("'.$file.'") for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.');
|
||||
}
|
||||
require($file);
|
||||
$this->lt = $_jpg_messages;
|
||||
}
|
||||
|
||||
function Get($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
GLOBAL $__jpg_err_locale;
|
||||
if( !isset($this->lt[$errnbr]) ) {
|
||||
return 'Internal error: The specified error message ('.$errnbr.') does not exist in the chosen locale ('.$__jpg_err_locale.')';
|
||||
}
|
||||
$ea = $this->lt[$errnbr];
|
||||
$j=0;
|
||||
if( $a1 !== null ) {
|
||||
$argv[$j++] = $a1;
|
||||
if( $a2 !== null ) {
|
||||
$argv[$j++] = $a2;
|
||||
if( $a3 !== null ) {
|
||||
$argv[$j++] = $a3;
|
||||
if( $a4 !== null ) {
|
||||
$argv[$j++] = $a4;
|
||||
if( $a5 !== null ) {
|
||||
$argv[$j++] = $a5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$numargs = $j;
|
||||
if( $ea[1] != $numargs ) {
|
||||
// Error message argument count do not match.
|
||||
// Just return the error message without arguments.
|
||||
return $ea[0];
|
||||
}
|
||||
switch( $numargs ) {
|
||||
case 1:
|
||||
$msg = sprintf($ea[0],$argv[0]);
|
||||
break;
|
||||
case 2:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1]);
|
||||
break;
|
||||
case 3:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2]);
|
||||
break;
|
||||
case 4:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3]);
|
||||
break;
|
||||
case 5:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3],$argv[4]);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
$msg = sprintf($ea[0]);
|
||||
break;
|
||||
}
|
||||
return $msg;
|
||||
GLOBAL $__jpg_err_locale;
|
||||
if( !isset($this->lt[$errnbr]) ) {
|
||||
return 'Internal error: The specified error message ('.$errnbr.') does not exist in the chosen locale ('.$__jpg_err_locale.')';
|
||||
}
|
||||
$ea = $this->lt[$errnbr];
|
||||
$j=0;
|
||||
if( $a1 !== null ) {
|
||||
$argv[$j++] = $a1;
|
||||
if( $a2 !== null ) {
|
||||
$argv[$j++] = $a2;
|
||||
if( $a3 !== null ) {
|
||||
$argv[$j++] = $a3;
|
||||
if( $a4 !== null ) {
|
||||
$argv[$j++] = $a4;
|
||||
if( $a5 !== null ) {
|
||||
$argv[$j++] = $a5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$numargs = $j;
|
||||
if( $ea[1] != $numargs ) {
|
||||
// Error message argument count do not match.
|
||||
// Just return the error message without arguments.
|
||||
return $ea[0];
|
||||
}
|
||||
switch( $numargs ) {
|
||||
case 1:
|
||||
$msg = sprintf($ea[0],$argv[0]);
|
||||
break;
|
||||
case 2:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1]);
|
||||
break;
|
||||
case 3:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2]);
|
||||
break;
|
||||
case 4:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3]);
|
||||
break;
|
||||
case 5:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3],$argv[4]);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
$msg = sprintf($ea[0]);
|
||||
break;
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,21 +99,87 @@ class ErrMsgText {
|
||||
// in all methods.
|
||||
//
|
||||
class JpGraphError {
|
||||
private static $__jpg_err;
|
||||
public static function Install($aErrObject) {
|
||||
self::$__jpg_err = new $aErrObject;
|
||||
}
|
||||
private static $__iImgFlg = true;
|
||||
private static $__iLogFile = '';
|
||||
private static $__iTitle = 'JpGraph Error: ';
|
||||
public static function Raise($aMsg,$aHalt=true){
|
||||
self::$__jpg_err->Raise($aMsg,$aHalt);
|
||||
throw new JpGraphException($aMsg);
|
||||
}
|
||||
public static function SetErrLocale($aLoc) {
|
||||
GLOBAL $__jpg_err_locale ;
|
||||
$__jpg_err_locale = $aLoc;
|
||||
GLOBAL $__jpg_err_locale ;
|
||||
$__jpg_err_locale = $aLoc;
|
||||
}
|
||||
public static function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
$t = new ErrMsgText();
|
||||
$msg = $t->Get($errnbr,$a1,$a2,$a3,$a4,$a5);
|
||||
self::$__jpg_err->Raise($msg);
|
||||
throw new JpGraphExceptionL($errnbr,$a1,$a2,$a3,$a4,$a5);
|
||||
}
|
||||
public static function SetImageFlag($aFlg=true) {
|
||||
self::$__iImgFlg = $aFlg;
|
||||
}
|
||||
public static function GetImageFlag() {
|
||||
return self::$__iImgFlg;
|
||||
}
|
||||
public static function SetLogFile($aFile) {
|
||||
self::$__iLogFile = $aFile;
|
||||
}
|
||||
public static function GetLogFile() {
|
||||
return self::$__iLogFile;
|
||||
}
|
||||
public static function SetTitle($aTitle) {
|
||||
self::$__iTitle = $aTitle;
|
||||
}
|
||||
public static function GetTitle() {
|
||||
return self::$__iTitle;
|
||||
}
|
||||
}
|
||||
|
||||
// Setup the default handler
|
||||
global $__jpg_OldHandler;
|
||||
$__jpg_OldHandler = set_exception_handler(array('JpGraphException','defaultHandler'));
|
||||
|
||||
class JpGraphException extends Exception {
|
||||
// Redefine the exception so message isn't optional
|
||||
public function __construct($message, $code = 0) {
|
||||
// make sure everything is assigned properly
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
// custom string representation of object
|
||||
public function _toString() {
|
||||
return __CLASS__ . ": [{$this->code}]: {$this->message} at " . basename($this->getFile()) . ":" . $this->getLine() . "\n" . $this->getTraceAsString() . "\n";
|
||||
}
|
||||
// custom representation of error as an image
|
||||
public function Stroke() {
|
||||
if( JpGraphError::GetImageFlag() ) {
|
||||
$errobj = new JpGraphErrObjectImg();
|
||||
$errobj->SetTitle(JpGraphError::GetTitle());
|
||||
}
|
||||
else {
|
||||
$errobj = new JpGraphErrObject();
|
||||
$errobj->SetTitle(JpGraphError::GetTitle());
|
||||
$errobj->SetStrokeDest(JpGraphError::GetLogFile());
|
||||
}
|
||||
$errobj->Raise($this->getMessage());
|
||||
}
|
||||
static public function defaultHandler(Exception $exception) {
|
||||
global $__jpg_OldHandler;
|
||||
if( $exception instanceof JpGraphException ) {
|
||||
$exception->Stroke();
|
||||
}
|
||||
else {
|
||||
// Restore old handler
|
||||
if( $__jpg_OldHandler !== NULL ) {
|
||||
set_exception_handler($__jpg_OldHandler);
|
||||
}
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class JpGraphExceptionL extends JpGraphException {
|
||||
// Redefine the exception so message isn't optional
|
||||
public function __construct($errcode,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
// make sure everything is assigned properly
|
||||
$errtxt = new ErrMsgText();
|
||||
parent::__construct($errtxt->Get($errcode,$a1,$a2,$a3,$a4,$a5), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,37 +192,50 @@ class JpGraphError {
|
||||
//=============================================================
|
||||
class JpGraphErrObject {
|
||||
|
||||
protected $iTitle = "JpGraph Error";
|
||||
protected $iTitle = "JpGraph error: ";
|
||||
protected $iDest = false;
|
||||
|
||||
|
||||
function JpGraphErrObject() {
|
||||
// Empty. Reserved for future use
|
||||
function __construct() {
|
||||
// Empty. Reserved for future use
|
||||
}
|
||||
|
||||
function SetTitle($aTitle) {
|
||||
$this->iTitle = $aTitle;
|
||||
$this->iTitle = $aTitle;
|
||||
}
|
||||
|
||||
function SetStrokeDest($aDest) {
|
||||
$this->iDest = $aDest;
|
||||
$this->iDest = $aDest;
|
||||
}
|
||||
|
||||
// If aHalt is true then execution can't continue. Typical used for fatal errors
|
||||
function Raise($aMsg,$aHalt=true) {
|
||||
$aMsg = $this->iTitle.' '.$aMsg;
|
||||
if ($this->iDest) {
|
||||
$f = @fopen($this->iDest,'a');
|
||||
if( $f ) {
|
||||
@fwrite($f,$aMsg);
|
||||
@fclose($f);
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo $aMsg;
|
||||
}
|
||||
if( $aHalt )
|
||||
die();
|
||||
function Raise($aMsg,$aHalt=false) {
|
||||
if( $this->iDest != '' ) {
|
||||
if( $this->iDest == 'syslog' ) {
|
||||
error_log($this->iTitle.$aMsg);
|
||||
}
|
||||
else {
|
||||
$str = '['.date('r').'] '.$this->iTitle.$aMsg."\n";
|
||||
$f = @fopen($this->iDest,'a');
|
||||
if( $f ) {
|
||||
@fwrite($f,$str);
|
||||
@fclose($f);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$aMsg = $this->iTitle.$aMsg;
|
||||
// Check SAPI and if we are called from the command line
|
||||
// send the error to STDERR instead
|
||||
if( PHP_SAPI == 'cli' ) {
|
||||
fwrite(STDERR,$aMsg);
|
||||
}
|
||||
else {
|
||||
echo $aMsg;
|
||||
}
|
||||
}
|
||||
if( $aHalt )
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,121 +244,124 @@ class JpGraphErrObject {
|
||||
//==============================================================
|
||||
class JpGraphErrObjectImg extends JpGraphErrObject {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
// Empty. Reserved for future use
|
||||
}
|
||||
|
||||
function Raise($aMsg,$aHalt=true) {
|
||||
$img_iconerror =
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV'.
|
||||
'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'.
|
||||
'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpY'.
|
||||
'iYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'.
|
||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||
'IAAAsSAdLdfvwAAAAHdElNRQfTBgISOCqusfs5AAABLUlEQVR4'.
|
||||
'2tWV3XKCMBBGWfkranCIVClKLd/7P2Q3QsgCxjDTq+6FE2cPH+'.
|
||||
'xJ0Ogn2lQbsT+Wrs+buAZAV4W5T6Bs0YXBBwpKgEuIu+JERAX6'.
|
||||
'wM2rHjmDdEITmsQEEmWADgZm6rAjhXsoMGY9B/NZBwJzBvn+e3'.
|
||||
'wHntCAJdGu9SviwIwoZVDxPB9+Rc0TSEbQr0j3SA1gwdSn6Db0'.
|
||||
'6Tm1KfV6yzWGQO7zdpvyKLKBDmRFjzeB3LYgK7r6A/noDAfjtS'.
|
||||
'IXaIzbJSv6WgUebTMV4EoRB8a2mQiQjgtF91HdKDKZ1gtFtQjk'.
|
||||
'YcWaR5OKOhkYt+ZsTFdJRfPAApOpQYJTNHvCRSJR6SJngQadfc'.
|
||||
'vd69OLMddVOPCGVnmrFD8bVYd3JXfxXPtLR/+mtv59/ALWiiMx'.
|
||||
'qL72fwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
if( function_exists("imagetypes") )
|
||||
$supported = imagetypes();
|
||||
else
|
||||
$supported = 0;
|
||||
|
||||
if( !function_exists('imagecreatefromstring') )
|
||||
$supported = 0;
|
||||
|
||||
if( ob_get_length() || headers_sent() || !($supported & IMG_PNG) ) {
|
||||
// Special case for headers already sent or that the installation doesn't support
|
||||
// the PNG format (which the error icon is encoded in).
|
||||
// Dont return an image since it can't be displayed
|
||||
die($this->iTitle.' '.$aMsg);
|
||||
}
|
||||
|
||||
$aMsg = wordwrap($aMsg,55);
|
||||
$lines = substr_count($aMsg,"\n");
|
||||
|
||||
// Create the error icon GD
|
||||
$erricon = Image::CreateFromString(base64_decode($img_iconerror));
|
||||
|
||||
// Create an image that contains the error text.
|
||||
$w=400;
|
||||
$h=100 + 15*max(0,$lines-3);
|
||||
|
||||
$img = new Image($w,$h);
|
||||
$img_iconerror =
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV'.
|
||||
'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'.
|
||||
'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpY'.
|
||||
'iYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'.
|
||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||
'IAAAsSAdLdfvwAAAAHdElNRQfTBgISOCqusfs5AAABLUlEQVR4'.
|
||||
'2tWV3XKCMBBGWfkranCIVClKLd/7P2Q3QsgCxjDTq+6FE2cPH+'.
|
||||
'xJ0Ogn2lQbsT+Wrs+buAZAV4W5T6Bs0YXBBwpKgEuIu+JERAX6'.
|
||||
'wM2rHjmDdEITmsQEEmWADgZm6rAjhXsoMGY9B/NZBwJzBvn+e3'.
|
||||
'wHntCAJdGu9SviwIwoZVDxPB9+Rc0TSEbQr0j3SA1gwdSn6Db0'.
|
||||
'6Tm1KfV6yzWGQO7zdpvyKLKBDmRFjzeB3LYgK7r6A/noDAfjtS'.
|
||||
'IXaIzbJSv6WgUebTMV4EoRB8a2mQiQjgtF91HdKDKZ1gtFtQjk'.
|
||||
'YcWaR5OKOhkYt+ZsTFdJRfPAApOpQYJTNHvCRSJR6SJngQadfc'.
|
||||
'vd69OLMddVOPCGVnmrFD8bVYd3JXfxXPtLR/+mtv59/ALWiiMx'.
|
||||
'qL72fwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
|
||||
// Drop shadow
|
||||
$img->SetColor("gray");
|
||||
$img->FilledRectangle(5,5,$w-1,$h-1,10);
|
||||
$img->SetColor("gray:0.7");
|
||||
$img->FilledRectangle(5,5,$w-3,$h-3,10);
|
||||
if( function_exists("imagetypes") ) {
|
||||
$supported = imagetypes();
|
||||
} else {
|
||||
$supported = 0;
|
||||
}
|
||||
|
||||
// Window background
|
||||
$img->SetColor("lightblue");
|
||||
$img->FilledRectangle(1,1,$w-5,$h-5);
|
||||
$img->CopyCanvasH($img->img,$erricon,5,30,0,0,40,40);
|
||||
if( !function_exists('imagecreatefromstring') ) {
|
||||
$supported = 0;
|
||||
}
|
||||
|
||||
// Window border
|
||||
$img->SetColor("black");
|
||||
$img->Rectangle(1,1,$w-5,$h-5);
|
||||
$img->Rectangle(0,0,$w-4,$h-4);
|
||||
if( ob_get_length() || headers_sent() || !($supported & IMG_PNG) ) {
|
||||
// Special case for headers already sent or that the installation doesn't support
|
||||
// the PNG format (which the error icon is encoded in).
|
||||
// Dont return an image since it can't be displayed
|
||||
die($this->iTitle.' '.$aMsg);
|
||||
}
|
||||
|
||||
// Window top row
|
||||
$img->SetColor("darkred");
|
||||
for($y=3; $y < 18; $y += 2 )
|
||||
$img->Line(1,$y,$w-6,$y);
|
||||
$aMsg = wordwrap($aMsg,55);
|
||||
$lines = substr_count($aMsg,"\n");
|
||||
|
||||
// "White shadow"
|
||||
$img->SetColor("white");
|
||||
// Create the error icon GD
|
||||
$erricon = Image::CreateFromString(base64_decode($img_iconerror));
|
||||
|
||||
// Left window edge
|
||||
$img->Line(2,2,2,$h-5);
|
||||
$img->Line(2,2,$w-6,2);
|
||||
// Create an image that contains the error text.
|
||||
$w=400;
|
||||
$h=100 + 15*max(0,$lines-3);
|
||||
|
||||
// "Gray button shadow"
|
||||
$img->SetColor("darkgray");
|
||||
$img = new Image($w,$h);
|
||||
|
||||
// Gray window shadow
|
||||
$img->Line(2,$h-6,$w-5,$h-6);
|
||||
$img->Line(3,$h-7,$w-5,$h-7);
|
||||
|
||||
// Window title
|
||||
$m = floor($w/2-5);
|
||||
$l = 100;
|
||||
$img->SetColor("lightgray:1.3");
|
||||
$img->FilledRectangle($m-$l,2,$m+$l,16);
|
||||
// Drop shadow
|
||||
$img->SetColor("gray");
|
||||
$img->FilledRectangle(5,5,$w-1,$h-1,10);
|
||||
$img->SetColor("gray:0.7");
|
||||
$img->FilledRectangle(5,5,$w-3,$h-3,10);
|
||||
|
||||
// Stroke text
|
||||
$img->SetColor("darkred");
|
||||
$img->SetFont(FF_FONT2,FS_BOLD);
|
||||
$img->StrokeText($m-50,15,$this->iTitle);
|
||||
$img->SetColor("black");
|
||||
$img->SetFont(FF_FONT1,FS_NORMAL);
|
||||
$txt = new Text($aMsg,52,25);
|
||||
$txt->Align("left","top");
|
||||
$txt->Stroke($img);
|
||||
if ($this->iDest) {
|
||||
$img->Stream($this->iDest);
|
||||
} else {
|
||||
$img->Headers();
|
||||
$img->Stream();
|
||||
}
|
||||
if( $aHalt )
|
||||
die();
|
||||
// Window background
|
||||
$img->SetColor("lightblue");
|
||||
$img->FilledRectangle(1,1,$w-5,$h-5);
|
||||
$img->CopyCanvasH($img->img,$erricon,5,30,0,0,40,40);
|
||||
|
||||
// Window border
|
||||
$img->SetColor("black");
|
||||
$img->Rectangle(1,1,$w-5,$h-5);
|
||||
$img->Rectangle(0,0,$w-4,$h-4);
|
||||
|
||||
// Window top row
|
||||
$img->SetColor("darkred");
|
||||
for($y=3; $y < 18; $y += 2 )
|
||||
$img->Line(1,$y,$w-6,$y);
|
||||
|
||||
// "White shadow"
|
||||
$img->SetColor("white");
|
||||
|
||||
// Left window edge
|
||||
$img->Line(2,2,2,$h-5);
|
||||
$img->Line(2,2,$w-6,2);
|
||||
|
||||
// "Gray button shadow"
|
||||
$img->SetColor("darkgray");
|
||||
|
||||
// Gray window shadow
|
||||
$img->Line(2,$h-6,$w-5,$h-6);
|
||||
$img->Line(3,$h-7,$w-5,$h-7);
|
||||
|
||||
// Window title
|
||||
$m = floor($w/2-5);
|
||||
$l = 100;
|
||||
$img->SetColor("lightgray:1.3");
|
||||
$img->FilledRectangle($m-$l,2,$m+$l,16);
|
||||
|
||||
// Stroke text
|
||||
$img->SetColor("darkred");
|
||||
$img->SetFont(FF_FONT2,FS_BOLD);
|
||||
$img->StrokeText($m-50,15,$this->iTitle);
|
||||
$img->SetColor("black");
|
||||
$img->SetFont(FF_FONT1,FS_NORMAL);
|
||||
$txt = new Text($aMsg,52,25);
|
||||
$txt->Align("left","top");
|
||||
$txt->Stroke($img);
|
||||
if ($this->iDest) {
|
||||
$img->Stream($this->iDest);
|
||||
} else {
|
||||
$img->Headers();
|
||||
$img->Stream();
|
||||
}
|
||||
if( $aHalt )
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Install the default error handler
|
||||
if( USE_IMAGE_ERROR_HANDLER ) {
|
||||
JpGraphError::Install("JpGraphErrObjectImg");
|
||||
}
|
||||
else {
|
||||
JpGraphError::Install("JpGraphErrObject");
|
||||
}
|
||||
|
||||
|
||||
if( ! USE_IMAGE_ERROR_HANDLER ) {
|
||||
JpGraphError::SetImageFlag(false);
|
||||
}
|
||||
?>
|
||||
|
420
src/classes/jpgraph/jpgraph_legend.inc.php
Normal file
420
src/classes/jpgraph/jpgraph_legend.inc.php
Normal file
@ -0,0 +1,420 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_LEGEND.INC.PHP
|
||||
// Description: Class to handle the legend box in the graph that gives
|
||||
// names on the data series. The number of rows and columns
|
||||
// in the legend are user specifyable.
|
||||
// Created: 2001-01-08 (Refactored to separate file 2008-08-01)
|
||||
// Ver: $Id: jpgraph_legend.inc.php 1739 2009-07-30 21:21:15Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
DEFINE('_DEFAULT_LPM_SIZE',8); // Default Legend Plot Mark size
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS Legend
|
||||
// Description: Responsible for drawing the box containing
|
||||
// all the legend text for the graph
|
||||
//===================================================
|
||||
|
||||
class Legend {
|
||||
public $txtcol=array();
|
||||
private $color=array(0,0,0); // Default fram color
|
||||
private $fill_color=array(235,235,235); // Default fill color
|
||||
private $shadow=true; // Shadow around legend "box"
|
||||
private $shadow_color='darkgray@0.5';
|
||||
private $mark_abs_hsize=_DEFAULT_LPM_SIZE,$mark_abs_vsize=_DEFAULT_LPM_SIZE;
|
||||
private $xmargin=10,$ymargin=6,$shadow_width=2;
|
||||
private $xlmargin=4, $ylmargin='';
|
||||
private $xpos=0.05, $ypos=0.15, $xabspos=-1, $yabspos=-1;
|
||||
private $halign="right", $valign="top";
|
||||
private $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=12;
|
||||
private $font_color='black';
|
||||
private $hide=false,$layout_n=1;
|
||||
private $weight=1,$frameweight=1;
|
||||
private $csimareas='';
|
||||
private $reverse = false ;
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct() {
|
||||
// Empty
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Hide($aHide=true) {
|
||||
$this->hide=$aHide;
|
||||
}
|
||||
|
||||
function SetHColMargin($aXMarg) {
|
||||
$this->xmargin = $aXMarg;
|
||||
}
|
||||
|
||||
function SetVColMargin($aSpacing) {
|
||||
$this->ymargin = $aSpacing ;
|
||||
}
|
||||
|
||||
function SetLeftMargin($aXMarg) {
|
||||
$this->xlmargin = $aXMarg;
|
||||
}
|
||||
|
||||
// Synonym
|
||||
function SetLineSpacing($aSpacing) {
|
||||
$this->ymargin = $aSpacing ;
|
||||
}
|
||||
|
||||
function SetShadow($aShow='gray',$aWidth=2) {
|
||||
if( is_string($aShow) ) {
|
||||
$this->shadow_color = $aShow;
|
||||
$this->shadow=true;
|
||||
}
|
||||
else
|
||||
$this->shadow=$aShow;
|
||||
$this->shadow_width=$aWidth;
|
||||
}
|
||||
|
||||
function SetMarkAbsSize($aSize) {
|
||||
$this->mark_abs_vsize = $aSize ;
|
||||
$this->mark_abs_hsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetMarkAbsVSize($aSize) {
|
||||
$this->mark_abs_vsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetMarkAbsHSize($aSize) {
|
||||
$this->mark_abs_hsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetLineWeight($aWeight) {
|
||||
$this->weight = $aWeight;
|
||||
}
|
||||
|
||||
function SetFrameWeight($aWeight) {
|
||||
$this->frameweight = $aWeight;
|
||||
}
|
||||
|
||||
function SetLayout($aDirection=LEGEND_VERT) {
|
||||
$this->layout_n = $aDirection==LEGEND_VERT ? 1 : 99 ;
|
||||
}
|
||||
|
||||
function SetColumns($aCols) {
|
||||
$this->layout_n = $aCols ;
|
||||
}
|
||||
|
||||
function SetReverse($f=true) {
|
||||
$this->reverse = $f ;
|
||||
}
|
||||
|
||||
// Set color on frame around box
|
||||
function SetColor($aFontColor,$aColor='black') {
|
||||
$this->font_color=$aFontColor;
|
||||
$this->color=$aColor;
|
||||
}
|
||||
|
||||
function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) {
|
||||
$this->font_family = $aFamily;
|
||||
$this->font_style = $aStyle;
|
||||
$this->font_size = $aSize;
|
||||
}
|
||||
|
||||
function SetPos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
$this->Pos($aX,$aY,$aHAlign,$aVAlign);
|
||||
}
|
||||
|
||||
function SetAbsPos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
$this->xabspos=$aX;
|
||||
$this->yabspos=$aY;
|
||||
$this->halign=$aHAlign;
|
||||
$this->valign=$aVAlign;
|
||||
}
|
||||
|
||||
|
||||
function Pos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
if( !($aX<1 && $aY<1) )
|
||||
JpGraphError::RaiseL(25120);//(" Position for legend must be given as percentage in range 0-1");
|
||||
$this->xpos=$aX;
|
||||
$this->ypos=$aY;
|
||||
$this->halign=$aHAlign;
|
||||
$this->valign=$aVAlign;
|
||||
}
|
||||
|
||||
function SetFillColor($aColor) {
|
||||
$this->fill_color=$aColor;
|
||||
}
|
||||
|
||||
function Clear() {
|
||||
$this->txtcol = array();
|
||||
}
|
||||
|
||||
function Add($aTxt,$aColor,$aPlotmark='',$aLinestyle=0,$csimtarget='',$csimalt='',$csimwintarget='') {
|
||||
$this->txtcol[]=array($aTxt,$aColor,$aPlotmark,$aLinestyle,$csimtarget,$csimalt,$csimwintarget);
|
||||
}
|
||||
|
||||
function GetCSIMAreas() {
|
||||
return $this->csimareas;
|
||||
}
|
||||
|
||||
function Stroke(&$aImg) {
|
||||
// Constant
|
||||
$fillBoxFrameWeight=1;
|
||||
|
||||
if( $this->hide ) return;
|
||||
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
|
||||
if( $this->reverse ) {
|
||||
$this->txtcol = array_reverse($this->txtcol);
|
||||
}
|
||||
|
||||
$n=count($this->txtcol);
|
||||
if( $n == 0 ) return;
|
||||
|
||||
// Find out the max width and height of each column to be able
|
||||
// to size the legend box.
|
||||
$numcolumns = ($n > $this->layout_n ? $this->layout_n : $n);
|
||||
for( $i=0; $i < $numcolumns; ++$i ) {
|
||||
$colwidth[$i] = $aImg->GetTextWidth($this->txtcol[$i][0]) +
|
||||
2*$this->xmargin + 2*$this->mark_abs_hsize;
|
||||
$colheight[$i] = 0;
|
||||
|
||||
}
|
||||
|
||||
// Find our maximum height in each row
|
||||
$rows = 0 ; $rowheight[0] = 0;
|
||||
for( $i=0; $i < $n; ++$i ) {
|
||||
$h = max($this->mark_abs_vsize,$aImg->GetTextHeight($this->txtcol[$i][0]))+$this->ymargin;
|
||||
// Makes sure we always have a minimum of 1/4 (1/2 on each side) of the mark as space
|
||||
// between two vertical legend entries
|
||||
$h = round(max($h,$this->mark_abs_vsize+$this->mark_abs_vsize/2));
|
||||
//echo "Textheight:".$aImg->GetTextHeight($this->txtcol[$i][0]).', ';
|
||||
//echo "h=$h ({$this->mark_abs_vsize},{$this->ymargin})<br>";
|
||||
if( $i % $numcolumns == 0 ) {
|
||||
$rows++;
|
||||
$rowheight[$rows-1] = 0;
|
||||
}
|
||||
$rowheight[$rows-1] = max($rowheight[$rows-1],$h);
|
||||
}
|
||||
|
||||
$abs_height = 0;
|
||||
for( $i=0; $i < $rows; ++$i ) {
|
||||
$abs_height += $rowheight[$i] ;
|
||||
}
|
||||
|
||||
// Make sure that the height is at least as high as mark size + ymargin
|
||||
// We add 1.5 y-margin to add some space at the top+bottom part of the
|
||||
// legend.
|
||||
$abs_height = max($abs_height,$this->mark_abs_vsize);
|
||||
$abs_height += 3*$this->ymargin;
|
||||
|
||||
// Find out the maximum width in each column
|
||||
for( $i=$numcolumns; $i < $n; ++$i ) {
|
||||
$colwidth[$i % $numcolumns] = max(
|
||||
$aImg->GetTextWidth($this->txtcol[$i][0])+2*$this->xmargin+2*$this->mark_abs_hsize,
|
||||
$colwidth[$i % $numcolumns]);
|
||||
}
|
||||
|
||||
|
||||
// Get the total width
|
||||
$mtw = 0;
|
||||
for( $i=0; $i < $numcolumns; ++$i ) {
|
||||
$mtw += $colwidth[$i] ;
|
||||
}
|
||||
|
||||
// Find out maximum width we need for legend box
|
||||
$abs_width = $mtw+$this->xlmargin;
|
||||
|
||||
if( $this->xabspos === -1 && $this->yabspos === -1 ) {
|
||||
$this->xabspos = $this->xpos*$aImg->width ;
|
||||
$this->yabspos = $this->ypos*$aImg->height ;
|
||||
}
|
||||
|
||||
// Positioning of the legend box
|
||||
if( $this->halign == 'left' ) {
|
||||
$xp = $this->xabspos;
|
||||
}
|
||||
elseif( $this->halign == 'center' ) {
|
||||
$xp = $this->xabspos - $abs_width/2;
|
||||
}
|
||||
else {
|
||||
$xp = $aImg->width - $this->xabspos - $abs_width;
|
||||
}
|
||||
|
||||
$yp=$this->yabspos;
|
||||
if( $this->valign == 'center' ) {
|
||||
$yp-=$abs_height/2;
|
||||
}
|
||||
elseif( $this->valign == 'bottom' ) {
|
||||
$yp-=$abs_height;
|
||||
}
|
||||
|
||||
// Stroke legend box
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($this->frameweight);
|
||||
$aImg->SetLineStyle('solid');
|
||||
|
||||
if( $this->shadow ) {
|
||||
$aImg->ShadowRectangle($xp,$yp,$xp+$abs_width+$this->shadow_width,
|
||||
$yp+$abs_height+$this->shadow_width,
|
||||
$this->fill_color,$this->shadow_width,$this->shadow_color);
|
||||
}
|
||||
else {
|
||||
$aImg->SetColor($this->fill_color);
|
||||
$aImg->FilledRectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height);
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->Rectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height);
|
||||
}
|
||||
|
||||
// x1,y1 is the position for the legend mark
|
||||
$x1=$xp+round($this->mark_abs_hsize/2)+$this->xlmargin;
|
||||
$y1=$yp + $this->ymargin;
|
||||
|
||||
// Remember 1/2 of the font height since we need that later
|
||||
// as a minimum value for correctly position the markers
|
||||
$f2 = round($aImg->GetTextHeight('X')/2);
|
||||
|
||||
$grad = new Gradient($aImg);
|
||||
$patternFactory = null;
|
||||
|
||||
// Now stroke each legend in turn
|
||||
// Each plot has added the following information to the legend
|
||||
// p[0] = Legend text
|
||||
// p[1] = Color,
|
||||
// p[2] = For markers a reference to the PlotMark object
|
||||
// p[3] = For lines the line style, for gradient the negative gradient style
|
||||
// p[4] = CSIM target
|
||||
// p[5] = CSIM Alt text
|
||||
$i = 1 ; $row = 0;
|
||||
foreach($this->txtcol as $p) {
|
||||
|
||||
// STROKE DEBUG BOX
|
||||
if( _JPG_DEBUG ) {
|
||||
$aImg->SetLineWeight(1);
|
||||
$aImg->SetColor('red');
|
||||
$aImg->SetLineStyle('solid');
|
||||
$aImg->Rectangle($xp,$y1,$xp+$abs_width,$y1+$rowheight[$row]);
|
||||
}
|
||||
|
||||
$aImg->SetLineWeight($this->weight);
|
||||
$x1 = round($x1); $y1=round($y1);
|
||||
if ( !empty($p[2]) && $p[2]->GetType() > -1 ) {
|
||||
// Make a plot mark legend
|
||||
$aImg->SetColor($p[1]);
|
||||
if( is_string($p[3]) || $p[3]>0 ) {
|
||||
$aImg->SetLineStyle($p[3]);
|
||||
$aImg->StyleLine($x1-$this->mark_abs_hsize,$y1+$f2,$x1+$this->mark_abs_hsize,$y1+$f2);
|
||||
}
|
||||
// Stroke a mark with the standard size
|
||||
// (As long as it is not an image mark )
|
||||
if( $p[2]->GetType() != MARK_IMG ) {
|
||||
|
||||
// Clear any user callbacks since we ont want them called for
|
||||
// the legend marks
|
||||
$p[2]->iFormatCallback = '';
|
||||
$p[2]->iFormatCallback2 = '';
|
||||
|
||||
// Since size for circles is specified as the radius
|
||||
// this means that we must half the size to make the total
|
||||
// width behave as the other marks
|
||||
if( $p[2]->GetType() == MARK_FILLEDCIRCLE || $p[2]->GetType() == MARK_CIRCLE ) {
|
||||
$p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)/2);
|
||||
$p[2]->Stroke($aImg,$x1,$y1+$f2);
|
||||
}
|
||||
else {
|
||||
$p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize));
|
||||
$p[2]->Stroke($aImg,$x1,$y1+$f2);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ( !empty($p[2]) && (is_string($p[3]) || $p[3]>0 ) ) {
|
||||
// Draw a styled line
|
||||
$aImg->SetColor($p[1]);
|
||||
$aImg->SetLineStyle($p[3]);
|
||||
$aImg->StyleLine($x1-1,$y1+$f2,$x1+$this->mark_abs_hsize,$y1+$f2);
|
||||
$aImg->StyleLine($x1-1,$y1+$f2+1,$x1+$this->mark_abs_hsize,$y1+$f2+1);
|
||||
}
|
||||
else {
|
||||
// Draw a colored box
|
||||
$color = $p[1] ;
|
||||
|
||||
// We make boxes slightly larger to better show
|
||||
$boxsize = max($this->mark_abs_vsize,$this->mark_abs_hsize) + 2 ;
|
||||
|
||||
// $y1 is the top border of the "box" we have to draw the marker
|
||||
// and legend text in. We position the marker in the vertical center
|
||||
// of this box
|
||||
$ym = $y1 + round($rowheight[$row]/2)-round($this->mark_abs_vsize/2);
|
||||
|
||||
// We either need to plot a gradient or a
|
||||
// pattern. To differentiate we use a kludge.
|
||||
// Patterns have a p[3] value of < -100
|
||||
if( $p[3] < -100 ) {
|
||||
// p[1][0] == iPattern, p[1][1] == iPatternColor, p[1][2] == iPatternDensity
|
||||
if( $patternFactory == null ) {
|
||||
$patternFactory = new RectPatternFactory();
|
||||
}
|
||||
$prect = $patternFactory->Create($p[1][0],$p[1][1],1);
|
||||
$prect->SetBackground($p[1][3]);
|
||||
$prect->SetDensity($p[1][2]+1);
|
||||
$prect->SetPos(new Rectangle($x1,$ym,$boxsize,$boxsize));
|
||||
$prect->Stroke($aImg);
|
||||
$prect=null;
|
||||
}
|
||||
else {
|
||||
if( is_array($color) && count($color)==2 ) {
|
||||
// The client want a gradient color
|
||||
$grad->FilledRectangle($x1,$ym,
|
||||
$x1+$boxsize,$ym+$boxsize,
|
||||
$color[0],$color[1],-$p[3]);
|
||||
}
|
||||
else {
|
||||
$aImg->SetColor($p[1]);
|
||||
$aImg->FilledRectangle($x1,$ym,$x1+$boxsize,$ym+$boxsize);
|
||||
}
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($fillBoxFrameWeight);
|
||||
$aImg->Rectangle($x1,$ym,$x1+$boxsize,$ym+$boxsize);
|
||||
}
|
||||
}
|
||||
$aImg->SetColor($this->font_color);
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$aImg->SetTextAlign('left','center');
|
||||
$aImg->StrokeText(round($x1+$this->mark_abs_hsize+$this->xmargin),
|
||||
$y1+round($rowheight[$row]/2),$p[0]);
|
||||
|
||||
// Add CSIM for Legend if defined
|
||||
if( !empty($p[4]) ) {
|
||||
|
||||
$xe = $x1 + $this->xmargin+$this->mark_abs_hsize+$aImg->GetTextWidth($p[0]);
|
||||
$ye = $y1 + max($this->mark_abs_vsize,$aImg->GetTextHeight($p[0]));
|
||||
$coords = "$x1,$y1,$xe,$y1,$xe,$ye,$x1,$ye";
|
||||
if( ! empty($p[4]) ) {
|
||||
$this->csimareas .= "<area shape=\"poly\" coords=\"$coords\" href=\"".htmlentities($p[4])."\"";
|
||||
|
||||
if( !empty($p[6]) ) {
|
||||
$this->csimareas .= " target=\"".$p[6]."\"";
|
||||
}
|
||||
|
||||
if( !empty($p[5]) ) {
|
||||
$tmp=sprintf($p[5],$p[0]);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
}
|
||||
if( $i >= $this->layout_n ) {
|
||||
$x1 = $xp+round($this->mark_abs_hsize/2)+$this->xlmargin;
|
||||
$y1 += $rowheight[$row++];
|
||||
$i = 1;
|
||||
}
|
||||
else {
|
||||
$x1 += $colwidth[($i-1) % $numcolumns] ;
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_PLOTBAND.PHP
|
||||
// Description: PHP4 Graph Plotting library. Extension module.
|
||||
// Created: 2004-02-18
|
||||
// Ver: $Id: jpgraph_plotband.php 781 2006-10-08 08:07:47Z ljp $
|
||||
// File: JPGRAPH_PLOTBAND.PHP
|
||||
// Description: PHP4 Graph Plotting library. Extension module.
|
||||
// Created: 2004-02-18
|
||||
// Ver: $Id: jpgraph_plotband.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
// Constants for types of static bands in plot area
|
||||
DEFINE("BAND_RDIAG",1); // Right diagonal lines
|
||||
DEFINE("BAND_LDIAG",2); // Left diagonal lines
|
||||
DEFINE("BAND_SOLID",3); // Solid one color
|
||||
DEFINE("BAND_VLINE",4); // Vertical lines
|
||||
DEFINE("BAND_HLINE",5); // Horizontal lines
|
||||
DEFINE("BAND_3DPLANE",6); // "3D" Plane
|
||||
DEFINE("BAND_HVCROSS",7); // Vertical/Hor crosses
|
||||
DEFINE("BAND_DIAGCROSS",8); // Diagonal crosses
|
||||
define("BAND_RDIAG",1); // Right diagonal lines
|
||||
define("BAND_LDIAG",2); // Left diagonal lines
|
||||
define("BAND_SOLID",3); // Solid one color
|
||||
define("BAND_VLINE",4); // Vertical lines
|
||||
define("BAND_HLINE",5); // Horizontal lines
|
||||
define("BAND_3DPLANE",6); // "3D" Plane
|
||||
define("BAND_HVCROSS",7); // Vertical/Hor crosses
|
||||
define("BAND_DIAGCROSS",8); // Diagonal crosses
|
||||
|
||||
|
||||
// Utility class to hold coordinates for a rectangle
|
||||
class Rectangle {
|
||||
public $x,$y,$w,$h;
|
||||
public $xe, $ye;
|
||||
function Rectangle($aX,$aY,$aWidth,$aHeight) {
|
||||
$this->x=$aX;
|
||||
$this->y=$aY;
|
||||
$this->w=$aWidth;
|
||||
$this->h=$aHeight;
|
||||
$this->xe=$aX+$aWidth-1;
|
||||
$this->ye=$aY+$aHeight-1;
|
||||
function __construct($aX,$aY,$aWidth,$aHeight) {
|
||||
$this->x=$aX;
|
||||
$this->y=$aY;
|
||||
$this->w=$aWidth;
|
||||
$this->h=$aHeight;
|
||||
$this->xe=$aX+$aWidth-1;
|
||||
$this->ye=$aY+$aHeight-1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,55 +45,55 @@ class RectPattern {
|
||||
protected $weight;
|
||||
protected $rect=null;
|
||||
protected $doframe=true;
|
||||
protected $linespacing; // Line spacing in pixels
|
||||
protected $linespacing; // Line spacing in pixels
|
||||
protected $iBackgroundColor=-1; // Default is no background fill
|
||||
|
||||
function RectPattern($aColor,$aWeight=1) {
|
||||
$this->color = $aColor;
|
||||
$this->weight = $aWeight;
|
||||
function __construct($aColor,$aWeight=1) {
|
||||
$this->color = $aColor;
|
||||
$this->weight = $aWeight;
|
||||
}
|
||||
|
||||
function SetBackground($aBackgroundColor) {
|
||||
$this->iBackgroundColor=$aBackgroundColor;
|
||||
$this->iBackgroundColor=$aBackgroundColor;
|
||||
}
|
||||
|
||||
function SetPos($aRect) {
|
||||
$this->rect = $aRect;
|
||||
$this->rect = $aRect;
|
||||
}
|
||||
|
||||
function ShowFrame($aShow=true) {
|
||||
$this->doframe=$aShow;
|
||||
$this->doframe=$aShow;
|
||||
}
|
||||
|
||||
function SetDensity($aDens) {
|
||||
if( $aDens < 1 || $aDens > 100 )
|
||||
JpGraphError::RaiseL(16001,$aDens);
|
||||
//(" Desity for pattern must be between 1 and 100. (You tried $aDens)");
|
||||
// 1% corresponds to linespacing=50
|
||||
// 100 % corresponds to linespacing 1
|
||||
$this->linespacing = floor(((100-$aDens)/100.0)*50)+1;
|
||||
if( $aDens < 1 || $aDens > 100 )
|
||||
JpGraphError::RaiseL(16001,$aDens);
|
||||
//(" Desity for pattern must be between 1 and 100. (You tried $aDens)");
|
||||
// 1% corresponds to linespacing=50
|
||||
// 100 % corresponds to linespacing 1
|
||||
$this->linespacing = floor(((100-$aDens)/100.0)*50)+1;
|
||||
|
||||
}
|
||||
|
||||
function Stroke($aImg) {
|
||||
if( $this->rect == null )
|
||||
JpGraphError::RaiseL(16002);
|
||||
//(" No positions specified for pattern.");
|
||||
if( $this->rect == null )
|
||||
JpGraphError::RaiseL(16002);
|
||||
//(" No positions specified for pattern.");
|
||||
|
||||
if( !(is_numeric($this->iBackgroundColor) && $this->iBackgroundColor==-1) ) {
|
||||
$aImg->SetColor($this->iBackgroundColor);
|
||||
$aImg->FilledRectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye);
|
||||
}
|
||||
if( !(is_numeric($this->iBackgroundColor) && $this->iBackgroundColor==-1) ) {
|
||||
$aImg->SetColor($this->iBackgroundColor);
|
||||
$aImg->FilledRectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye);
|
||||
}
|
||||
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($this->weight);
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($this->weight);
|
||||
|
||||
// Virtual function implemented by subclass
|
||||
$this->DoPattern($aImg);
|
||||
// Virtual function implemented by subclass
|
||||
$this->DoPattern($aImg);
|
||||
|
||||
// Frame around the pattern area
|
||||
if( $this->doframe )
|
||||
$aImg->Rectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye);
|
||||
// Frame around the pattern area
|
||||
if( $this->doframe )
|
||||
$aImg->Rectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye);
|
||||
}
|
||||
|
||||
}
|
||||
@ -105,14 +105,14 @@ class RectPattern {
|
||||
//=====================================================================
|
||||
class RectPatternSolid extends RectPattern {
|
||||
|
||||
function RectPatternSolid($aColor="black",$aWeight=1) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
function __construct($aColor="black",$aWeight=1) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->FilledRectangle($this->rect->x,$this->rect->y,
|
||||
$this->rect->xe,$this->rect->ye);
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->FilledRectangle($this->rect->x,$this->rect->y,
|
||||
$this->rect->xe,$this->rect->ye);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,19 +122,19 @@ class RectPatternSolid extends RectPattern {
|
||||
//=====================================================================
|
||||
class RectPatternHor extends RectPattern {
|
||||
|
||||
function RectPatternHor($aColor="black",$aWeight=1,$aLineSpacing=7) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
function __construct($aColor="black",$aWeight=1,$aLineSpacing=7) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
$x0 = $this->rect->x;
|
||||
$x1 = $this->rect->xe;
|
||||
$y = $this->rect->y;
|
||||
while( $y < $this->rect->ye ) {
|
||||
$aImg->Line($x0,$y,$x1,$y);
|
||||
$y += $this->linespacing;
|
||||
}
|
||||
$x0 = $this->rect->x;
|
||||
$x1 = $this->rect->xe;
|
||||
$y = $this->rect->y;
|
||||
while( $y < $this->rect->ye ) {
|
||||
$aImg->Line($x0,$y,$x1,$y);
|
||||
$y += $this->linespacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,22 +144,22 @@ class RectPatternHor extends RectPattern {
|
||||
//=====================================================================
|
||||
class RectPatternVert extends RectPattern {
|
||||
|
||||
function RectPatternVert($aColor="black",$aWeight=1,$aLineSpacing=7) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
function __construct($aColor="black",$aWeight=1,$aLineSpacing=7) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
// Private methods
|
||||
//
|
||||
function DoPattern($aImg) {
|
||||
$x = $this->rect->x;
|
||||
$y0 = $this->rect->y;
|
||||
$y1 = $this->rect->ye;
|
||||
while( $x < $this->rect->xe ) {
|
||||
$aImg->Line($x,$y0,$x,$y1);
|
||||
$x += $this->linespacing;
|
||||
}
|
||||
$x = $this->rect->x;
|
||||
$y0 = $this->rect->y;
|
||||
$y1 = $this->rect->ye;
|
||||
while( $x < $this->rect->xe ) {
|
||||
$aImg->Line($x,$y0,$x,$y1);
|
||||
$x += $this->linespacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,66 +170,66 @@ class RectPatternVert extends RectPattern {
|
||||
//=====================================================================
|
||||
class RectPatternRDiag extends RectPattern {
|
||||
|
||||
function RectPatternRDiag($aColor="black",$aWeight=1,$aLineSpacing=12) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
function __construct($aColor="black",$aWeight=1,$aLineSpacing=12) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->linespacing = $aLineSpacing;
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
// --------------------
|
||||
// | / / / / /|
|
||||
// |/ / / / / |
|
||||
// | / / / / |
|
||||
// --------------------
|
||||
$xe = $this->rect->xe;
|
||||
$ye = $this->rect->ye;
|
||||
$x0 = $this->rect->x + round($this->linespacing/2);
|
||||
$y0 = $this->rect->y;
|
||||
$x1 = $this->rect->x;
|
||||
$y1 = $this->rect->y + round($this->linespacing/2);
|
||||
// --------------------
|
||||
// | / / / / /|
|
||||
// |/ / / / / |
|
||||
// | / / / / |
|
||||
// --------------------
|
||||
$xe = $this->rect->xe;
|
||||
$ye = $this->rect->ye;
|
||||
$x0 = $this->rect->x + round($this->linespacing/2);
|
||||
$y0 = $this->rect->y;
|
||||
$x1 = $this->rect->x;
|
||||
$y1 = $this->rect->y + round($this->linespacing/2);
|
||||
|
||||
while($x0<=$xe && $y1<=$ye) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$y1 += $this->linespacing;
|
||||
}
|
||||
while($x0<=$xe && $y1<=$ye) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$y1 += $this->linespacing;
|
||||
}
|
||||
|
||||
if( $xe-$x1 > $ye-$y0 ) {
|
||||
// Width larger than height
|
||||
$x1 = $this->rect->x + ($y1-$ye);
|
||||
$y1 = $ye;
|
||||
$y0 = $this->rect->y;
|
||||
while( $x0 <= $xe ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
if( $xe-$x1 > $ye-$y0 ) {
|
||||
// Width larger than height
|
||||
$x1 = $this->rect->x + ($y1-$ye);
|
||||
$y1 = $ye;
|
||||
$y0 = $this->rect->y;
|
||||
while( $x0 <= $xe ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
|
||||
$y0=$this->rect->y + ($x0-$xe);
|
||||
$x0=$xe;
|
||||
}
|
||||
else {
|
||||
// Height larger than width
|
||||
$diff = $x0-$xe;
|
||||
$y0 = $diff+$this->rect->y;
|
||||
$x0 = $xe;
|
||||
$x1 = $this->rect->x;
|
||||
while( $y1 <= $ye ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y1 += $this->linespacing;
|
||||
$y0 += $this->linespacing;
|
||||
}
|
||||
$y0=$this->rect->y + ($x0-$xe);
|
||||
$x0=$xe;
|
||||
}
|
||||
else {
|
||||
// Height larger than width
|
||||
$diff = $x0-$xe;
|
||||
$y0 = $diff+$this->rect->y;
|
||||
$x0 = $xe;
|
||||
$x1 = $this->rect->x;
|
||||
while( $y1 <= $ye ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y1 += $this->linespacing;
|
||||
$y0 += $this->linespacing;
|
||||
}
|
||||
|
||||
$diff = $y1-$ye;
|
||||
$y1 = $ye;
|
||||
$x1 = $diff + $this->rect->x;
|
||||
}
|
||||
$diff = $y1-$ye;
|
||||
$y1 = $ye;
|
||||
$x1 = $diff + $this->rect->x;
|
||||
}
|
||||
|
||||
while( $y0 <= $ye ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
while( $y0 <= $ye ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,61 +239,61 @@ class RectPatternRDiag extends RectPattern {
|
||||
//=====================================================================
|
||||
class RectPatternLDiag extends RectPattern {
|
||||
|
||||
function RectPatternLDiag($aColor="black",$aWeight=1,$aLineSpacing=12) {
|
||||
$this->linespacing = $aLineSpacing;
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
function __construct($aColor="black",$aWeight=1,$aLineSpacing=12) {
|
||||
$this->linespacing = $aLineSpacing;
|
||||
parent::__construct($aColor,$aWeight);
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
// --------------------
|
||||
// |\ \ \ \ \ |
|
||||
// | \ \ \ \ \|
|
||||
// | \ \ \ \ |
|
||||
// |------------------|
|
||||
$xe = $this->rect->xe;
|
||||
$ye = $this->rect->ye;
|
||||
$x0 = $this->rect->x + round($this->linespacing/2);
|
||||
$y0 = $this->rect->ye;
|
||||
$x1 = $this->rect->x;
|
||||
$y1 = $this->rect->ye - round($this->linespacing/2);
|
||||
// --------------------
|
||||
// |\ \ \ \ \ |
|
||||
// | \ \ \ \ \|
|
||||
// | \ \ \ \ |
|
||||
// |------------------|
|
||||
$xe = $this->rect->xe;
|
||||
$ye = $this->rect->ye;
|
||||
$x0 = $this->rect->x + round($this->linespacing/2);
|
||||
$y0 = $this->rect->ye;
|
||||
$x1 = $this->rect->x;
|
||||
$y1 = $this->rect->ye - round($this->linespacing/2);
|
||||
|
||||
while($x0<=$xe && $y1>=$this->rect->y) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$y1 -= $this->linespacing;
|
||||
}
|
||||
if( $xe-$x1 > $ye-$this->rect->y ) {
|
||||
// Width larger than height
|
||||
$x1 = $this->rect->x + ($this->rect->y-$y1);
|
||||
$y0=$ye; $y1=$this->rect->y;
|
||||
while( $x0 <= $xe ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
while($x0<=$xe && $y1>=$this->rect->y) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$y1 -= $this->linespacing;
|
||||
}
|
||||
if( $xe-$x1 > $ye-$this->rect->y ) {
|
||||
// Width larger than height
|
||||
$x1 = $this->rect->x + ($this->rect->y-$y1);
|
||||
$y0=$ye; $y1=$this->rect->y;
|
||||
while( $x0 <= $xe ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$x0 += $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
|
||||
$y0=$this->rect->ye - ($x0-$xe);
|
||||
$x0=$xe;
|
||||
}
|
||||
else {
|
||||
// Height larger than width
|
||||
$diff = $x0-$xe;
|
||||
$y0 = $ye-$diff;
|
||||
$x0 = $xe;
|
||||
while( $y1 >= $this->rect->y ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 -= $this->linespacing;
|
||||
$y1 -= $this->linespacing;
|
||||
}
|
||||
$diff = $this->rect->y - $y1;
|
||||
$x1 = $this->rect->x + $diff;
|
||||
$y1 = $this->rect->y;
|
||||
}
|
||||
while( $y0 >= $this->rect->y ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 -= $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
$y0=$this->rect->ye - ($x0-$xe);
|
||||
$x0=$xe;
|
||||
}
|
||||
else {
|
||||
// Height larger than width
|
||||
$diff = $x0-$xe;
|
||||
$y0 = $ye-$diff;
|
||||
$x0 = $xe;
|
||||
while( $y1 >= $this->rect->y ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 -= $this->linespacing;
|
||||
$y1 -= $this->linespacing;
|
||||
}
|
||||
$diff = $this->rect->y - $y1;
|
||||
$x1 = $this->rect->x + $diff;
|
||||
$y1 = $this->rect->y;
|
||||
}
|
||||
while( $y0 >= $this->rect->y ) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$y0 -= $this->linespacing;
|
||||
$x1 += $this->linespacing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,110 +307,110 @@ class RectPattern3DPlane extends RectPattern {
|
||||
// top of the band. Specifies how fast the lines
|
||||
// converge.
|
||||
|
||||
function RectPattern3DPlane($aColor="black",$aWeight=1) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->SetDensity(10); // Slightly larger default
|
||||
function __construct($aColor="black",$aWeight=1) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->SetDensity(10); // Slightly larger default
|
||||
}
|
||||
|
||||
function SetHorizon($aHorizon) {
|
||||
$this->alpha=$aHorizon;
|
||||
$this->alpha=$aHorizon;
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
// "Fake" a nice 3D grid-effect.
|
||||
$x0 = $this->rect->x + $this->rect->w/2;
|
||||
$y0 = $this->rect->y;
|
||||
$x1 = $x0;
|
||||
$y1 = $this->rect->ye;
|
||||
$x0_right = $x0;
|
||||
$x1_right = $x1;
|
||||
// "Fake" a nice 3D grid-effect.
|
||||
$x0 = $this->rect->x + $this->rect->w/2;
|
||||
$y0 = $this->rect->y;
|
||||
$x1 = $x0;
|
||||
$y1 = $this->rect->ye;
|
||||
$x0_right = $x0;
|
||||
$x1_right = $x1;
|
||||
|
||||
// BTW "apa" means monkey in Swedish but is really a shortform for
|
||||
// "alpha+a" which was the labels I used on paper when I derived the
|
||||
// geometric to get the 3D perspective right.
|
||||
// $apa is the height of the bounding rectangle plus the distance to the
|
||||
// artifical horizon (alpha)
|
||||
$apa = $this->rect->h + $this->alpha;
|
||||
// BTW "apa" means monkey in Swedish but is really a shortform for
|
||||
// "alpha+a" which was the labels I used on paper when I derived the
|
||||
// geometric to get the 3D perspective right.
|
||||
// $apa is the height of the bounding rectangle plus the distance to the
|
||||
// artifical horizon (alpha)
|
||||
$apa = $this->rect->h + $this->alpha;
|
||||
|
||||
// Three cases and three loops
|
||||
// 1) The endpoint of the line ends on the bottom line
|
||||
// 2) The endpoint ends on the side
|
||||
// 3) Horizontal lines
|
||||
// Three cases and three loops
|
||||
// 1) The endpoint of the line ends on the bottom line
|
||||
// 2) The endpoint ends on the side
|
||||
// 3) Horizontal lines
|
||||
|
||||
// Endpoint falls on bottom line
|
||||
$middle=$this->rect->x + $this->rect->w/2;
|
||||
$dist=$this->linespacing;
|
||||
$factor=$this->alpha /($apa);
|
||||
while($x1>$this->rect->x) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$aImg->Line($x0_right,$y0,$x1_right,$y1);
|
||||
$x1 = $middle - $dist;
|
||||
$x0 = $middle - $dist * $factor;
|
||||
$x1_right = $middle + $dist;
|
||||
$x0_right = $middle + $dist * $factor;
|
||||
$dist += $this->linespacing;
|
||||
}
|
||||
// Endpoint falls on bottom line
|
||||
$middle=$this->rect->x + $this->rect->w/2;
|
||||
$dist=$this->linespacing;
|
||||
$factor=$this->alpha /($apa);
|
||||
while($x1>$this->rect->x) {
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$aImg->Line($x0_right,$y0,$x1_right,$y1);
|
||||
$x1 = $middle - $dist;
|
||||
$x0 = $middle - $dist * $factor;
|
||||
$x1_right = $middle + $dist;
|
||||
$x0_right = $middle + $dist * $factor;
|
||||
$dist += $this->linespacing;
|
||||
}
|
||||
|
||||
// Endpoint falls on sides
|
||||
$dist -= $this->linespacing;
|
||||
$d=$this->rect->w/2;
|
||||
$c = $apa - $d*$apa/$dist;
|
||||
while( $x0>$this->rect->x ) {
|
||||
$aImg->Line($x0,$y0,$this->rect->x,$this->rect->ye-$c);
|
||||
$aImg->Line($x0_right,$y0,$this->rect->xe,$this->rect->ye-$c);
|
||||
$dist += $this->linespacing;
|
||||
$x0 = $middle - $dist * $factor;
|
||||
$x1 = $middle - $dist;
|
||||
$x0_right = $middle + $dist * $factor;
|
||||
$c = $apa - $d*$apa/$dist;
|
||||
}
|
||||
// Endpoint falls on sides
|
||||
$dist -= $this->linespacing;
|
||||
$d=$this->rect->w/2;
|
||||
$c = $apa - $d*$apa/$dist;
|
||||
while( $x0>$this->rect->x ) {
|
||||
$aImg->Line($x0,$y0,$this->rect->x,$this->rect->ye-$c);
|
||||
$aImg->Line($x0_right,$y0,$this->rect->xe,$this->rect->ye-$c);
|
||||
$dist += $this->linespacing;
|
||||
$x0 = $middle - $dist * $factor;
|
||||
$x1 = $middle - $dist;
|
||||
$x0_right = $middle + $dist * $factor;
|
||||
$c = $apa - $d*$apa/$dist;
|
||||
}
|
||||
|
||||
// Horizontal lines
|
||||
// They need some serious consideration since they are a function
|
||||
// of perspective depth (alpha) and density (linespacing)
|
||||
$x0=$this->rect->x;
|
||||
$x1=$this->rect->xe;
|
||||
$y=$this->rect->ye;
|
||||
// Horizontal lines
|
||||
// They need some serious consideration since they are a function
|
||||
// of perspective depth (alpha) and density (linespacing)
|
||||
$x0=$this->rect->x;
|
||||
$x1=$this->rect->xe;
|
||||
$y=$this->rect->ye;
|
||||
|
||||
// The first line is drawn directly. Makes the loop below slightly
|
||||
// more readable.
|
||||
$aImg->Line($x0,$y,$x1,$y);
|
||||
$hls = $this->linespacing;
|
||||
// The first line is drawn directly. Makes the loop below slightly
|
||||
// more readable.
|
||||
$aImg->Line($x0,$y,$x1,$y);
|
||||
$hls = $this->linespacing;
|
||||
|
||||
// A correction factor for vertical "brick" line spacing to account for
|
||||
// a) the difference in number of pixels hor vs vert
|
||||
// b) visual apperance to make the first layer of "bricks" look more
|
||||
// square.
|
||||
$vls = $this->linespacing*0.6;
|
||||
// A correction factor for vertical "brick" line spacing to account for
|
||||
// a) the difference in number of pixels hor vs vert
|
||||
// b) visual apperance to make the first layer of "bricks" look more
|
||||
// square.
|
||||
$vls = $this->linespacing*0.6;
|
||||
|
||||
$ds = $hls*($apa-$vls)/$apa;
|
||||
// Get the slope for the "perspective line" going from bottom right
|
||||
// corner to top left corner of the "first" brick.
|
||||
$ds = $hls*($apa-$vls)/$apa;
|
||||
// Get the slope for the "perspective line" going from bottom right
|
||||
// corner to top left corner of the "first" brick.
|
||||
|
||||
// Uncomment the following lines if you want to get a visual understanding
|
||||
// of what this helpline does. BTW this mimics the way you would get the
|
||||
// perspective right when drawing on paper.
|
||||
/*
|
||||
$x0 = $middle;
|
||||
$y0 = $this->rect->ye;
|
||||
$len=floor(($this->rect->ye-$this->rect->y)/$vls);
|
||||
$x1 = $middle+round($len*$ds);
|
||||
$y1 = $this->rect->ye-$len*$vls;
|
||||
$aImg->PushColor("red");
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$aImg->PopColor();
|
||||
*/
|
||||
// Uncomment the following lines if you want to get a visual understanding
|
||||
// of what this helpline does. BTW this mimics the way you would get the
|
||||
// perspective right when drawing on paper.
|
||||
/*
|
||||
$x0 = $middle;
|
||||
$y0 = $this->rect->ye;
|
||||
$len=floor(($this->rect->ye-$this->rect->y)/$vls);
|
||||
$x1 = $middle+round($len*$ds);
|
||||
$y1 = $this->rect->ye-$len*$vls;
|
||||
$aImg->PushColor("red");
|
||||
$aImg->Line($x0,$y0,$x1,$y1);
|
||||
$aImg->PopColor();
|
||||
*/
|
||||
|
||||
$y -= $vls;
|
||||
$k=($this->rect->ye-($this->rect->ye-$vls))/($middle-($middle-$ds));
|
||||
$dist = $hls;
|
||||
while( $y>$this->rect->y ) {
|
||||
$aImg->Line($this->rect->x,$y,$this->rect->xe,$y);
|
||||
$adj = $k*$dist/(1+$dist*$k/$apa);
|
||||
if( $adj < 2 ) $adj=1;
|
||||
$y = $this->rect->ye - round($adj);
|
||||
$dist += $hls;
|
||||
}
|
||||
$y -= $vls;
|
||||
$k=($this->rect->ye-($this->rect->ye-$vls))/($middle-($middle-$ds));
|
||||
$dist = $hls;
|
||||
while( $y>$this->rect->y ) {
|
||||
$aImg->Line($this->rect->x,$y,$this->rect->xe,$y);
|
||||
$adj = $k*$dist/(1+$dist*$k/$apa);
|
||||
if( $adj < 2 ) $adj=1;
|
||||
$y = $this->rect->ye - round($adj);
|
||||
$dist += $hls;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,31 +421,31 @@ class RectPattern3DPlane extends RectPattern {
|
||||
class RectPatternCross extends RectPattern {
|
||||
private $vert=null;
|
||||
private $hor=null;
|
||||
function RectPatternCross($aColor="black",$aWeight=1) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->vert = new RectPatternVert($aColor,$aWeight);
|
||||
$this->hor = new RectPatternHor($aColor,$aWeight);
|
||||
function __construct($aColor="black",$aWeight=1) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->vert = new RectPatternVert($aColor,$aWeight);
|
||||
$this->hor = new RectPatternHor($aColor,$aWeight);
|
||||
}
|
||||
|
||||
function SetOrder($aDepth) {
|
||||
$this->vert->SetOrder($aDepth);
|
||||
$this->hor->SetOrder($aDepth);
|
||||
$this->vert->SetOrder($aDepth);
|
||||
$this->hor->SetOrder($aDepth);
|
||||
}
|
||||
|
||||
function SetPos($aRect) {
|
||||
parent::SetPos($aRect);
|
||||
$this->vert->SetPos($aRect);
|
||||
$this->hor->SetPos($aRect);
|
||||
parent::SetPos($aRect);
|
||||
$this->vert->SetPos($aRect);
|
||||
$this->hor->SetPos($aRect);
|
||||
}
|
||||
|
||||
function SetDensity($aDens) {
|
||||
$this->vert->SetDensity($aDens);
|
||||
$this->hor->SetDensity($aDens);
|
||||
$this->vert->SetDensity($aDens);
|
||||
$this->hor->SetDensity($aDens);
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
$this->vert->DoPattern($aImg);
|
||||
$this->hor->DoPattern($aImg);
|
||||
$this->vert->DoPattern($aImg);
|
||||
$this->hor->DoPattern($aImg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -457,31 +457,31 @@ class RectPatternCross extends RectPattern {
|
||||
class RectPatternDiagCross extends RectPattern {
|
||||
private $left=null;
|
||||
private $right=null;
|
||||
function RectPatternDiagCross($aColor="black",$aWeight=1) {
|
||||
parent::RectPattern($aColor,$aWeight);
|
||||
$this->right = new RectPatternRDiag($aColor,$aWeight);
|
||||
$this->left = new RectPatternLDiag($aColor,$aWeight);
|
||||
function __construct($aColor="black",$aWeight=1) {
|
||||
parent::__construct($aColor,$aWeight);
|
||||
$this->right = new RectPatternRDiag($aColor,$aWeight);
|
||||
$this->left = new RectPatternLDiag($aColor,$aWeight);
|
||||
}
|
||||
|
||||
function SetOrder($aDepth) {
|
||||
$this->left->SetOrder($aDepth);
|
||||
$this->right->SetOrder($aDepth);
|
||||
$this->left->SetOrder($aDepth);
|
||||
$this->right->SetOrder($aDepth);
|
||||
}
|
||||
|
||||
function SetPos($aRect) {
|
||||
parent::SetPos($aRect);
|
||||
$this->left->SetPos($aRect);
|
||||
$this->right->SetPos($aRect);
|
||||
parent::SetPos($aRect);
|
||||
$this->left->SetPos($aRect);
|
||||
$this->right->SetPos($aRect);
|
||||
}
|
||||
|
||||
function SetDensity($aDens) {
|
||||
$this->left->SetDensity($aDens);
|
||||
$this->right->SetDensity($aDens);
|
||||
$this->left->SetDensity($aDens);
|
||||
$this->right->SetDensity($aDens);
|
||||
}
|
||||
|
||||
function DoPattern($aImg) {
|
||||
$this->left->DoPattern($aImg);
|
||||
$this->right->DoPattern($aImg);
|
||||
$this->left->DoPattern($aImg);
|
||||
$this->right->DoPattern($aImg);
|
||||
}
|
||||
|
||||
}
|
||||
@ -491,40 +491,40 @@ class RectPatternDiagCross extends RectPattern {
|
||||
// Factory class for rectangular pattern
|
||||
//=====================================================================
|
||||
class RectPatternFactory {
|
||||
function RectPatternFactory() {
|
||||
// Empty
|
||||
function __construct() {
|
||||
// Empty
|
||||
}
|
||||
function Create($aPattern,$aColor,$aWeight=1) {
|
||||
switch($aPattern) {
|
||||
case BAND_RDIAG:
|
||||
$obj = new RectPatternRDiag($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_LDIAG:
|
||||
$obj = new RectPatternLDiag($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_SOLID:
|
||||
$obj = new RectPatternSolid($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_VLINE:
|
||||
$obj = new RectPatternVert($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_HLINE:
|
||||
$obj = new RectPatternHor($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_3DPLANE:
|
||||
$obj = new RectPattern3DPlane($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_HVCROSS:
|
||||
$obj = new RectPatternCross($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_DIAGCROSS:
|
||||
$obj = new RectPatternDiagCross($aColor,$aWeight);
|
||||
break;
|
||||
default:
|
||||
JpGraphError::RaiseL(16003,$aPattern);
|
||||
//(" Unknown pattern specification ($aPattern)");
|
||||
}
|
||||
return $obj;
|
||||
switch($aPattern) {
|
||||
case BAND_RDIAG:
|
||||
$obj = new RectPatternRDiag($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_LDIAG:
|
||||
$obj = new RectPatternLDiag($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_SOLID:
|
||||
$obj = new RectPatternSolid($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_VLINE:
|
||||
$obj = new RectPatternVert($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_HLINE:
|
||||
$obj = new RectPatternHor($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_3DPLANE:
|
||||
$obj = new RectPattern3DPlane($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_HVCROSS:
|
||||
$obj = new RectPatternCross($aColor,$aWeight);
|
||||
break;
|
||||
case BAND_DIAGCROSS:
|
||||
$obj = new RectPatternDiagCross($aColor,$aWeight);
|
||||
break;
|
||||
default:
|
||||
JpGraphError::RaiseL(16003,$aPattern);
|
||||
//(" Unknown pattern specification ($aPattern)");
|
||||
}
|
||||
return $obj;
|
||||
}
|
||||
}
|
||||
|
||||
@ -540,94 +540,94 @@ class PlotBand {
|
||||
private $prect=null;
|
||||
private $dir, $min, $max;
|
||||
|
||||
function PlotBand($aDir,$aPattern,$aMin,$aMax,$aColor="black",$aWeight=1,$aDepth=DEPTH_BACK) {
|
||||
$f = new RectPatternFactory();
|
||||
$this->prect = $f->Create($aPattern,$aColor,$aWeight);
|
||||
if( is_numeric($aMin) && is_numeric($aMax) && ($aMin > $aMax) )
|
||||
JpGraphError::RaiseL(16004);
|
||||
//('Min value for plotband is larger than specified max value. Please correct.');
|
||||
$this->dir = $aDir;
|
||||
$this->min = $aMin;
|
||||
$this->max = $aMax;
|
||||
$this->depth=$aDepth;
|
||||
function __construct($aDir,$aPattern,$aMin,$aMax,$aColor="black",$aWeight=1,$aDepth=DEPTH_BACK) {
|
||||
$f = new RectPatternFactory();
|
||||
$this->prect = $f->Create($aPattern,$aColor,$aWeight);
|
||||
if( is_numeric($aMin) && is_numeric($aMax) && ($aMin > $aMax) )
|
||||
JpGraphError::RaiseL(16004);
|
||||
//('Min value for plotband is larger than specified max value. Please correct.');
|
||||
$this->dir = $aDir;
|
||||
$this->min = $aMin;
|
||||
$this->max = $aMax;
|
||||
$this->depth=$aDepth;
|
||||
}
|
||||
|
||||
// Set position. aRect contains absolute image coordinates
|
||||
function SetPos($aRect) {
|
||||
assert( $this->prect != null ) ;
|
||||
$this->prect->SetPos($aRect);
|
||||
assert( $this->prect != null ) ;
|
||||
$this->prect->SetPos($aRect);
|
||||
}
|
||||
|
||||
function ShowFrame($aFlag=true) {
|
||||
$this->prect->ShowFrame($aFlag);
|
||||
$this->prect->ShowFrame($aFlag);
|
||||
}
|
||||
|
||||
// Set z-order. In front of pplot or in the back
|
||||
function SetOrder($aDepth) {
|
||||
$this->depth=$aDepth;
|
||||
$this->depth=$aDepth;
|
||||
}
|
||||
|
||||
function SetDensity($aDens) {
|
||||
$this->prect->SetDensity($aDens);
|
||||
$this->prect->SetDensity($aDens);
|
||||
}
|
||||
|
||||
function GetDir() {
|
||||
return $this->dir;
|
||||
return $this->dir;
|
||||
}
|
||||
|
||||
function GetMin() {
|
||||
return $this->min;
|
||||
return $this->min;
|
||||
}
|
||||
|
||||
function GetMax() {
|
||||
return $this->max;
|
||||
return $this->max;
|
||||
}
|
||||
|
||||
function PreStrokeAdjust($aGraph) {
|
||||
// Nothing to do
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
// Display band
|
||||
function Stroke($aImg,$aXScale,$aYScale) {
|
||||
assert( $this->prect != null ) ;
|
||||
if( $this->dir == HORIZONTAL ) {
|
||||
if( $this->min === 'min' ) $this->min = $aYScale->GetMinVal();
|
||||
if( $this->max === 'max' ) $this->max = $aYScale->GetMaxVal();
|
||||
assert( $this->prect != null ) ;
|
||||
if( $this->dir == HORIZONTAL ) {
|
||||
if( $this->min === 'min' ) $this->min = $aYScale->GetMinVal();
|
||||
if( $this->max === 'max' ) $this->max = $aYScale->GetMaxVal();
|
||||
|
||||
// Only draw the bar if it actually appears in the range
|
||||
if ($this->min < $aYScale->GetMaxVal() && $this->max > $aYScale->GetMinVal()) {
|
||||
|
||||
// Trucate to limit of axis
|
||||
$this->min = max($this->min, $aYScale->GetMinVal());
|
||||
$this->max = min($this->max, $aYScale->GetMaxVal());
|
||||
// Trucate to limit of axis
|
||||
$this->min = max($this->min, $aYScale->GetMinVal());
|
||||
$this->max = min($this->max, $aYScale->GetMaxVal());
|
||||
|
||||
$x=$aXScale->scale_abs[0];
|
||||
$y=$aYScale->Translate($this->max);
|
||||
$width=$aXScale->scale_abs[1]-$aXScale->scale_abs[0]+1;
|
||||
$height=abs($y-$aYScale->Translate($this->min))+1;
|
||||
$this->prect->SetPos(new Rectangle($x,$y,$width,$height));
|
||||
$this->prect->Stroke($aImg);
|
||||
$x=$aXScale->scale_abs[0];
|
||||
$y=$aYScale->Translate($this->max);
|
||||
$width=$aXScale->scale_abs[1]-$aXScale->scale_abs[0]+1;
|
||||
$height=abs($y-$aYScale->Translate($this->min))+1;
|
||||
$this->prect->SetPos(new Rectangle($x,$y,$width,$height));
|
||||
$this->prect->Stroke($aImg);
|
||||
}
|
||||
}
|
||||
else { // VERTICAL
|
||||
if( $this->min === 'min' ) $this->min = $aXScale->GetMinVal();
|
||||
if( $this->max === 'max' ) $this->max = $aXScale->GetMaxVal();
|
||||
}
|
||||
else { // VERTICAL
|
||||
if( $this->min === 'min' ) $this->min = $aXScale->GetMinVal();
|
||||
if( $this->max === 'max' ) $this->max = $aXScale->GetMaxVal();
|
||||
|
||||
// Only draw the bar if it actually appears in the range
|
||||
if ($this->min < $aXScale->GetMaxVal() && $this->max > $aXScale->GetMinVal()) {
|
||||
if ($this->min < $aXScale->GetMaxVal() && $this->max > $aXScale->GetMinVal()) {
|
||||
|
||||
// Trucate to limit of axis
|
||||
$this->min = max($this->min, $aXScale->GetMinVal());
|
||||
$this->max = min($this->max, $aXScale->GetMaxVal());
|
||||
// Trucate to limit of axis
|
||||
$this->min = max($this->min, $aXScale->GetMinVal());
|
||||
$this->max = min($this->max, $aXScale->GetMaxVal());
|
||||
|
||||
$y=$aYScale->scale_abs[1];
|
||||
$x=$aXScale->Translate($this->min);
|
||||
$height=abs($aYScale->scale_abs[1]-$aYScale->scale_abs[0]);
|
||||
$width=abs($x-$aXScale->Translate($this->max));
|
||||
$this->prect->SetPos(new Rectangle($x,$y,$width,$height));
|
||||
$this->prect->Stroke($aImg);
|
||||
$y=$aYScale->scale_abs[1];
|
||||
$x=$aXScale->Translate($this->min);
|
||||
$height=abs($aYScale->scale_abs[1]-$aYScale->scale_abs[0]);
|
||||
$width=abs($x-$aXScale->Translate($this->max));
|
||||
$this->prect->SetPos(new Rectangle($x,$y,$width,$height));
|
||||
$this->prect->Stroke($aImg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_PLOTMARK.PHP
|
||||
// Description: Class file. Handles plotmarks
|
||||
// Created: 2003-03-21
|
||||
// Ver: $Id: jpgraph_plotmark.inc.php 956 2007-11-17 13:19:20Z ljp $
|
||||
// File: JPGRAPH_PLOTMARK.PHP
|
||||
// Description: Class file. Handles plotmarks
|
||||
// Created: 2003-03-21
|
||||
// Ver: $Id: jpgraph_plotmark.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
@ -30,79 +30,79 @@ class PlotMark {
|
||||
private $imgdata_stars = null;
|
||||
private $imgdata_pushpins = null;
|
||||
|
||||
//--------------
|
||||
// CONSTRUCTOR
|
||||
function PlotMark() {
|
||||
$this->title = new Text();
|
||||
$this->title->Hide();
|
||||
$this->csimareas = '';
|
||||
$this->type=-1;
|
||||
//--------------
|
||||
// CONSTRUCTOR
|
||||
function __construct() {
|
||||
$this->title = new Text();
|
||||
$this->title->Hide();
|
||||
$this->csimareas = '';
|
||||
$this->type=-1;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function SetType($aType,$aFileName='',$aScale=1.0) {
|
||||
$this->type = $aType;
|
||||
if( $aType == MARK_IMG && $aFileName=='' ) {
|
||||
JpGraphError::RaiseL(23003);//('A filename must be specified if you set the mark type to MARK_IMG.');
|
||||
}
|
||||
$this->iFileName = $aFileName;
|
||||
$this->iScale = $aScale;
|
||||
$this->type = $aType;
|
||||
if( $aType == MARK_IMG && $aFileName=='' ) {
|
||||
JpGraphError::RaiseL(23003);//('A filename must be specified if you set the mark type to MARK_IMG.');
|
||||
}
|
||||
$this->iFileName = $aFileName;
|
||||
$this->iScale = $aScale;
|
||||
}
|
||||
|
||||
function SetCallback($aFunc) {
|
||||
$this->iFormatCallback = $aFunc;
|
||||
$this->iFormatCallback = $aFunc;
|
||||
}
|
||||
|
||||
function SetCallbackYX($aFunc) {
|
||||
$this->iFormatCallback2 = $aFunc;
|
||||
$this->iFormatCallback2 = $aFunc;
|
||||
}
|
||||
|
||||
function GetType() {
|
||||
return $this->type;
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
function SetColor($aColor) {
|
||||
$this->color=$aColor;
|
||||
$this->color=$aColor;
|
||||
}
|
||||
|
||||
function SetFillColor($aFillColor) {
|
||||
$this->fill_color = $aFillColor;
|
||||
$this->fill_color = $aFillColor;
|
||||
}
|
||||
|
||||
function SetWeight($aWeight) {
|
||||
$this->weight = $aWeight;
|
||||
$this->weight = $aWeight;
|
||||
}
|
||||
|
||||
// Synonym for SetWidth()
|
||||
function SetSize($aWidth) {
|
||||
$this->width=$aWidth;
|
||||
$this->width=$aWidth;
|
||||
}
|
||||
|
||||
function SetWidth($aWidth) {
|
||||
$this->width=$aWidth;
|
||||
$this->width=$aWidth;
|
||||
}
|
||||
|
||||
function SetDefaultWidth() {
|
||||
switch( $this->type ) {
|
||||
case MARK_CIRCLE:
|
||||
case MARK_FILLEDCIRCLE:
|
||||
$this->width=4;
|
||||
break;
|
||||
default:
|
||||
$this->width=7;
|
||||
}
|
||||
switch( $this->type ) {
|
||||
case MARK_CIRCLE:
|
||||
case MARK_FILLEDCIRCLE:
|
||||
$this->width=4;
|
||||
break;
|
||||
default:
|
||||
$this->width=7;
|
||||
}
|
||||
}
|
||||
|
||||
function GetWidth() {
|
||||
return $this->width;
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
function Hide($aHide=true) {
|
||||
$this->show = !$aHide;
|
||||
$this->show = !$aHide;
|
||||
}
|
||||
|
||||
function Show($aShow=true) {
|
||||
$this->show = $aShow;
|
||||
$this->show = $aShow;
|
||||
}
|
||||
|
||||
function SetCSIMAltVal($aY,$aX='') {
|
||||
@ -131,308 +131,308 @@ class PlotMark {
|
||||
}
|
||||
$this->csimareas="";
|
||||
if( !empty($this->csimtarget) ) {
|
||||
$this->csimareas .= "<area shape=\"poly\" coords=\"$coords\" href=\"".htmlentities($this->csimtarget)."\"";
|
||||
$this->csimareas .= "<area shape=\"poly\" coords=\"$coords\" href=\"".htmlentities($this->csimtarget)."\"";
|
||||
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\"";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\"";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
}
|
||||
|
||||
function AddCSIMCircle($x,$y,$r) {
|
||||
$x = round($x); $y=round($y); $r=round($r);
|
||||
$x = round($x); $y=round($y); $r=round($r);
|
||||
$this->csimareas="";
|
||||
if( !empty($this->csimtarget) ) {
|
||||
$this->csimareas .= "<area shape=\"circle\" coords=\"$x,$y,$r\" href=\"".htmlentities($this->csimtarget)."\"";
|
||||
$this->csimareas .= "<area shape=\"circle\" coords=\"$x,$y,$r\" href=\"".htmlentities($this->csimtarget)."\"";
|
||||
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
}
|
||||
|
||||
function Stroke($img,$x,$y) {
|
||||
if( !$this->show ) return;
|
||||
if( !$this->show ) return;
|
||||
|
||||
if( $this->iFormatCallback != '' || $this->iFormatCallback2 != '' ) {
|
||||
if( $this->iFormatCallback != '' || $this->iFormatCallback2 != '' ) {
|
||||
|
||||
if( $this->iFormatCallback != '' ) {
|
||||
$f = $this->iFormatCallback;
|
||||
list($width,$color,$fcolor) = call_user_func($f,$this->yvalue);
|
||||
$filename = $this->iFileName;
|
||||
$imgscale = $this->iScale;
|
||||
}
|
||||
else {
|
||||
$f = $this->iFormatCallback2;
|
||||
list($width,$color,$fcolor,$filename,$imgscale) = call_user_func($f,$this->yvalue,$this->xvalue);
|
||||
if( $filename=="" ) $filename = $this->iFileName;
|
||||
if( $imgscale=="" ) $imgscale = $this->iScale;
|
||||
}
|
||||
if( $this->iFormatCallback != '' ) {
|
||||
$f = $this->iFormatCallback;
|
||||
list($width,$color,$fcolor) = call_user_func($f,$this->yvalue);
|
||||
$filename = $this->iFileName;
|
||||
$imgscale = $this->iScale;
|
||||
}
|
||||
else {
|
||||
$f = $this->iFormatCallback2;
|
||||
list($width,$color,$fcolor,$filename,$imgscale) = call_user_func($f,$this->yvalue,$this->xvalue);
|
||||
if( $filename=="" ) $filename = $this->iFileName;
|
||||
if( $imgscale=="" ) $imgscale = $this->iScale;
|
||||
}
|
||||
|
||||
if( $width=="" ) $width = $this->width;
|
||||
if( $color=="" ) $color = $this->color;
|
||||
if( $fcolor=="" ) $fcolor = $this->fill_color;
|
||||
if( $width=="" ) $width = $this->width;
|
||||
if( $color=="" ) $color = $this->color;
|
||||
if( $fcolor=="" ) $fcolor = $this->fill_color;
|
||||
|
||||
}
|
||||
else {
|
||||
$fcolor = $this->fill_color;
|
||||
$color = $this->color;
|
||||
$width = $this->width;
|
||||
$filename = $this->iFileName;
|
||||
$imgscale = $this->iScale;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$fcolor = $this->fill_color;
|
||||
$color = $this->color;
|
||||
$width = $this->width;
|
||||
$filename = $this->iFileName;
|
||||
$imgscale = $this->iScale;
|
||||
}
|
||||
|
||||
if( $this->type == MARK_IMG ||
|
||||
($this->type >= MARK_FLAG1 && $this->type <= MARK_FLAG4 ) ||
|
||||
$this->type >= MARK_IMG_PUSHPIN ) {
|
||||
if( $this->type == MARK_IMG ||
|
||||
($this->type >= MARK_FLAG1 && $this->type <= MARK_FLAG4 ) ||
|
||||
$this->type >= MARK_IMG_PUSHPIN ) {
|
||||
|
||||
// Note: For the builtin images we use the "filename" parameter
|
||||
// to denote the color
|
||||
$anchor_x = 0.5;
|
||||
$anchor_y = 0.5;
|
||||
switch( $this->type ) {
|
||||
case MARK_FLAG1:
|
||||
case MARK_FLAG2:
|
||||
case MARK_FLAG3:
|
||||
case MARK_FLAG4:
|
||||
$this->markimg = FlagCache::GetFlagImgByName($this->type-MARK_FLAG1+1,$filename);
|
||||
break;
|
||||
// Note: For the builtin images we use the "filename" parameter
|
||||
// to denote the color
|
||||
$anchor_x = 0.5;
|
||||
$anchor_y = 0.5;
|
||||
switch( $this->type ) {
|
||||
case MARK_FLAG1:
|
||||
case MARK_FLAG2:
|
||||
case MARK_FLAG3:
|
||||
case MARK_FLAG4:
|
||||
$this->markimg = FlagCache::GetFlagImgByName($this->type-MARK_FLAG1+1,$filename);
|
||||
break;
|
||||
|
||||
case MARK_IMG :
|
||||
// Load an image and use that as a marker
|
||||
// Small optimization, if we have already read an image don't
|
||||
// waste time reading it again.
|
||||
if( $this->markimg == '' || !($this->oldfilename === $filename) ) {
|
||||
$this->markimg = Graph::LoadBkgImage('',$filename);
|
||||
$this->oldfilename = $filename ;
|
||||
}
|
||||
break;
|
||||
case MARK_IMG :
|
||||
// Load an image and use that as a marker
|
||||
// Small optimization, if we have already read an image don't
|
||||
// waste time reading it again.
|
||||
if( $this->markimg == '' || !($this->oldfilename === $filename) ) {
|
||||
$this->markimg = Graph::LoadBkgImage('',$filename);
|
||||
$this->oldfilename = $filename ;
|
||||
}
|
||||
break;
|
||||
|
||||
case MARK_IMG_PUSHPIN:
|
||||
case MARK_IMG_SPUSHPIN:
|
||||
case MARK_IMG_LPUSHPIN:
|
||||
if( $this->imgdata_pushpins == null ) {
|
||||
require_once 'imgdata_pushpins.inc.php';
|
||||
$this->imgdata_pushpins = new ImgData_PushPins();
|
||||
}
|
||||
$this->markimg = $this->imgdata_pushpins->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_pushpins->GetAnchor();
|
||||
break;
|
||||
case MARK_IMG_PUSHPIN:
|
||||
case MARK_IMG_SPUSHPIN:
|
||||
case MARK_IMG_LPUSHPIN:
|
||||
if( $this->imgdata_pushpins == null ) {
|
||||
require_once 'imgdata_pushpins.inc.php';
|
||||
$this->imgdata_pushpins = new ImgData_PushPins();
|
||||
}
|
||||
$this->markimg = $this->imgdata_pushpins->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_pushpins->GetAnchor();
|
||||
break;
|
||||
|
||||
case MARK_IMG_SQUARE:
|
||||
if( $this->imgdata_squares == null ) {
|
||||
require_once 'imgdata_squares.inc.php';
|
||||
$this->imgdata_squares = new ImgData_Squares();
|
||||
}
|
||||
$this->markimg = $this->imgdata_squares->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_squares->GetAnchor();
|
||||
break;
|
||||
case MARK_IMG_SQUARE:
|
||||
if( $this->imgdata_squares == null ) {
|
||||
require_once 'imgdata_squares.inc.php';
|
||||
$this->imgdata_squares = new ImgData_Squares();
|
||||
}
|
||||
$this->markimg = $this->imgdata_squares->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_squares->GetAnchor();
|
||||
break;
|
||||
|
||||
case MARK_IMG_STAR:
|
||||
if( $this->imgdata_stars == null ) {
|
||||
require_once 'imgdata_stars.inc.php';
|
||||
$this->imgdata_stars = new ImgData_Stars();
|
||||
}
|
||||
$this->markimg = $this->imgdata_stars->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_stars->GetAnchor();
|
||||
break;
|
||||
case MARK_IMG_STAR:
|
||||
if( $this->imgdata_stars == null ) {
|
||||
require_once 'imgdata_stars.inc.php';
|
||||
$this->imgdata_stars = new ImgData_Stars();
|
||||
}
|
||||
$this->markimg = $this->imgdata_stars->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_stars->GetAnchor();
|
||||
break;
|
||||
|
||||
case MARK_IMG_BEVEL:
|
||||
if( $this->imgdata_bevels == null ) {
|
||||
require_once 'imgdata_bevels.inc.php';
|
||||
$this->imgdata_bevels = new ImgData_Bevels();
|
||||
}
|
||||
$this->markimg = $this->imgdata_bevels->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_bevels->GetAnchor();
|
||||
break;
|
||||
case MARK_IMG_BEVEL:
|
||||
if( $this->imgdata_bevels == null ) {
|
||||
require_once 'imgdata_bevels.inc.php';
|
||||
$this->imgdata_bevels = new ImgData_Bevels();
|
||||
}
|
||||
$this->markimg = $this->imgdata_bevels->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_bevels->GetAnchor();
|
||||
break;
|
||||
|
||||
case MARK_IMG_DIAMOND:
|
||||
if( $this->imgdata_diamonds == null ) {
|
||||
require_once 'imgdata_diamonds.inc.php';
|
||||
$this->imgdata_diamonds = new ImgData_Diamonds();
|
||||
}
|
||||
$this->markimg = $this->imgdata_diamonds->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_diamonds->GetAnchor();
|
||||
break;
|
||||
case MARK_IMG_DIAMOND:
|
||||
if( $this->imgdata_diamonds == null ) {
|
||||
require_once 'imgdata_diamonds.inc.php';
|
||||
$this->imgdata_diamonds = new ImgData_Diamonds();
|
||||
}
|
||||
$this->markimg = $this->imgdata_diamonds->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_diamonds->GetAnchor();
|
||||
break;
|
||||
|
||||
case MARK_IMG_BALL:
|
||||
case MARK_IMG_SBALL:
|
||||
case MARK_IMG_MBALL:
|
||||
case MARK_IMG_LBALL:
|
||||
if( $this->imgdata_balls == null ) {
|
||||
require_once 'imgdata_balls.inc.php';
|
||||
$this->imgdata_balls = new ImgData_Balls();
|
||||
}
|
||||
$this->markimg = $this->imgdata_balls->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_balls->GetAnchor();
|
||||
break;
|
||||
}
|
||||
case MARK_IMG_BALL:
|
||||
case MARK_IMG_SBALL:
|
||||
case MARK_IMG_MBALL:
|
||||
case MARK_IMG_LBALL:
|
||||
if( $this->imgdata_balls == null ) {
|
||||
require_once 'imgdata_balls.inc.php';
|
||||
$this->imgdata_balls = new ImgData_Balls();
|
||||
}
|
||||
$this->markimg = $this->imgdata_balls->GetImg($this->type,$filename);
|
||||
list($anchor_x,$anchor_y) = $this->imgdata_balls->GetAnchor();
|
||||
break;
|
||||
}
|
||||
|
||||
$w = $img->GetWidth($this->markimg);
|
||||
$h = $img->GetHeight($this->markimg);
|
||||
$w = $img->GetWidth($this->markimg);
|
||||
$h = $img->GetHeight($this->markimg);
|
||||
|
||||
$dw = round($imgscale * $w );
|
||||
$dh = round($imgscale * $h );
|
||||
$dw = round($imgscale * $w );
|
||||
$dh = round($imgscale * $h );
|
||||
|
||||
// Do potential rotation
|
||||
list($x,$y) = $img->Rotate($x,$y);
|
||||
// Do potential rotation
|
||||
list($x,$y) = $img->Rotate($x,$y);
|
||||
|
||||
$dx = round($x-$dw*$anchor_x);
|
||||
$dy = round($y-$dh*$anchor_y);
|
||||
$dx = round($x-$dw*$anchor_x);
|
||||
$dy = round($y-$dh*$anchor_y);
|
||||
|
||||
$this->width = max($dx,$dy);
|
||||
$this->width = max($dx,$dy);
|
||||
|
||||
$img->Copy($this->markimg,$dx,$dy,0,0,$dw,$dh,$w,$h);
|
||||
if( !empty($this->csimtarget) ) {
|
||||
$this->csimareas = "<area shape=\"rect\" coords=\"".
|
||||
$dx.','.$dy.','.round($dx+$dw).','.round($dy+$dh).'" '.
|
||||
"href=\"".htmlentities($this->csimtarget)."\"";
|
||||
$img->Copy($this->markimg,$dx,$dy,0,0,$dw,$dh,$w,$h);
|
||||
if( !empty($this->csimtarget) ) {
|
||||
$this->csimareas = "<area shape=\"rect\" coords=\"".
|
||||
$dx.','.$dy.','.round($dx+$dw).','.round($dy+$dh).'" '.
|
||||
"href=\"".htmlentities($this->csimtarget)."\"";
|
||||
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
if( !empty($this->csimwintarget) ) {
|
||||
$this->csimareas .= " target=\"".$this->csimwintarget."\" ";
|
||||
}
|
||||
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
if( !empty($this->csimalt) ) {
|
||||
$tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
|
||||
// Stroke title
|
||||
$this->title->Align("center","top");
|
||||
$this->title->Stroke($img,$x,$y+round($dh/2));
|
||||
return;
|
||||
}
|
||||
// Stroke title
|
||||
$this->title->Align("center","top");
|
||||
$this->title->Stroke($img,$x,$y+round($dh/2));
|
||||
return;
|
||||
}
|
||||
|
||||
$weight = $this->weight;
|
||||
$dx=round($width/2,0);
|
||||
$dy=round($width/2,0);
|
||||
$pts=0;
|
||||
$weight = $this->weight;
|
||||
$dx=round($width/2,0);
|
||||
$dy=round($width/2,0);
|
||||
$pts=0;
|
||||
|
||||
switch( $this->type ) {
|
||||
case MARK_SQUARE:
|
||||
$c[]=$x-$dx;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y-$dy;
|
||||
$pts=5;
|
||||
break;
|
||||
case MARK_UTRIANGLE:
|
||||
++$dx;++$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$c[]=$x;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x+$dx;$c[]=$y+0.87*$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_DTRIANGLE:
|
||||
++$dx;++$dy;
|
||||
$c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$c[]=$x-$dx;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x+$dx;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_DIAMOND:
|
||||
$c[]=$x;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+$dy;
|
||||
$pts=5;
|
||||
break;
|
||||
case MARK_LEFTTRIANGLE:
|
||||
$c[]=$x;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+2*$dy;
|
||||
$c[]=$x+$dx*2;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y;
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_RIGHTTRIANGLE:
|
||||
$c[]=$x-$dx*2;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+2*$dy;
|
||||
$c[]=$x;$c[]=$y;
|
||||
$c[]=$x-$dx*2;$c[]=$y;
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_FLASH:
|
||||
$dy *= 2;
|
||||
$c[]=$x+$dx/2; $c[]=$y-$dy;
|
||||
$c[]=$x-$dx+$dx/2; $c[]=$y+$dy*0.7-$dy;
|
||||
$c[]=$x+$dx/2; $c[]=$y+$dy*1.3-$dy;
|
||||
$c[]=$x-$dx+$dx/2; $c[]=$y+2*$dy-$dy;
|
||||
$img->SetLineWeight($weight);
|
||||
$img->SetColor($color);
|
||||
$img->Polygon($c);
|
||||
$img->SetLineWeight(1);
|
||||
$this->AddCSIMPoly($c);
|
||||
break;
|
||||
}
|
||||
switch( $this->type ) {
|
||||
case MARK_SQUARE:
|
||||
$c[]=$x-$dx;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y-$dy;
|
||||
$pts=5;
|
||||
break;
|
||||
case MARK_UTRIANGLE:
|
||||
++$dx;++$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$c[]=$x;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x+$dx;$c[]=$y+0.87*$dy;
|
||||
$c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_DTRIANGLE:
|
||||
++$dx;++$dy;
|
||||
$c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$c[]=$x-$dx;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x+$dx;$c[]=$y-0.87*$dy;
|
||||
$c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_DIAMOND:
|
||||
$c[]=$x;$c[]=$y+$dy;
|
||||
$c[]=$x-$dx;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y-$dy;
|
||||
$c[]=$x+$dx;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+$dy;
|
||||
$pts=5;
|
||||
break;
|
||||
case MARK_LEFTTRIANGLE:
|
||||
$c[]=$x;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+2*$dy;
|
||||
$c[]=$x+$dx*2;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y;
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_RIGHTTRIANGLE:
|
||||
$c[]=$x-$dx*2;$c[]=$y;
|
||||
$c[]=$x;$c[]=$y+2*$dy;
|
||||
$c[]=$x;$c[]=$y;
|
||||
$c[]=$x-$dx*2;$c[]=$y;
|
||||
$pts=4;
|
||||
break;
|
||||
case MARK_FLASH:
|
||||
$dy *= 2;
|
||||
$c[]=$x+$dx/2; $c[]=$y-$dy;
|
||||
$c[]=$x-$dx+$dx/2; $c[]=$y+$dy*0.7-$dy;
|
||||
$c[]=$x+$dx/2; $c[]=$y+$dy*1.3-$dy;
|
||||
$c[]=$x-$dx+$dx/2; $c[]=$y+2*$dy-$dy;
|
||||
$img->SetLineWeight($weight);
|
||||
$img->SetColor($color);
|
||||
$img->Polygon($c);
|
||||
$img->SetLineWeight(1);
|
||||
$this->AddCSIMPoly($c);
|
||||
break;
|
||||
}
|
||||
|
||||
if( $pts>0 ) {
|
||||
$this->AddCSIMPoly($c);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->SetColor($fcolor);
|
||||
$img->FilledPolygon($c);
|
||||
$img->SetColor($color);
|
||||
$img->Polygon($c);
|
||||
$img->SetLineWeight(1);
|
||||
}
|
||||
elseif( $this->type==MARK_CIRCLE ) {
|
||||
$img->SetColor($color);
|
||||
$img->Circle($x,$y,$width);
|
||||
$this->AddCSIMCircle($x,$y,$width);
|
||||
}
|
||||
elseif( $this->type==MARK_FILLEDCIRCLE ) {
|
||||
$img->SetColor($fcolor);
|
||||
$img->FilledCircle($x,$y,$width);
|
||||
$img->SetColor($color);
|
||||
$img->Circle($x,$y,$width);
|
||||
$this->AddCSIMCircle($x,$y,$width);
|
||||
}
|
||||
elseif( $this->type==MARK_CROSS ) {
|
||||
// Oversize by a pixel to match the X
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x,$y+$dy+1,$x,$y-$dy-1);
|
||||
$img->Line($x-$dx-1,$y,$x+$dx+1,$y);
|
||||
$this->AddCSIMCircle($x,$y,$dx);
|
||||
}
|
||||
elseif( $this->type==MARK_X ) {
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy);
|
||||
$img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy);
|
||||
$this->AddCSIMCircle($x,$y,$dx+$dy);
|
||||
}
|
||||
elseif( $this->type==MARK_STAR ) {
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy);
|
||||
$img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy);
|
||||
// Oversize by a pixel to match the X
|
||||
$img->Line($x,$y+$dy+1,$x,$y-$dy-1);
|
||||
$img->Line($x-$dx-1,$y,$x+$dx+1,$y);
|
||||
$this->AddCSIMCircle($x,$y,$dx+$dy);
|
||||
}
|
||||
if( $pts>0 ) {
|
||||
$this->AddCSIMPoly($c);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->SetColor($fcolor);
|
||||
$img->FilledPolygon($c);
|
||||
$img->SetColor($color);
|
||||
$img->Polygon($c);
|
||||
$img->SetLineWeight(1);
|
||||
}
|
||||
elseif( $this->type==MARK_CIRCLE ) {
|
||||
$img->SetColor($color);
|
||||
$img->Circle($x,$y,$width);
|
||||
$this->AddCSIMCircle($x,$y,$width);
|
||||
}
|
||||
elseif( $this->type==MARK_FILLEDCIRCLE ) {
|
||||
$img->SetColor($fcolor);
|
||||
$img->FilledCircle($x,$y,$width);
|
||||
$img->SetColor($color);
|
||||
$img->Circle($x,$y,$width);
|
||||
$this->AddCSIMCircle($x,$y,$width);
|
||||
}
|
||||
elseif( $this->type==MARK_CROSS ) {
|
||||
// Oversize by a pixel to match the X
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x,$y+$dy+1,$x,$y-$dy-1);
|
||||
$img->Line($x-$dx-1,$y,$x+$dx+1,$y);
|
||||
$this->AddCSIMCircle($x,$y,$dx);
|
||||
}
|
||||
elseif( $this->type==MARK_X ) {
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy);
|
||||
$img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy);
|
||||
$this->AddCSIMCircle($x,$y,$dx+$dy);
|
||||
}
|
||||
elseif( $this->type==MARK_STAR ) {
|
||||
$img->SetColor($color);
|
||||
$img->SetLineWeight($weight);
|
||||
$img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy);
|
||||
$img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy);
|
||||
// Oversize by a pixel to match the X
|
||||
$img->Line($x,$y+$dy+1,$x,$y-$dy-1);
|
||||
$img->Line($x-$dx-1,$y,$x+$dx+1,$y);
|
||||
$this->AddCSIMCircle($x,$y,$dx+$dy);
|
||||
}
|
||||
|
||||
// Stroke title
|
||||
$this->title->Align("center","center");
|
||||
$this->title->Stroke($img,$x,$y);
|
||||
// Stroke title
|
||||
$this->title->Align("center","center");
|
||||
$this->title->Stroke($img,$x,$y);
|
||||
}
|
||||
} // Class
|
||||
|
||||
@ -444,53 +444,60 @@ class PlotMark {
|
||||
// real image data.
|
||||
//========================================================================
|
||||
class ImgData {
|
||||
protected $name = ''; // Each subclass gives a name
|
||||
protected $an = array(); // Data array names
|
||||
protected $colors = array(); // Available colors
|
||||
protected $index = array(); // Index for colors
|
||||
protected $maxidx = 0 ; // Max color index
|
||||
protected $name = ''; // Each subclass gives a name
|
||||
protected $an = array(); // Data array names
|
||||
protected $colors = array(); // Available colors
|
||||
protected $index = array(); // Index for colors
|
||||
protected $maxidx = 0 ; // Max color index
|
||||
protected $anchor_x=0.5, $anchor_y=0.5 ; // Where is the center of the image
|
||||
|
||||
function __construct() {
|
||||
// Empty
|
||||
}
|
||||
|
||||
// Create a GD image from the data and return a GD handle
|
||||
function GetImg($aMark,$aIdx) {
|
||||
$n = $this->an[$aMark];
|
||||
if( is_string($aIdx) ) {
|
||||
if( !in_array($aIdx,$this->colors) ) {
|
||||
JpGraphError::RaiseL(23001,$this->name,$aIdx);//('This marker "'.($this->name).'" does not exist in color: '.$aIdx);
|
||||
}
|
||||
$idx = $this->index[$aIdx];
|
||||
}
|
||||
elseif( !is_integer($aIdx) ||
|
||||
(is_integer($aIdx) && $aIdx > $this->maxidx ) ) {
|
||||
JpGraphError::RaiseL(23002,$this->name);//('Mark color index too large for marker "'.($this->name).'"');
|
||||
}
|
||||
else
|
||||
$idx = $aIdx ;
|
||||
return Image::CreateFromString(base64_decode($this->{$n}[$idx][1]));
|
||||
$n = $this->an[$aMark];
|
||||
if( is_string($aIdx) ) {
|
||||
if( !in_array($aIdx,$this->colors) ) {
|
||||
JpGraphError::RaiseL(23001,$this->name,$aIdx);//('This marker "'.($this->name).'" does not exist in color: '.$aIdx);
|
||||
}
|
||||
$idx = $this->index[$aIdx];
|
||||
}
|
||||
elseif( !is_integer($aIdx) ||
|
||||
(is_integer($aIdx) && $aIdx > $this->maxidx ) ) {
|
||||
JpGraphError::RaiseL(23002,$this->name);//('Mark color index too large for marker "'.($this->name).'"');
|
||||
}
|
||||
else
|
||||
$idx = $aIdx ;
|
||||
return Image::CreateFromString(base64_decode($this->{$n}[$idx][1]));
|
||||
}
|
||||
|
||||
function GetAnchor() {
|
||||
return array($this->anchor_x,$this->anchor_y);
|
||||
return array($this->anchor_x,$this->anchor_y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Keep a global flag cache to reduce memory usage
|
||||
$_gFlagCache=array(
|
||||
1 => null,
|
||||
2 => null,
|
||||
3 => null,
|
||||
4 => null,
|
||||
1 => null,
|
||||
2 => null,
|
||||
3 => null,
|
||||
4 => null,
|
||||
);
|
||||
// Only supposed to b called as statics
|
||||
class FlagCache {
|
||||
|
||||
static function GetFlagImgByName($aSize,$aName) {
|
||||
global $_gFlagCache;
|
||||
require_once('jpgraph_flags.php');
|
||||
if( $_gFlagCache[$aSize] === null ) {
|
||||
$_gFlagCache[$aSize] = new FlagImages($aSize);
|
||||
}
|
||||
$f = $_gFlagCache[$aSize];
|
||||
$idx = $f->GetIdxByName($aName,$aFullName);
|
||||
return $f->GetImgByIdx($idx);
|
||||
global $_gFlagCache;
|
||||
require_once('jpgraph_flags.php');
|
||||
if( $_gFlagCache[$aSize] === null ) {
|
||||
$_gFlagCache[$aSize] = new FlagImages($aSize);
|
||||
}
|
||||
$f = $_gFlagCache[$aSize];
|
||||
$idx = $f->GetIdxByName($aName,$aFullName);
|
||||
return $f->GetImgByIdx($idx);
|
||||
}
|
||||
}
|
||||
|
||||
|
628
src/classes/jpgraph/jpgraph_rgb.inc.php
Normal file
628
src/classes/jpgraph/jpgraph_rgb.inc.php
Normal file
@ -0,0 +1,628 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_RGB.INC.PHP
|
||||
// Description: Class to handle RGb color space specification and
|
||||
// named colors
|
||||
// Created: 2001-01-08 (Refactored to separate file 2008-08-01)
|
||||
// Ver: $Id: jpgraph_rgb.inc.php 1740 2009-07-30 22:09:36Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
/*===================================================
|
||||
// CLASS RGB
|
||||
// Description: Color definitions as RGB triples
|
||||
//===================================================
|
||||
*/
|
||||
|
||||
class RGB {
|
||||
public $rgb_table;
|
||||
public $img;
|
||||
|
||||
function __construct($aImg=null) {
|
||||
$this->img = $aImg;
|
||||
|
||||
// Conversion array between color names and RGB
|
||||
$this->rgb_table = array(
|
||||
'aqua'=> array(0,255,255),
|
||||
'lime'=> array(0,255,0),
|
||||
'teal'=> array(0,128,128),
|
||||
'whitesmoke'=>array(245,245,245),
|
||||
'gainsboro'=>array(220,220,220),
|
||||
'oldlace'=>array(253,245,230),
|
||||
'linen'=>array(250,240,230),
|
||||
'antiquewhite'=>array(250,235,215),
|
||||
'papayawhip'=>array(255,239,213),
|
||||
'blanchedalmond'=>array(255,235,205),
|
||||
'bisque'=>array(255,228,196),
|
||||
'peachpuff'=>array(255,218,185),
|
||||
'navajowhite'=>array(255,222,173),
|
||||
'moccasin'=>array(255,228,181),
|
||||
'cornsilk'=>array(255,248,220),
|
||||
'ivory'=>array(255,255,240),
|
||||
'lemonchiffon'=>array(255,250,205),
|
||||
'seashell'=>array(255,245,238),
|
||||
'mintcream'=>array(245,255,250),
|
||||
'azure'=>array(240,255,255),
|
||||
'aliceblue'=>array(240,248,255),
|
||||
'lavender'=>array(230,230,250),
|
||||
'lavenderblush'=>array(255,240,245),
|
||||
'mistyrose'=>array(255,228,225),
|
||||
'white'=>array(255,255,255),
|
||||
'black'=>array(0,0,0),
|
||||
'darkslategray'=>array(47,79,79),
|
||||
'dimgray'=>array(105,105,105),
|
||||
'slategray'=>array(112,128,144),
|
||||
'lightslategray'=>array(119,136,153),
|
||||
'gray'=>array(190,190,190),
|
||||
'lightgray'=>array(211,211,211),
|
||||
'midnightblue'=>array(25,25,112),
|
||||
'navy'=>array(0,0,128),
|
||||
'indigo'=>array(75,0,130),
|
||||
'electricindigo'=>array(102,0,255),
|
||||
'deepindigo'=>array(138,43,226),
|
||||
'pigmentindigo'=>array(75,0,130),
|
||||
'indigodye'=>array(0,65,106),
|
||||
'cornflowerblue'=>array(100,149,237),
|
||||
'darkslateblue'=>array(72,61,139),
|
||||
'slateblue'=>array(106,90,205),
|
||||
'mediumslateblue'=>array(123,104,238),
|
||||
'lightslateblue'=>array(132,112,255),
|
||||
'mediumblue'=>array(0,0,205),
|
||||
'royalblue'=>array(65,105,225),
|
||||
'blue'=>array(0,0,255),
|
||||
'dodgerblue'=>array(30,144,255),
|
||||
'deepskyblue'=>array(0,191,255),
|
||||
'skyblue'=>array(135,206,235),
|
||||
'lightskyblue'=>array(135,206,250),
|
||||
'steelblue'=>array(70,130,180),
|
||||
'lightred'=>array(211,167,168),
|
||||
'lightsteelblue'=>array(176,196,222),
|
||||
'lightblue'=>array(173,216,230),
|
||||
'powderblue'=>array(176,224,230),
|
||||
'paleturquoise'=>array(175,238,238),
|
||||
'darkturquoise'=>array(0,206,209),
|
||||
'mediumturquoise'=>array(72,209,204),
|
||||
'turquoise'=>array(64,224,208),
|
||||
'cyan'=>array(0,255,255),
|
||||
'lightcyan'=>array(224,255,255),
|
||||
'cadetblue'=>array(95,158,160),
|
||||
'mediumaquamarine'=>array(102,205,170),
|
||||
'aquamarine'=>array(127,255,212),
|
||||
'darkgreen'=>array(0,100,0),
|
||||
'darkolivegreen'=>array(85,107,47),
|
||||
'darkseagreen'=>array(143,188,143),
|
||||
'seagreen'=>array(46,139,87),
|
||||
'mediumseagreen'=>array(60,179,113),
|
||||
'lightseagreen'=>array(32,178,170),
|
||||
'palegreen'=>array(152,251,152),
|
||||
'springgreen'=>array(0,255,127),
|
||||
'lawngreen'=>array(124,252,0),
|
||||
'green'=>array(0,255,0),
|
||||
'chartreuse'=>array(127,255,0),
|
||||
'mediumspringgreen'=>array(0,250,154),
|
||||
'greenyellow'=>array(173,255,47),
|
||||
'limegreen'=>array(50,205,50),
|
||||
'yellowgreen'=>array(154,205,50),
|
||||
'forestgreen'=>array(34,139,34),
|
||||
'olivedrab'=>array(107,142,35),
|
||||
'darkkhaki'=>array(189,183,107),
|
||||
'khaki'=>array(240,230,140),
|
||||
'palegoldenrod'=>array(238,232,170),
|
||||
'lightgoldenrodyellow'=>array(250,250,210),
|
||||
'lightyellow'=>array(255,255,200),
|
||||
'yellow'=>array(255,255,0),
|
||||
'gold'=>array(255,215,0),
|
||||
'lightgoldenrod'=>array(238,221,130),
|
||||
'goldenrod'=>array(218,165,32),
|
||||
'darkgoldenrod'=>array(184,134,11),
|
||||
'rosybrown'=>array(188,143,143),
|
||||
'indianred'=>array(205,92,92),
|
||||
'saddlebrown'=>array(139,69,19),
|
||||
'sienna'=>array(160,82,45),
|
||||
'peru'=>array(205,133,63),
|
||||
'burlywood'=>array(222,184,135),
|
||||
'beige'=>array(245,245,220),
|
||||
'wheat'=>array(245,222,179),
|
||||
'sandybrown'=>array(244,164,96),
|
||||
'tan'=>array(210,180,140),
|
||||
'chocolate'=>array(210,105,30),
|
||||
'firebrick'=>array(178,34,34),
|
||||
'brown'=>array(165,42,42),
|
||||
'darksalmon'=>array(233,150,122),
|
||||
'salmon'=>array(250,128,114),
|
||||
'lightsalmon'=>array(255,160,122),
|
||||
'orange'=>array(255,165,0),
|
||||
'darkorange'=>array(255,140,0),
|
||||
'coral'=>array(255,127,80),
|
||||
'lightcoral'=>array(240,128,128),
|
||||
'tomato'=>array(255,99,71),
|
||||
'orangered'=>array(255,69,0),
|
||||
'red'=>array(255,0,0),
|
||||
'hotpink'=>array(255,105,180),
|
||||
'deeppink'=>array(255,20,147),
|
||||
'pink'=>array(255,192,203),
|
||||
'lightpink'=>array(255,182,193),
|
||||
'palevioletred'=>array(219,112,147),
|
||||
'maroon'=>array(176,48,96),
|
||||
'mediumvioletred'=>array(199,21,133),
|
||||
'violetred'=>array(208,32,144),
|
||||
'magenta'=>array(255,0,255),
|
||||
'violet'=>array(238,130,238),
|
||||
'plum'=>array(221,160,221),
|
||||
'orchid'=>array(218,112,214),
|
||||
'mediumorchid'=>array(186,85,211),
|
||||
'darkorchid'=>array(153,50,204),
|
||||
'darkviolet'=>array(148,0,211),
|
||||
'blueviolet'=>array(138,43,226),
|
||||
'purple'=>array(160,32,240),
|
||||
'mediumpurple'=>array(147,112,219),
|
||||
'thistle'=>array(216,191,216),
|
||||
'snow1'=>array(255,250,250),
|
||||
'snow2'=>array(238,233,233),
|
||||
'snow3'=>array(205,201,201),
|
||||
'snow4'=>array(139,137,137),
|
||||
'seashell1'=>array(255,245,238),
|
||||
'seashell2'=>array(238,229,222),
|
||||
'seashell3'=>array(205,197,191),
|
||||
'seashell4'=>array(139,134,130),
|
||||
'AntiqueWhite1'=>array(255,239,219),
|
||||
'AntiqueWhite2'=>array(238,223,204),
|
||||
'AntiqueWhite3'=>array(205,192,176),
|
||||
'AntiqueWhite4'=>array(139,131,120),
|
||||
'bisque1'=>array(255,228,196),
|
||||
'bisque2'=>array(238,213,183),
|
||||
'bisque3'=>array(205,183,158),
|
||||
'bisque4'=>array(139,125,107),
|
||||
'peachPuff1'=>array(255,218,185),
|
||||
'peachpuff2'=>array(238,203,173),
|
||||
'peachpuff3'=>array(205,175,149),
|
||||
'peachpuff4'=>array(139,119,101),
|
||||
'navajowhite1'=>array(255,222,173),
|
||||
'navajowhite2'=>array(238,207,161),
|
||||
'navajowhite3'=>array(205,179,139),
|
||||
'navajowhite4'=>array(139,121,94),
|
||||
'lemonchiffon1'=>array(255,250,205),
|
||||
'lemonchiffon2'=>array(238,233,191),
|
||||
'lemonchiffon3'=>array(205,201,165),
|
||||
'lemonchiffon4'=>array(139,137,112),
|
||||
'ivory1'=>array(255,255,240),
|
||||
'ivory2'=>array(238,238,224),
|
||||
'ivory3'=>array(205,205,193),
|
||||
'ivory4'=>array(139,139,131),
|
||||
'honeydew'=>array(193,205,193),
|
||||
'lavenderblush1'=>array(255,240,245),
|
||||
'lavenderblush2'=>array(238,224,229),
|
||||
'lavenderblush3'=>array(205,193,197),
|
||||
'lavenderblush4'=>array(139,131,134),
|
||||
'mistyrose1'=>array(255,228,225),
|
||||
'mistyrose2'=>array(238,213,210),
|
||||
'mistyrose3'=>array(205,183,181),
|
||||
'mistyrose4'=>array(139,125,123),
|
||||
'azure1'=>array(240,255,255),
|
||||
'azure2'=>array(224,238,238),
|
||||
'azure3'=>array(193,205,205),
|
||||
'azure4'=>array(131,139,139),
|
||||
'slateblue1'=>array(131,111,255),
|
||||
'slateblue2'=>array(122,103,238),
|
||||
'slateblue3'=>array(105,89,205),
|
||||
'slateblue4'=>array(71,60,139),
|
||||
'royalblue1'=>array(72,118,255),
|
||||
'royalblue2'=>array(67,110,238),
|
||||
'royalblue3'=>array(58,95,205),
|
||||
'royalblue4'=>array(39,64,139),
|
||||
'dodgerblue1'=>array(30,144,255),
|
||||
'dodgerblue2'=>array(28,134,238),
|
||||
'dodgerblue3'=>array(24,116,205),
|
||||
'dodgerblue4'=>array(16,78,139),
|
||||
'steelblue1'=>array(99,184,255),
|
||||
'steelblue2'=>array(92,172,238),
|
||||
'steelblue3'=>array(79,148,205),
|
||||
'steelblue4'=>array(54,100,139),
|
||||
'deepskyblue1'=>array(0,191,255),
|
||||
'deepskyblue2'=>array(0,178,238),
|
||||
'deepskyblue3'=>array(0,154,205),
|
||||
'deepskyblue4'=>array(0,104,139),
|
||||
'skyblue1'=>array(135,206,255),
|
||||
'skyblue2'=>array(126,192,238),
|
||||
'skyblue3'=>array(108,166,205),
|
||||
'skyblue4'=>array(74,112,139),
|
||||
'lightskyblue1'=>array(176,226,255),
|
||||
'lightskyblue2'=>array(164,211,238),
|
||||
'lightskyblue3'=>array(141,182,205),
|
||||
'lightskyblue4'=>array(96,123,139),
|
||||
'slategray1'=>array(198,226,255),
|
||||
'slategray2'=>array(185,211,238),
|
||||
'slategray3'=>array(159,182,205),
|
||||
'slategray4'=>array(108,123,139),
|
||||
'lightsteelblue1'=>array(202,225,255),
|
||||
'lightsteelblue2'=>array(188,210,238),
|
||||
'lightsteelblue3'=>array(162,181,205),
|
||||
'lightsteelblue4'=>array(110,123,139),
|
||||
'lightblue1'=>array(191,239,255),
|
||||
'lightblue2'=>array(178,223,238),
|
||||
'lightblue3'=>array(154,192,205),
|
||||
'lightblue4'=>array(104,131,139),
|
||||
'lightcyan1'=>array(224,255,255),
|
||||
'lightcyan2'=>array(209,238,238),
|
||||
'lightcyan3'=>array(180,205,205),
|
||||
'lightcyan4'=>array(122,139,139),
|
||||
'paleturquoise1'=>array(187,255,255),
|
||||
'paleturquoise2'=>array(174,238,238),
|
||||
'paleturquoise3'=>array(150,205,205),
|
||||
'paleturquoise4'=>array(102,139,139),
|
||||
'cadetblue1'=>array(152,245,255),
|
||||
'cadetblue2'=>array(142,229,238),
|
||||
'cadetblue3'=>array(122,197,205),
|
||||
'cadetblue4'=>array(83,134,139),
|
||||
'turquoise1'=>array(0,245,255),
|
||||
'turquoise2'=>array(0,229,238),
|
||||
'turquoise3'=>array(0,197,205),
|
||||
'turquoise4'=>array(0,134,139),
|
||||
'cyan1'=>array(0,255,255),
|
||||
'cyan2'=>array(0,238,238),
|
||||
'cyan3'=>array(0,205,205),
|
||||
'cyan4'=>array(0,139,139),
|
||||
'darkslategray1'=>array(151,255,255),
|
||||
'darkslategray2'=>array(141,238,238),
|
||||
'darkslategray3'=>array(121,205,205),
|
||||
'darkslategray4'=>array(82,139,139),
|
||||
'aquamarine1'=>array(127,255,212),
|
||||
'aquamarine2'=>array(118,238,198),
|
||||
'aquamarine3'=>array(102,205,170),
|
||||
'aquamarine4'=>array(69,139,116),
|
||||
'darkseagreen1'=>array(193,255,193),
|
||||
'darkseagreen2'=>array(180,238,180),
|
||||
'darkseagreen3'=>array(155,205,155),
|
||||
'darkseagreen4'=>array(105,139,105),
|
||||
'seagreen1'=>array(84,255,159),
|
||||
'seagreen2'=>array(78,238,148),
|
||||
'seagreen3'=>array(67,205,128),
|
||||
'seagreen4'=>array(46,139,87),
|
||||
'palegreen1'=>array(154,255,154),
|
||||
'palegreen2'=>array(144,238,144),
|
||||
'palegreen3'=>array(124,205,124),
|
||||
'palegreen4'=>array(84,139,84),
|
||||
'springgreen1'=>array(0,255,127),
|
||||
'springgreen2'=>array(0,238,118),
|
||||
'springgreen3'=>array(0,205,102),
|
||||
'springgreen4'=>array(0,139,69),
|
||||
'chartreuse1'=>array(127,255,0),
|
||||
'chartreuse2'=>array(118,238,0),
|
||||
'chartreuse3'=>array(102,205,0),
|
||||
'chartreuse4'=>array(69,139,0),
|
||||
'olivedrab1'=>array(192,255,62),
|
||||
'olivedrab2'=>array(179,238,58),
|
||||
'olivedrab3'=>array(154,205,50),
|
||||
'olivedrab4'=>array(105,139,34),
|
||||
'darkolivegreen1'=>array(202,255,112),
|
||||
'darkolivegreen2'=>array(188,238,104),
|
||||
'darkolivegreen3'=>array(162,205,90),
|
||||
'darkolivegreen4'=>array(110,139,61),
|
||||
'khaki1'=>array(255,246,143),
|
||||
'khaki2'=>array(238,230,133),
|
||||
'khaki3'=>array(205,198,115),
|
||||
'khaki4'=>array(139,134,78),
|
||||
'lightgoldenrod1'=>array(255,236,139),
|
||||
'lightgoldenrod2'=>array(238,220,130),
|
||||
'lightgoldenrod3'=>array(205,190,112),
|
||||
'lightgoldenrod4'=>array(139,129,76),
|
||||
'yellow1'=>array(255,255,0),
|
||||
'yellow2'=>array(238,238,0),
|
||||
'yellow3'=>array(205,205,0),
|
||||
'yellow4'=>array(139,139,0),
|
||||
'gold1'=>array(255,215,0),
|
||||
'gold2'=>array(238,201,0),
|
||||
'gold3'=>array(205,173,0),
|
||||
'gold4'=>array(139,117,0),
|
||||
'goldenrod1'=>array(255,193,37),
|
||||
'goldenrod2'=>array(238,180,34),
|
||||
'goldenrod3'=>array(205,155,29),
|
||||
'goldenrod4'=>array(139,105,20),
|
||||
'darkgoldenrod1'=>array(255,185,15),
|
||||
'darkgoldenrod2'=>array(238,173,14),
|
||||
'darkgoldenrod3'=>array(205,149,12),
|
||||
'darkgoldenrod4'=>array(139,101,8),
|
||||
'rosybrown1'=>array(255,193,193),
|
||||
'rosybrown2'=>array(238,180,180),
|
||||
'rosybrown3'=>array(205,155,155),
|
||||
'rosybrown4'=>array(139,105,105),
|
||||
'indianred1'=>array(255,106,106),
|
||||
'indianred2'=>array(238,99,99),
|
||||
'indianred3'=>array(205,85,85),
|
||||
'indianred4'=>array(139,58,58),
|
||||
'sienna1'=>array(255,130,71),
|
||||
'sienna2'=>array(238,121,66),
|
||||
'sienna3'=>array(205,104,57),
|
||||
'sienna4'=>array(139,71,38),
|
||||
'burlywood1'=>array(255,211,155),
|
||||
'burlywood2'=>array(238,197,145),
|
||||
'burlywood3'=>array(205,170,125),
|
||||
'burlywood4'=>array(139,115,85),
|
||||
'wheat1'=>array(255,231,186),
|
||||
'wheat2'=>array(238,216,174),
|
||||
'wheat3'=>array(205,186,150),
|
||||
'wheat4'=>array(139,126,102),
|
||||
'tan1'=>array(255,165,79),
|
||||
'tan2'=>array(238,154,73),
|
||||
'tan3'=>array(205,133,63),
|
||||
'tan4'=>array(139,90,43),
|
||||
'chocolate1'=>array(255,127,36),
|
||||
'chocolate2'=>array(238,118,33),
|
||||
'chocolate3'=>array(205,102,29),
|
||||
'chocolate4'=>array(139,69,19),
|
||||
'firebrick1'=>array(255,48,48),
|
||||
'firebrick2'=>array(238,44,44),
|
||||
'firebrick3'=>array(205,38,38),
|
||||
'firebrick4'=>array(139,26,26),
|
||||
'brown1'=>array(255,64,64),
|
||||
'brown2'=>array(238,59,59),
|
||||
'brown3'=>array(205,51,51),
|
||||
'brown4'=>array(139,35,35),
|
||||
'salmon1'=>array(255,140,105),
|
||||
'salmon2'=>array(238,130,98),
|
||||
'salmon3'=>array(205,112,84),
|
||||
'salmon4'=>array(139,76,57),
|
||||
'lightsalmon1'=>array(255,160,122),
|
||||
'lightsalmon2'=>array(238,149,114),
|
||||
'lightsalmon3'=>array(205,129,98),
|
||||
'lightsalmon4'=>array(139,87,66),
|
||||
'orange1'=>array(255,165,0),
|
||||
'orange2'=>array(238,154,0),
|
||||
'orange3'=>array(205,133,0),
|
||||
'orange4'=>array(139,90,0),
|
||||
'darkorange1'=>array(255,127,0),
|
||||
'darkorange2'=>array(238,118,0),
|
||||
'darkorange3'=>array(205,102,0),
|
||||
'darkorange4'=>array(139,69,0),
|
||||
'coral1'=>array(255,114,86),
|
||||
'coral2'=>array(238,106,80),
|
||||
'coral3'=>array(205,91,69),
|
||||
'coral4'=>array(139,62,47),
|
||||
'tomato1'=>array(255,99,71),
|
||||
'tomato2'=>array(238,92,66),
|
||||
'tomato3'=>array(205,79,57),
|
||||
'tomato4'=>array(139,54,38),
|
||||
'orangered1'=>array(255,69,0),
|
||||
'orangered2'=>array(238,64,0),
|
||||
'orangered3'=>array(205,55,0),
|
||||
'orangered4'=>array(139,37,0),
|
||||
'deeppink1'=>array(255,20,147),
|
||||
'deeppink2'=>array(238,18,137),
|
||||
'deeppink3'=>array(205,16,118),
|
||||
'deeppink4'=>array(139,10,80),
|
||||
'hotpink1'=>array(255,110,180),
|
||||
'hotpink2'=>array(238,106,167),
|
||||
'hotpink3'=>array(205,96,144),
|
||||
'hotpink4'=>array(139,58,98),
|
||||
'pink1'=>array(255,181,197),
|
||||
'pink2'=>array(238,169,184),
|
||||
'pink3'=>array(205,145,158),
|
||||
'pink4'=>array(139,99,108),
|
||||
'lightpink1'=>array(255,174,185),
|
||||
'lightpink2'=>array(238,162,173),
|
||||
'lightpink3'=>array(205,140,149),
|
||||
'lightpink4'=>array(139,95,101),
|
||||
'palevioletred1'=>array(255,130,171),
|
||||
'palevioletred2'=>array(238,121,159),
|
||||
'palevioletred3'=>array(205,104,137),
|
||||
'palevioletred4'=>array(139,71,93),
|
||||
'maroon1'=>array(255,52,179),
|
||||
'maroon2'=>array(238,48,167),
|
||||
'maroon3'=>array(205,41,144),
|
||||
'maroon4'=>array(139,28,98),
|
||||
'violetred1'=>array(255,62,150),
|
||||
'violetred2'=>array(238,58,140),
|
||||
'violetred3'=>array(205,50,120),
|
||||
'violetred4'=>array(139,34,82),
|
||||
'magenta1'=>array(255,0,255),
|
||||
'magenta2'=>array(238,0,238),
|
||||
'magenta3'=>array(205,0,205),
|
||||
'magenta4'=>array(139,0,139),
|
||||
'mediumred'=>array(140,34,34),
|
||||
'orchid1'=>array(255,131,250),
|
||||
'orchid2'=>array(238,122,233),
|
||||
'orchid3'=>array(205,105,201),
|
||||
'orchid4'=>array(139,71,137),
|
||||
'plum1'=>array(255,187,255),
|
||||
'plum2'=>array(238,174,238),
|
||||
'plum3'=>array(205,150,205),
|
||||
'plum4'=>array(139,102,139),
|
||||
'mediumorchid1'=>array(224,102,255),
|
||||
'mediumorchid2'=>array(209,95,238),
|
||||
'mediumorchid3'=>array(180,82,205),
|
||||
'mediumorchid4'=>array(122,55,139),
|
||||
'darkorchid1'=>array(191,62,255),
|
||||
'darkorchid2'=>array(178,58,238),
|
||||
'darkorchid3'=>array(154,50,205),
|
||||
'darkorchid4'=>array(104,34,139),
|
||||
'purple1'=>array(155,48,255),
|
||||
'purple2'=>array(145,44,238),
|
||||
'purple3'=>array(125,38,205),
|
||||
'purple4'=>array(85,26,139),
|
||||
'mediumpurple1'=>array(171,130,255),
|
||||
'mediumpurple2'=>array(159,121,238),
|
||||
'mediumpurple3'=>array(137,104,205),
|
||||
'mediumpurple4'=>array(93,71,139),
|
||||
'thistle1'=>array(255,225,255),
|
||||
'thistle2'=>array(238,210,238),
|
||||
'thistle3'=>array(205,181,205),
|
||||
'thistle4'=>array(139,123,139),
|
||||
'gray1'=>array(10,10,10),
|
||||
'gray2'=>array(40,40,30),
|
||||
'gray3'=>array(70,70,70),
|
||||
'gray4'=>array(100,100,100),
|
||||
'gray5'=>array(130,130,130),
|
||||
'gray6'=>array(160,160,160),
|
||||
'gray7'=>array(190,190,190),
|
||||
'gray8'=>array(210,210,210),
|
||||
'gray9'=>array(240,240,240),
|
||||
'darkgray'=>array(100,100,100),
|
||||
'darkblue'=>array(0,0,139),
|
||||
'darkcyan'=>array(0,139,139),
|
||||
'darkmagenta'=>array(139,0,139),
|
||||
'darkred'=>array(139,0,0),
|
||||
'silver'=>array(192, 192, 192),
|
||||
'eggplant'=>array(144,176,168),
|
||||
'lightgreen'=>array(144,238,144));
|
||||
}
|
||||
//----------------
|
||||
// PUBLIC METHODS
|
||||
// Colors can be specified as either
|
||||
// 1. #xxxxxx HTML style
|
||||
// 2. "colorname" as a named color
|
||||
// 3. array(r,g,b) RGB triple
|
||||
// This function translates this to a native RGB format and returns an
|
||||
// RGB triple.
|
||||
function Color($aColor) {
|
||||
if (is_string($aColor)) {
|
||||
// Strip of any alpha factor
|
||||
$pos = strpos($aColor,'@');
|
||||
if( $pos === false ) {
|
||||
$alpha = 0;
|
||||
}
|
||||
else {
|
||||
$pos2 = strpos($aColor,':');
|
||||
if( $pos2===false )
|
||||
$pos2 = $pos-1; // Sentinel
|
||||
if( $pos > $pos2 ) {
|
||||
$alpha = str_replace(',','.',substr($aColor,$pos+1));
|
||||
$aColor = substr($aColor,0,$pos);
|
||||
}
|
||||
else {
|
||||
$alpha = substr($aColor,$pos+1,$pos2-$pos-1);
|
||||
$aColor = substr($aColor,0,$pos).substr($aColor,$pos2);
|
||||
}
|
||||
}
|
||||
|
||||
// Extract potential adjustment figure at end of color
|
||||
// specification
|
||||
$pos = strpos($aColor,":");
|
||||
if( $pos === false ) {
|
||||
$adj = 1.0;
|
||||
}
|
||||
else {
|
||||
$adj = 0.0 + str_replace(',','.',substr($aColor,$pos+1));
|
||||
$aColor = substr($aColor,0,$pos);
|
||||
}
|
||||
if( $adj < 0 ) {
|
||||
JpGraphError::RaiseL(25077);//('Adjustment factor for color must be > 0');
|
||||
}
|
||||
|
||||
if (substr($aColor, 0, 1) == "#") {
|
||||
$r = hexdec(substr($aColor, 1, 2));
|
||||
$g = hexdec(substr($aColor, 3, 2));
|
||||
$b = hexdec(substr($aColor, 5, 2));
|
||||
} else {
|
||||
if(!isset($this->rgb_table[$aColor]) ) {
|
||||
JpGraphError::RaiseL(25078,$aColor);//(" Unknown color: $aColor");
|
||||
}
|
||||
$tmp=$this->rgb_table[$aColor];
|
||||
$r = $tmp[0];
|
||||
$g = $tmp[1];
|
||||
$b = $tmp[2];
|
||||
}
|
||||
// Scale adj so that an adj=2 always
|
||||
// makes the color 100% white (i.e. 255,255,255.
|
||||
// and adj=1 neutral and adj=0 black.
|
||||
if( $adj > 1 ) {
|
||||
$m = ($adj-1.0)*(255-min(255,min($r,min($g,$b))));
|
||||
return array(min(255,$r+$m), min(255,$g+$m), min(255,$b+$m),$alpha);
|
||||
}
|
||||
elseif( $adj < 1 ) {
|
||||
$m = ($adj-1.0)*max(255,max($r,max($g,$b)));
|
||||
return array(max(0,$r+$m), max(0,$g+$m), max(0,$b+$m),$alpha);
|
||||
}
|
||||
else {
|
||||
return array($r,$g,$b,$alpha);
|
||||
}
|
||||
|
||||
} elseif( is_array($aColor) ) {
|
||||
if( count($aColor)==3 ) {
|
||||
$aColor[3]=0;
|
||||
return $aColor;
|
||||
}
|
||||
else
|
||||
return $aColor;
|
||||
}
|
||||
else {
|
||||
JpGraphError::RaiseL(25079,$aColor,count($aColor));//(" Unknown color specification: $aColor , size=".count($aColor));
|
||||
}
|
||||
}
|
||||
|
||||
// Compare two colors
|
||||
// return true if equal
|
||||
function Equal($aCol1,$aCol2) {
|
||||
$c1 = $this->Color($aCol1);
|
||||
$c2 = $this->Color($aCol2);
|
||||
if( $c1[0]==$c2[0] && $c1[1]==$c2[1] && $c1[2]==$c2[2] ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate a new color in the current image
|
||||
// Return new color index, -1 if no more colors could be allocated
|
||||
function Allocate($aColor,$aAlpha=0.0) {
|
||||
list ($r, $g, $b, $a) = $this->color($aColor);
|
||||
// If alpha is specified in the color string then this
|
||||
// takes precedence over the second argument
|
||||
if( $a > 0 ) {
|
||||
$aAlpha = $a;
|
||||
}
|
||||
if( $aAlpha < 0 || $aAlpha > 1 ) {
|
||||
JpGraphError::RaiseL(25080);//('Alpha parameter for color must be between 0.0 and 1.0');
|
||||
}
|
||||
return imagecolorresolvealpha($this->img, $r, $g, $b, round($aAlpha * 127));
|
||||
}
|
||||
|
||||
static function tryHexConversion($aColor) {
|
||||
if( is_array( $aColor ) ) {
|
||||
if( count( $aColor ) == 3 ) {
|
||||
if( is_numeric($aColor[0]) &&is_numeric($aColor[1]) && is_numeric($aColor[2]) ) {
|
||||
if( ($aColor[0] >= 0 && $aColor[0] <= 255) &&
|
||||
($aColor[1] >= 0 && $aColor[1] <= 255) &&
|
||||
($aColor[2] >= 0 && $aColor[2] <= 255) ) {
|
||||
return sprintf('#%02x%02x%02x',$aColor[0],$aColor[1],$aColor[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $aColor;
|
||||
}
|
||||
|
||||
|
||||
// Return a RGB tripple corresponding to a position in the normal light spectrum
|
||||
// The argumen values is in the range [0, 1] where a value of 0 correponds to blue and
|
||||
// a value of 1 corresponds to red. Values in betwen is mapped to a linear interpolation
|
||||
// of the constituting colors in the visible color spectra.
|
||||
// The $aDynamicRange specified how much of the dynamic range we shold use
|
||||
// a value of 1.0 give the full dyanmic range and a lower value give more dark
|
||||
// colors. In the extreme of 0.0 then all colors will be black.
|
||||
static function GetSpectrum($aVal,$aDynamicRange=1.0) {
|
||||
if( $aVal < 0 || $aVal > 1.0001 ) {
|
||||
return array(0,0,0); // Invalid case - just return black
|
||||
}
|
||||
|
||||
$sat = round(255*$aDynamicRange);
|
||||
$a = 0.25;
|
||||
if( $aVal <= 0.25 ) {
|
||||
return array(0, round($sat*$aVal/$a), $sat);
|
||||
}
|
||||
elseif( $aVal <= 0.5 ) {
|
||||
return array(0, $sat, round($sat-$sat*($aVal-0.25)/$a));
|
||||
}
|
||||
elseif( $aVal <= 0.75 ) {
|
||||
return array(round($sat*($aVal-0.5)/$a), $sat, 0);
|
||||
}
|
||||
else {
|
||||
return array($sat, round($sat-$sat*($aVal-0.75)/$a), 0);
|
||||
}
|
||||
}
|
||||
|
||||
} // Class
|
||||
|
||||
?>
|
272
src/classes/jpgraph/jpgraph_text.inc.php
Normal file
272
src/classes/jpgraph/jpgraph_text.inc.php
Normal file
@ -0,0 +1,272 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_TEXT.INC.PHP
|
||||
// Description: Class to handle text as object in the graph.
|
||||
// The low level text layout engine is handled by the GD class
|
||||
// Created: 2001-01-08 (Refactored to separate file 2008-08-01)
|
||||
// Ver: $Id: jpgraph_text.inc.php 1404 2009-06-28 15:25:41Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS Text
|
||||
// Description: Arbitrary text object that can be added to the graph
|
||||
//===================================================
|
||||
class Text {
|
||||
public $t,$margin=0;
|
||||
public $x=0,$y=0,$halign="left",$valign="top",$color=array(0,0,0);
|
||||
public $hide=false, $dir=0;
|
||||
public $iScalePosY=null,$iScalePosX=null;
|
||||
public $iWordwrap=0;
|
||||
public $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=12;
|
||||
protected $boxed=false; // Should the text be boxed
|
||||
protected $paragraph_align="left";
|
||||
protected $icornerradius=0,$ishadowwidth=3;
|
||||
protected $fcolor='white',$bcolor='black',$shadow=false;
|
||||
protected $iCSIMarea='',$iCSIMalt='',$iCSIMtarget='',$iCSIMWinTarget='';
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
|
||||
// Create new text at absolute pixel coordinates
|
||||
function __construct($aTxt="",$aXAbsPos=0,$aYAbsPos=0) {
|
||||
if( ! is_string($aTxt) ) {
|
||||
JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.');
|
||||
}
|
||||
$this->t = $aTxt;
|
||||
$this->x = round($aXAbsPos);
|
||||
$this->y = round($aYAbsPos);
|
||||
$this->margin = 0;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
// Set the string in the text object
|
||||
function Set($aTxt) {
|
||||
$this->t = $aTxt;
|
||||
}
|
||||
|
||||
// Alias for Pos()
|
||||
function SetPos($aXAbsPos=0,$aYAbsPos=0,$aHAlign="left",$aVAlign="top") {
|
||||
//$this->Pos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign);
|
||||
$this->x = $aXAbsPos;
|
||||
$this->y = $aYAbsPos;
|
||||
$this->halign = $aHAlign;
|
||||
$this->valign = $aVAlign;
|
||||
}
|
||||
|
||||
function SetScalePos($aX,$aY) {
|
||||
$this->iScalePosX = $aX;
|
||||
$this->iScalePosY = $aY;
|
||||
}
|
||||
|
||||
// Specify alignment for the text
|
||||
function Align($aHAlign,$aVAlign="top",$aParagraphAlign="") {
|
||||
$this->halign = $aHAlign;
|
||||
$this->valign = $aVAlign;
|
||||
if( $aParagraphAlign != "" )
|
||||
$this->paragraph_align = $aParagraphAlign;
|
||||
}
|
||||
|
||||
// Alias
|
||||
function SetAlign($aHAlign,$aVAlign="top",$aParagraphAlign="") {
|
||||
$this->Align($aHAlign,$aVAlign,$aParagraphAlign);
|
||||
}
|
||||
|
||||
// Specifies the alignment for a multi line text
|
||||
function ParagraphAlign($aAlign) {
|
||||
$this->paragraph_align = $aAlign;
|
||||
}
|
||||
|
||||
// Specifies the alignment for a multi line text
|
||||
function SetParagraphAlign($aAlign) {
|
||||
$this->paragraph_align = $aAlign;
|
||||
}
|
||||
|
||||
function SetShadow($aShadowColor='gray',$aShadowWidth=3) {
|
||||
$this->ishadowwidth=$aShadowWidth;
|
||||
$this->shadow=$aShadowColor;
|
||||
$this->boxed=true;
|
||||
}
|
||||
|
||||
function SetWordWrap($aCol) {
|
||||
$this->iWordwrap = $aCol ;
|
||||
}
|
||||
|
||||
// Specify that the text should be boxed. fcolor=frame color, bcolor=border color,
|
||||
// $shadow=drop shadow should be added around the text.
|
||||
function SetBox($aFrameColor=array(255,255,255),$aBorderColor=array(0,0,0),$aShadowColor=false,$aCornerRadius=4,$aShadowWidth=3) {
|
||||
if( $aFrameColor==false )
|
||||
$this->boxed=false;
|
||||
else
|
||||
$this->boxed=true;
|
||||
$this->fcolor=$aFrameColor;
|
||||
$this->bcolor=$aBorderColor;
|
||||
// For backwards compatibility when shadow was just true or false
|
||||
if( $aShadowColor === true )
|
||||
$aShadowColor = 'gray';
|
||||
$this->shadow=$aShadowColor;
|
||||
$this->icornerradius=$aCornerRadius;
|
||||
$this->ishadowwidth=$aShadowWidth;
|
||||
}
|
||||
|
||||
// Hide the text
|
||||
function Hide($aHide=true) {
|
||||
$this->hide=$aHide;
|
||||
}
|
||||
|
||||
// This looks ugly since it's not a very orthogonal design
|
||||
// but I added this "inverse" of Hide() to harmonize
|
||||
// with some classes which I designed more recently (especially)
|
||||
// jpgraph_gantt
|
||||
function Show($aShow=true) {
|
||||
$this->hide=!$aShow;
|
||||
}
|
||||
|
||||
// Specify font
|
||||
function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) {
|
||||
$this->font_family=$aFamily;
|
||||
$this->font_style=$aStyle;
|
||||
$this->font_size=$aSize;
|
||||
}
|
||||
|
||||
// Center the text between $left and $right coordinates
|
||||
function Center($aLeft,$aRight,$aYAbsPos=false) {
|
||||
$this->x = $aLeft + ($aRight-$aLeft )/2;
|
||||
$this->halign = "center";
|
||||
if( is_numeric($aYAbsPos) )
|
||||
$this->y = $aYAbsPos;
|
||||
}
|
||||
|
||||
// Set text color
|
||||
function SetColor($aColor) {
|
||||
$this->color = $aColor;
|
||||
}
|
||||
|
||||
function SetAngle($aAngle) {
|
||||
$this->SetOrientation($aAngle);
|
||||
}
|
||||
|
||||
// Orientation of text. Note only TTF fonts can have an arbitrary angle
|
||||
function SetOrientation($aDirection=0) {
|
||||
if( is_numeric($aDirection) )
|
||||
$this->dir=$aDirection;
|
||||
elseif( $aDirection=="h" )
|
||||
$this->dir = 0;
|
||||
elseif( $aDirection=="v" )
|
||||
$this->dir = 90;
|
||||
else JpGraphError::RaiseL(25051);//(" Invalid direction specified for text.");
|
||||
}
|
||||
|
||||
// Total width of text
|
||||
function GetWidth($aImg) {
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$w = $aImg->GetTextWidth($this->t,$this->dir);
|
||||
return $w;
|
||||
}
|
||||
|
||||
// Hight of font
|
||||
function GetFontHeight($aImg) {
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$h = $aImg->GetFontHeight();
|
||||
return $h;
|
||||
|
||||
}
|
||||
|
||||
function GetTextHeight($aImg) {
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$h = $aImg->GetTextHeight($this->t,$this->dir);
|
||||
return $h;
|
||||
}
|
||||
|
||||
function GetHeight($aImg) {
|
||||
// Synonym for GetTextHeight()
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$h = $aImg->GetTextHeight($this->t,$this->dir);
|
||||
return $h;
|
||||
}
|
||||
|
||||
// Set the margin which will be interpretated differently depending
|
||||
// on the context.
|
||||
function SetMargin($aMarg) {
|
||||
$this->margin = $aMarg;
|
||||
}
|
||||
|
||||
function StrokeWithScale($aImg,$axscale,$ayscale) {
|
||||
if( $this->iScalePosX === null || $this->iScalePosY === null ) {
|
||||
$this->Stroke($aImg);
|
||||
}
|
||||
else {
|
||||
$this->Stroke($aImg,
|
||||
round($axscale->Translate($this->iScalePosX)),
|
||||
round($ayscale->Translate($this->iScalePosY)));
|
||||
}
|
||||
}
|
||||
|
||||
function SetCSIMTarget($aURITarget,$aAlt='',$aWinTarget='') {
|
||||
$this->iCSIMtarget = $aURITarget;
|
||||
$this->iCSIMalt = $aAlt;
|
||||
$this->iCSIMWinTarget = $aWinTarget;
|
||||
}
|
||||
|
||||
function GetCSIMareas() {
|
||||
if( $this->iCSIMtarget !== '' )
|
||||
return $this->iCSIMarea;
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
// Display text in image
|
||||
function Stroke($aImg,$x=null,$y=null) {
|
||||
|
||||
if( !empty($x) ) $this->x = round($x);
|
||||
if( !empty($y) ) $this->y = round($y);
|
||||
|
||||
// Insert newlines
|
||||
if( $this->iWordwrap > 0 ) {
|
||||
$this->t = wordwrap($this->t,$this->iWordwrap,"\n");
|
||||
}
|
||||
|
||||
// If position been given as a fraction of the image size
|
||||
// calculate the absolute position
|
||||
if( $this->x < 1 && $this->x > 0 ) $this->x *= $aImg->width;
|
||||
if( $this->y < 1 && $this->y > 0 ) $this->y *= $aImg->height;
|
||||
|
||||
$aImg->PushColor($this->color);
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$aImg->SetTextAlign($this->halign,$this->valign);
|
||||
if( $this->boxed ) {
|
||||
if( $this->fcolor=="nofill" )
|
||||
$this->fcolor=false;
|
||||
$oldweight=$aImg->SetLineWeight(1);
|
||||
$bbox = $aImg->StrokeBoxedText($this->x,$this->y,$this->t,
|
||||
$this->dir,$this->fcolor,$this->bcolor,$this->shadow,
|
||||
$this->paragraph_align,5,5,$this->icornerradius,
|
||||
$this->ishadowwidth);
|
||||
|
||||
$aImg->SetLineWeight($oldweight);
|
||||
}
|
||||
else {
|
||||
$bbox = $aImg->StrokeText($this->x,$this->y,$this->t,$this->dir,$this->paragraph_align);
|
||||
}
|
||||
|
||||
// Create CSIM targets
|
||||
$coords = $bbox[0].','.$bbox[1].','.$bbox[2].','.$bbox[3].','.$bbox[4].','.$bbox[5].','.$bbox[6].','.$bbox[7];
|
||||
$this->iCSIMarea = "<area shape=\"poly\" coords=\"$coords\" href=\"".htmlentities($this->iCSIMtarget)."\" ";
|
||||
if( trim($this->iCSIMalt) != '' ) {
|
||||
$this->iCSIMarea .= " alt=\"".$this->iCSIMalt."\" ";
|
||||
$this->iCSIMarea .= " title=\"".$this->iCSIMalt."\" ";
|
||||
}
|
||||
if( trim($this->iCSIMWinTarget) != '' ) {
|
||||
$this->iCSIMarea .= " target=\"".$this->iCSIMWinTarget."\" ";
|
||||
}
|
||||
$this->iCSIMarea .= " />\n";
|
||||
|
||||
$aImg->PopColor($this->color);
|
||||
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
?>
|
@ -1,69 +1,148 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: jpgraph_ttf.inc.php
|
||||
// Description: Handling of TTF fonts
|
||||
// Created: 2006-11-19
|
||||
// Ver: $Id: jpgraph_ttf.inc.php 805 2006-11-28 07:45:54Z ljp $
|
||||
// File: jpgraph_ttf.inc.php
|
||||
// Description: Handling of TTF fonts
|
||||
// Created: 2006-11-19
|
||||
// Ver: $Id: jpgraph_ttf.inc.php 1545 2009-07-10 22:15:38Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
// TTF Font families
|
||||
DEFINE("FF_COURIER",10);
|
||||
DEFINE("FF_VERDANA",11);
|
||||
DEFINE("FF_TIMES",12);
|
||||
DEFINE("FF_COMIC",14);
|
||||
DEFINE("FF_ARIAL",15);
|
||||
DEFINE("FF_GEORGIA",16);
|
||||
DEFINE("FF_TREBUCHE",17);
|
||||
define("FF_COURIER",10);
|
||||
define("FF_VERDANA",11);
|
||||
define("FF_TIMES",12);
|
||||
define("FF_COMIC",14);
|
||||
define("FF_ARIAL",15);
|
||||
define("FF_GEORGIA",16);
|
||||
define("FF_TREBUCHE",17);
|
||||
|
||||
// Gnome Vera font
|
||||
// Available from http://www.gnome.org/fonts/
|
||||
DEFINE("FF_VERA",18);
|
||||
DEFINE("FF_VERAMONO",19);
|
||||
DEFINE("FF_VERASERIF",20);
|
||||
define("FF_VERA",18);
|
||||
define("FF_VERAMONO",19);
|
||||
define("FF_VERASERIF",20);
|
||||
|
||||
// Chinese font
|
||||
DEFINE("FF_SIMSUN",30);
|
||||
DEFINE("FF_CHINESE",31);
|
||||
DEFINE("FF_BIG5",31);
|
||||
define("FF_SIMSUN",30);
|
||||
define("FF_CHINESE",31);
|
||||
define("FF_BIG5",32);
|
||||
|
||||
// Japanese font
|
||||
DEFINE("FF_MINCHO",40);
|
||||
DEFINE("FF_PMINCHO",41);
|
||||
DEFINE("FF_GOTHIC",42);
|
||||
DEFINE("FF_PGOTHIC",43);
|
||||
define("FF_MINCHO",40);
|
||||
define("FF_PMINCHO",41);
|
||||
define("FF_GOTHIC",42);
|
||||
define("FF_PGOTHIC",43);
|
||||
|
||||
// Hebrew fonts
|
||||
DEFINE("FF_DAVID",44);
|
||||
DEFINE("FF_MIRIAM",45);
|
||||
DEFINE("FF_AHRON",46);
|
||||
define("FF_DAVID",44);
|
||||
define("FF_MIRIAM",45);
|
||||
define("FF_AHRON",46);
|
||||
|
||||
// Dejavu-fonts http://sourceforge.net/projects/dejavu
|
||||
define("FF_DV_SANSSERIF",47);
|
||||
define("FF_DV_SERIF",48);
|
||||
define("FF_DV_SANSSERIFMONO",49);
|
||||
define("FF_DV_SERIFCOND",50);
|
||||
define("FF_DV_SANSSERIFCOND",51);
|
||||
|
||||
// Extra fonts
|
||||
// Download fonts from
|
||||
// http://www.webfontlist.com
|
||||
// http://www.webpagepublicity.com/free-fonts.html
|
||||
// http://www.fontonic.com/fonts.asp?width=d&offset=120
|
||||
// http://www.fontspace.com/category/famous
|
||||
|
||||
DEFINE("FF_SPEEDO",50); // This font is also known as Bauer (Used for gauge fascia)
|
||||
DEFINE("FF_DIGITAL",51); // Digital readout font
|
||||
DEFINE("FF_COMPUTER",52); // The classic computer font
|
||||
DEFINE("FF_CALCULATOR",53); // Triad font
|
||||
// define("FF_SPEEDO",71); // This font is also known as Bauer (Used for development gauge fascia)
|
||||
define("FF_DIGITAL",72); // Digital readout font
|
||||
define("FF_COMPUTER",73); // The classic computer font
|
||||
define("FF_CALCULATOR",74); // Triad font
|
||||
|
||||
define("FF_USERFONT",90);
|
||||
define("FF_USERFONT1",90);
|
||||
define("FF_USERFONT2",91);
|
||||
define("FF_USERFONT3",92);
|
||||
|
||||
// Limits for fonts
|
||||
DEFINE("_FIRST_FONT",10);
|
||||
DEFINE("_LAST_FONT",53);
|
||||
define("_FIRST_FONT",10);
|
||||
define("_LAST_FONT",99);
|
||||
|
||||
// TTF Font styles
|
||||
DEFINE("FS_NORMAL",9001);
|
||||
DEFINE("FS_BOLD",9002);
|
||||
DEFINE("FS_ITALIC",9003);
|
||||
DEFINE("FS_BOLDIT",9004);
|
||||
DEFINE("FS_BOLDITALIC",9004);
|
||||
define("FS_NORMAL",9001);
|
||||
define("FS_BOLD",9002);
|
||||
define("FS_ITALIC",9003);
|
||||
define("FS_BOLDIT",9004);
|
||||
define("FS_BOLDITALIC",9004);
|
||||
|
||||
//Definitions for internal font
|
||||
DEFINE("FF_FONT0",1);
|
||||
DEFINE("FF_FONT1",2);
|
||||
DEFINE("FF_FONT2",4);
|
||||
define("FF_FONT0",1);
|
||||
define("FF_FONT1",2);
|
||||
define("FF_FONT2",4);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Defines for font setup
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
|
||||
// This is the TTF file being used when the font family is specified as
|
||||
// either FF_CHINESE or FF_BIG5
|
||||
define('CHINESE_TTF_FONT','bkai00mp.ttf');
|
||||
|
||||
// Special unicode greek language support
|
||||
define("LANGUAGE_GREEK",false);
|
||||
|
||||
// If you are setting this config to true the conversion of greek characters
|
||||
// will assume that the input text is windows 1251
|
||||
define("GREEK_FROM_WINDOWS",false);
|
||||
|
||||
// Special unicode cyrillic language support
|
||||
define("LANGUAGE_CYRILLIC",false);
|
||||
|
||||
// If you are setting this config to true the conversion
|
||||
// will assume that the input text is windows 1251, if
|
||||
// false it will assume koi8-r
|
||||
define("CYRILLIC_FROM_WINDOWS",false);
|
||||
|
||||
// The following constant is used to auto-detect
|
||||
// whether cyrillic conversion is really necessary
|
||||
// if enabled. Just replace 'windows-1251' with a variable
|
||||
// containing the input character encoding string
|
||||
// of your application calling jpgraph.
|
||||
// A typical such string would be 'UTF-8' or 'utf-8'.
|
||||
// The comparison is case-insensitive.
|
||||
// If this charset is not a 'koi8-r' or 'windows-1251'
|
||||
// derivate then no conversion is done.
|
||||
//
|
||||
// This constant can be very important in multi-user
|
||||
// multi-language environments where a cyrillic conversion
|
||||
// could be needed for some cyrillic people
|
||||
// and resulting in just erraneous conversions
|
||||
// for not-cyrillic language based people.
|
||||
//
|
||||
// Example: In the free project management
|
||||
// software dotproject.net $locale_char_set is dynamically
|
||||
// set by the language environment the user has chosen.
|
||||
//
|
||||
// Usage: define('LANGUAGE_CHARSET', $locale_char_set);
|
||||
//
|
||||
// where $locale_char_set is a GLOBAL (string) variable
|
||||
// from the application including JpGraph.
|
||||
//
|
||||
define('LANGUAGE_CHARSET', null);
|
||||
|
||||
// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
|
||||
// Standard fonts from Infomation-technology Promotion Agency (IPA)
|
||||
// See http://mix-mplus-ipa.sourceforge.jp/
|
||||
define('MINCHO_TTF_FONT','ipam.ttf');
|
||||
define('PMINCHO_TTF_FONT','ipamp.ttf');
|
||||
define('GOTHIC_TTF_FONT','ipag.ttf');
|
||||
define('PGOTHIC_TTF_FONT','ipagp.ttf');
|
||||
|
||||
// Assume that Japanese text have been entered in EUC-JP encoding.
|
||||
// If this define is true then conversion from EUC-JP to UTF8 is done
|
||||
// automatically in the library using the mbstring module in PHP.
|
||||
define('ASSUME_EUCJP_ENCODING',false);
|
||||
|
||||
|
||||
//=================================================================
|
||||
// CLASS LanguageConv
|
||||
@ -76,103 +155,103 @@ class LanguageConv {
|
||||
private $g2312 = null ;
|
||||
|
||||
function Convert($aTxt,$aFF) {
|
||||
if( LANGUAGE_GREEK ) {
|
||||
if( GREEK_FROM_WINDOWS ) {
|
||||
$unistring = LanguageConv::gr_win2uni($aTxt);
|
||||
} else {
|
||||
$unistring = LanguageConv::gr_iso2uni($aTxt);
|
||||
}
|
||||
return $unistring;
|
||||
} elseif( LANGUAGE_CYRILLIC ) {
|
||||
if( CYRILLIC_FROM_WINDOWS && (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'windows-1251')) ) {
|
||||
$aTxt = convert_cyr_string($aTxt, "w", "k");
|
||||
}
|
||||
if( !defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'koi8-r') || stristr(LANGUAGE_CHARSET, 'windows-1251')) {
|
||||
$isostring = convert_cyr_string($aTxt, "k", "i");
|
||||
$unistring = LanguageConv::iso2uni($isostring);
|
||||
}
|
||||
else {
|
||||
$unistring = $aTxt;
|
||||
}
|
||||
return $unistring;
|
||||
}
|
||||
elseif( $aFF === FF_SIMSUN ) {
|
||||
// Do Chinese conversion
|
||||
if( $this->g2312 == null ) {
|
||||
include_once 'jpgraph_gb2312.php' ;
|
||||
$this->g2312 = new GB2312toUTF8();
|
||||
}
|
||||
return $this->g2312->gb2utf8($aTxt);
|
||||
}
|
||||
elseif( $aFF === FF_CHINESE ) {
|
||||
if( !function_exists('iconv') ) {
|
||||
JpGraphError::RaiseL(25006);
|
||||
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
|
||||
}
|
||||
return iconv('BIG5','UTF-8',$aTxt);
|
||||
}
|
||||
elseif( ASSUME_EUCJP_ENCODING &&
|
||||
($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC) ) {
|
||||
if( !function_exists('mb_convert_encoding') ) {
|
||||
JpGraphError::RaiseL(25127);
|
||||
}
|
||||
return mb_convert_encoding($aTxt, 'UTF-8','EUC-JP');
|
||||
}
|
||||
elseif( $aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON ) {
|
||||
return LanguageConv::heb_iso2uni($aTxt);
|
||||
}
|
||||
else
|
||||
return $aTxt;
|
||||
if( LANGUAGE_GREEK ) {
|
||||
if( GREEK_FROM_WINDOWS ) {
|
||||
$unistring = LanguageConv::gr_win2uni($aTxt);
|
||||
} else {
|
||||
$unistring = LanguageConv::gr_iso2uni($aTxt);
|
||||
}
|
||||
return $unistring;
|
||||
} elseif( LANGUAGE_CYRILLIC ) {
|
||||
if( CYRILLIC_FROM_WINDOWS && (!defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'windows-1251')) ) {
|
||||
$aTxt = convert_cyr_string($aTxt, "w", "k");
|
||||
}
|
||||
if( !defined('LANGUAGE_CHARSET') || stristr(LANGUAGE_CHARSET, 'koi8-r') || stristr(LANGUAGE_CHARSET, 'windows-1251')) {
|
||||
$isostring = convert_cyr_string($aTxt, "k", "i");
|
||||
$unistring = LanguageConv::iso2uni($isostring);
|
||||
}
|
||||
else {
|
||||
$unistring = $aTxt;
|
||||
}
|
||||
return $unistring;
|
||||
}
|
||||
elseif( $aFF === FF_SIMSUN ) {
|
||||
// Do Chinese conversion
|
||||
if( $this->g2312 == null ) {
|
||||
include_once 'jpgraph_gb2312.php' ;
|
||||
$this->g2312 = new GB2312toUTF8();
|
||||
}
|
||||
return $this->g2312->gb2utf8($aTxt);
|
||||
}
|
||||
elseif( $aFF === FF_BIG5 ) {
|
||||
if( !function_exists('iconv') ) {
|
||||
JpGraphError::RaiseL(25006);
|
||||
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
|
||||
}
|
||||
return iconv('BIG5','UTF-8',$aTxt);
|
||||
}
|
||||
elseif( ASSUME_EUCJP_ENCODING &&
|
||||
($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC) ) {
|
||||
if( !function_exists('mb_convert_encoding') ) {
|
||||
JpGraphError::RaiseL(25127);
|
||||
}
|
||||
return mb_convert_encoding($aTxt, 'UTF-8','EUC-JP');
|
||||
}
|
||||
elseif( $aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON ) {
|
||||
return LanguageConv::heb_iso2uni($aTxt);
|
||||
}
|
||||
else
|
||||
return $aTxt;
|
||||
}
|
||||
|
||||
// Translate iso encoding to unicode
|
||||
public static function iso2uni ($isoline){
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($isoline); $i++){
|
||||
$thischar=substr($isoline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
$uniline.=($charcode>175) ? "&#" . (1040+($charcode-176)). ";" : $thischar;
|
||||
}
|
||||
return $uniline;
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($isoline); $i++){
|
||||
$thischar=substr($isoline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
$uniline.=($charcode>175) ? "&#" . (1040+($charcode-176)). ";" : $thischar;
|
||||
}
|
||||
return $uniline;
|
||||
}
|
||||
|
||||
// Translate greek iso encoding to unicode
|
||||
public static function gr_iso2uni ($isoline) {
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($isoline); $i++) {
|
||||
$thischar=substr($isoline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
$uniline.=($charcode>179 && $charcode!=183 && $charcode!=187 && $charcode!=189) ? "&#" . (900+($charcode-180)). ";" : $thischar;
|
||||
}
|
||||
return $uniline;
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($isoline); $i++) {
|
||||
$thischar=substr($isoline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
$uniline.=($charcode>179 && $charcode!=183 && $charcode!=187 && $charcode!=189) ? "&#" . (900+($charcode-180)). ";" : $thischar;
|
||||
}
|
||||
return $uniline;
|
||||
}
|
||||
|
||||
// Translate greek win encoding to unicode
|
||||
public static function gr_win2uni ($winline) {
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($winline); $i++) {
|
||||
$thischar=substr($winline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
if ($charcode==161 || $charcode==162) {
|
||||
$uniline.="&#" . (740+$charcode). ";";
|
||||
}
|
||||
else {
|
||||
$uniline.=(($charcode>183 && $charcode!=187 && $charcode!=189) || $charcode==180) ? "&#" . (900+($charcode-180)). ";" : $thischar;
|
||||
}
|
||||
}
|
||||
return $uniline;
|
||||
$uniline='';
|
||||
for ($i=0; $i < strlen($winline); $i++) {
|
||||
$thischar=substr($winline,$i,1);
|
||||
$charcode=ord($thischar);
|
||||
if ($charcode==161 || $charcode==162) {
|
||||
$uniline.="&#" . (740+$charcode). ";";
|
||||
}
|
||||
else {
|
||||
$uniline.=(($charcode>183 && $charcode!=187 && $charcode!=189) || $charcode==180) ? "&#" . (900+($charcode-180)). ";" : $thischar;
|
||||
}
|
||||
}
|
||||
return $uniline;
|
||||
}
|
||||
|
||||
public static function heb_iso2uni($isoline) {
|
||||
$isoline = hebrev($isoline);
|
||||
$o = '';
|
||||
$isoline = hebrev($isoline);
|
||||
$o = '';
|
||||
|
||||
$n = strlen($isoline);
|
||||
for($i=0; $i < $n; $i++) {
|
||||
$c=ord( substr($isoline,$i,1) );
|
||||
$o .= ($c > 223) && ($c < 251) ? '&#'.(1264+$c).';' : chr($c);
|
||||
}
|
||||
return utf8_encode($o);
|
||||
$n = strlen($isoline);
|
||||
for($i=0; $i < $n; $i++) {
|
||||
$c=ord( substr($isoline,$i,1) );
|
||||
$o .= ($c > 223) && ($c < 251) ? '&#'.(1264+$c).';' : chr($c);
|
||||
}
|
||||
return utf8_encode($o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,156 +263,353 @@ class LanguageConv {
|
||||
class TTF {
|
||||
private $font_files,$style_names;
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function TTF() {
|
||||
function __construct() {
|
||||
|
||||
// String names for font styles to be used in error messages
|
||||
$this->style_names=array(FS_NORMAL =>'normal',
|
||||
FS_BOLD =>'bold',
|
||||
FS_ITALIC =>'italic',
|
||||
FS_BOLDITALIC =>'bolditalic');
|
||||
// String names for font styles to be used in error messages
|
||||
$this->style_names=array(
|
||||
FS_NORMAL =>'normal',
|
||||
FS_BOLD =>'bold',
|
||||
FS_ITALIC =>'italic',
|
||||
FS_BOLDITALIC =>'bolditalic');
|
||||
|
||||
// File names for available fonts
|
||||
$this->font_files=array(
|
||||
FF_COURIER => array(FS_NORMAL =>'cour.ttf',
|
||||
FS_BOLD =>'courbd.ttf',
|
||||
FS_ITALIC =>'couri.ttf',
|
||||
FS_BOLDITALIC =>'courbi.ttf' ),
|
||||
FF_GEORGIA => array(FS_NORMAL =>'georgia.ttf',
|
||||
FS_BOLD =>'georgiab.ttf',
|
||||
FS_ITALIC =>'georgiai.ttf',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_TREBUCHE =>array(FS_NORMAL =>'trebuc.ttf',
|
||||
FS_BOLD =>'trebucbd.ttf',
|
||||
FS_ITALIC =>'trebucit.ttf',
|
||||
FS_BOLDITALIC =>'trebucbi.ttf' ),
|
||||
FF_VERDANA => array(FS_NORMAL =>'verdana.ttf',
|
||||
FS_BOLD =>'verdanab.ttf',
|
||||
FS_ITALIC =>'verdanai.ttf',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_TIMES => array(FS_NORMAL =>'times.ttf',
|
||||
FS_BOLD =>'timesbd.ttf',
|
||||
FS_ITALIC =>'timesi.ttf',
|
||||
FS_BOLDITALIC =>'timesbi.ttf' ),
|
||||
FF_COMIC => array(FS_NORMAL =>'comic.ttf',
|
||||
FS_BOLD =>'comicbd.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_ARIAL => array(FS_NORMAL =>'arial.ttf',
|
||||
FS_BOLD =>'arialbd.ttf',
|
||||
FS_ITALIC =>'ariali.ttf',
|
||||
FS_BOLDITALIC =>'arialbi.ttf' ) ,
|
||||
FF_VERA => array(FS_NORMAL =>'Vera.ttf',
|
||||
FS_BOLD =>'VeraBd.ttf',
|
||||
FS_ITALIC =>'VeraIt.ttf',
|
||||
FS_BOLDITALIC =>'VeraBI.ttf' ),
|
||||
FF_VERAMONO => array(FS_NORMAL =>'VeraMono.ttf',
|
||||
FS_BOLD =>'VeraMoBd.ttf',
|
||||
FS_ITALIC =>'VeraMoIt.ttf',
|
||||
FS_BOLDITALIC =>'VeraMoBI.ttf' ),
|
||||
FF_VERASERIF=> array(FS_NORMAL =>'VeraSe.ttf',
|
||||
FS_BOLD =>'VeraSeBd.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ) ,
|
||||
// File names for available fonts
|
||||
$this->font_files=array(
|
||||
FF_COURIER => array(FS_NORMAL =>'cour.ttf',
|
||||
FS_BOLD =>'courbd.ttf',
|
||||
FS_ITALIC =>'couri.ttf',
|
||||
FS_BOLDITALIC =>'courbi.ttf' ),
|
||||
FF_GEORGIA => array(FS_NORMAL =>'georgia.ttf',
|
||||
FS_BOLD =>'georgiab.ttf',
|
||||
FS_ITALIC =>'georgiai.ttf',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_TREBUCHE =>array(FS_NORMAL =>'trebuc.ttf',
|
||||
FS_BOLD =>'trebucbd.ttf',
|
||||
FS_ITALIC =>'trebucit.ttf',
|
||||
FS_BOLDITALIC =>'trebucbi.ttf' ),
|
||||
FF_VERDANA => array(FS_NORMAL =>'verdana.ttf',
|
||||
FS_BOLD =>'verdanab.ttf',
|
||||
FS_ITALIC =>'verdanai.ttf',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_TIMES => array(FS_NORMAL =>'times.ttf',
|
||||
FS_BOLD =>'timesbd.ttf',
|
||||
FS_ITALIC =>'timesi.ttf',
|
||||
FS_BOLDITALIC =>'timesbi.ttf' ),
|
||||
FF_COMIC => array(FS_NORMAL =>'comic.ttf',
|
||||
FS_BOLD =>'comicbd.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_ARIAL => array(FS_NORMAL =>'arial.ttf',
|
||||
FS_BOLD =>'arialbd.ttf',
|
||||
FS_ITALIC =>'ariali.ttf',
|
||||
FS_BOLDITALIC =>'arialbi.ttf' ) ,
|
||||
FF_VERA => array(FS_NORMAL =>'Vera.ttf',
|
||||
FS_BOLD =>'VeraBd.ttf',
|
||||
FS_ITALIC =>'VeraIt.ttf',
|
||||
FS_BOLDITALIC =>'VeraBI.ttf' ),
|
||||
FF_VERAMONO => array(FS_NORMAL =>'VeraMono.ttf',
|
||||
FS_BOLD =>'VeraMoBd.ttf',
|
||||
FS_ITALIC =>'VeraMoIt.ttf',
|
||||
FS_BOLDITALIC =>'VeraMoBI.ttf' ),
|
||||
FF_VERASERIF=> array(FS_NORMAL =>'VeraSe.ttf',
|
||||
FS_BOLD =>'VeraSeBd.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ) ,
|
||||
|
||||
/* Chinese fonts */
|
||||
FF_SIMSUN => array(FS_NORMAL =>'simsun.ttc',
|
||||
FS_BOLD =>'simhei.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_CHINESE => array(FS_NORMAL =>CHINESE_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_SIMSUN => array(
|
||||
FS_NORMAL =>'simsun.ttc',
|
||||
FS_BOLD =>'simhei.ttf',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_CHINESE => array(
|
||||
FS_NORMAL =>CHINESE_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_BIG5 => array(
|
||||
FS_NORMAL =>CHINESE_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
/* Japanese fonts */
|
||||
FF_MINCHO => array(FS_NORMAL =>MINCHO_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_PMINCHO => array(FS_NORMAL =>PMINCHO_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_GOTHIC => array(FS_NORMAL =>GOTHIC_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_PGOTHIC => array(FS_NORMAL =>PGOTHIC_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_MINCHO => array(FS_NORMAL =>PMINCHO_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_MINCHO => array(
|
||||
FS_NORMAL =>MINCHO_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_PMINCHO => array(
|
||||
FS_NORMAL =>PMINCHO_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_GOTHIC => array(
|
||||
FS_NORMAL =>GOTHIC_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_PGOTHIC => array(
|
||||
FS_NORMAL =>PGOTHIC_TTF_FONT,
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
/* Hebrew fonts */
|
||||
FF_DAVID => array(FS_NORMAL =>'DAVIDNEW.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_DAVID => array(
|
||||
FS_NORMAL =>'DAVIDNEW.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_MIRIAM => array(FS_NORMAL =>'MRIAMY.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_MIRIAM => array(
|
||||
FS_NORMAL =>'MRIAMY.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_AHRON => array(FS_NORMAL =>'ahronbd.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_AHRON => array(
|
||||
FS_NORMAL =>'ahronbd.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
/* Misc fonts */
|
||||
FF_DIGITAL => array(FS_NORMAL =>'DIGIRU__.TTF',
|
||||
FS_BOLD =>'Digirtu_.ttf',
|
||||
FS_ITALIC =>'Digir___.ttf',
|
||||
FS_BOLDITALIC =>'DIGIRT__.TTF' ),
|
||||
FF_SPEEDO => array(FS_NORMAL =>'Speedo.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_COMPUTER => array(FS_NORMAL =>'COMPUTER.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
FF_CALCULATOR => array(FS_NORMAL =>'Triad_xs.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
);
|
||||
FF_DIGITAL => array(
|
||||
FS_NORMAL =>'DIGIRU__.TTF',
|
||||
FS_BOLD =>'Digirtu_.ttf',
|
||||
FS_ITALIC =>'Digir___.ttf',
|
||||
FS_BOLDITALIC =>'DIGIRT__.TTF' ),
|
||||
|
||||
/* This is an experimental font for the speedometer development
|
||||
FF_SPEEDO => array(
|
||||
FS_NORMAL =>'Speedo.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
*/
|
||||
|
||||
FF_COMPUTER => array(
|
||||
FS_NORMAL =>'COMPUTER.TTF',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_CALCULATOR => array(
|
||||
FS_NORMAL =>'Triad_xs.ttf',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
/* Dejavu fonts */
|
||||
FF_DV_SANSSERIF => array(
|
||||
FS_NORMAL =>array('DejaVuSans.ttf'),
|
||||
FS_BOLD =>array('DejaVuSans-Bold.ttf','DejaVuSansBold.ttf'),
|
||||
FS_ITALIC =>array('DejaVuSans-Oblique.ttf','DejaVuSansOblique.ttf'),
|
||||
FS_BOLDITALIC =>array('DejaVuSans-BoldOblique.ttf','DejaVuSansBoldOblique.ttf') ),
|
||||
|
||||
FF_DV_SANSSERIFMONO => array(
|
||||
FS_NORMAL =>array('DejaVuSansMono.ttf','DejaVuMonoSans.ttf'),
|
||||
FS_BOLD =>array('DejaVuSansMono-Bold.ttf','DejaVuMonoSansBold.ttf'),
|
||||
FS_ITALIC =>array('DejaVuSansMono-Oblique.ttf','DejaVuMonoSansOblique.ttf'),
|
||||
FS_BOLDITALIC =>array('DejaVuSansMono-BoldOblique.ttf','DejaVuMonoSansBoldOblique.ttf') ),
|
||||
|
||||
FF_DV_SANSSERIFCOND => array(
|
||||
FS_NORMAL =>array('DejaVuSansCondensed.ttf','DejaVuCondensedSans.ttf'),
|
||||
FS_BOLD =>array('DejaVuSansCondensed-Bold.ttf','DejaVuCondensedSansBold.ttf'),
|
||||
FS_ITALIC =>array('DejaVuSansCondensed-Oblique.ttf','DejaVuCondensedSansOblique.ttf'),
|
||||
FS_BOLDITALIC =>array('DejaVuSansCondensed-BoldOblique.ttf','DejaVuCondensedSansBoldOblique.ttf') ),
|
||||
|
||||
FF_DV_SERIF => array(
|
||||
FS_NORMAL =>array('DejaVuSerif.ttf'),
|
||||
FS_BOLD =>array('DejaVuSerif-Bold.ttf','DejaVuSerifBold.ttf'),
|
||||
FS_ITALIC =>array('DejaVuSerif-Italic.ttf','DejaVuSerifItalic.ttf'),
|
||||
FS_BOLDITALIC =>array('DejaVuSerif-BoldItalic.ttf','DejaVuSerifBoldItalic.ttf') ),
|
||||
|
||||
FF_DV_SERIFCOND => array(
|
||||
FS_NORMAL =>array('DejaVuSerifCondensed.ttf','DejaVuCondensedSerif.ttf'),
|
||||
FS_BOLD =>array('DejaVuSerifCondensed-Bold.ttf','DejaVuCondensedSerifBold.ttf'),
|
||||
FS_ITALIC =>array('DejaVuSerifCondensed-Italic.ttf','DejaVuCondensedSerifItalic.ttf'),
|
||||
FS_BOLDITALIC =>array('DejaVuSerifCondensed-BoldItalic.ttf','DejaVuCondensedSerifBoldItalic.ttf') ),
|
||||
|
||||
|
||||
/* Placeholders for defined fonts */
|
||||
FF_USERFONT1 => array(
|
||||
FS_NORMAL =>'',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_USERFONT2 => array(
|
||||
FS_NORMAL =>'',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
FF_USERFONT3 => array(
|
||||
FS_NORMAL =>'',
|
||||
FS_BOLD =>'',
|
||||
FS_ITALIC =>'',
|
||||
FS_BOLDITALIC =>'' ),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
// Create the TTF file from the font specification
|
||||
function File($family,$style=FS_NORMAL) {
|
||||
$fam = @$this->font_files[$family];
|
||||
if( !$fam ) {
|
||||
JpGraphError::RaiseL(25046,$family);//("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/");
|
||||
}
|
||||
$f = @$fam[$style];
|
||||
$fam = @$this->font_files[$family];
|
||||
if( !$fam ) {
|
||||
JpGraphError::RaiseL(25046,$family);//("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/");
|
||||
}
|
||||
$ff = @$fam[$style];
|
||||
|
||||
if( $f==='' )
|
||||
JpGraphError::RaiseL(25047,$this->style_names[$style],$this->font_files[$family][FS_NORMAL]);//('Style "'.$this->style_names[$style].'" is not available for font family '.$this->font_files[$family][FS_NORMAL].'.');
|
||||
if( !$f ) {
|
||||
JpGraphError::RaiseL(25048,$fam);//("Unknown font style specification [$fam].");
|
||||
}
|
||||
if( is_array($ff) ) {
|
||||
// There are several optional file names. They are tried in order
|
||||
// and the first one found is used
|
||||
$n = count($ff);
|
||||
} else {
|
||||
$n = 1;
|
||||
$ff = array($ff);
|
||||
}
|
||||
$i = 0;
|
||||
do {
|
||||
$f = $ff[$i];
|
||||
// All font families are guaranteed to have the normal style
|
||||
|
||||
if ($family >= FF_MINCHO && $family <= FF_PGOTHIC) {
|
||||
$f = MBTTF_DIR.$f;
|
||||
} else {
|
||||
$f = TTF_DIR.$f;
|
||||
}
|
||||
if( $f==='' )
|
||||
JpGraphError::RaiseL(25047,$this->style_names[$style],$this->font_files[$family][FS_NORMAL]);//('Style "'.$this->style_names[$style].'" is not available for font family '.$this->font_files[$family][FS_NORMAL].'.');
|
||||
if( !$f ) {
|
||||
JpGraphError::RaiseL(25048,$fam);//("Unknown font style specification [$fam].");
|
||||
}
|
||||
|
||||
if( file_exists($f) === false || is_readable($f) === false ) {
|
||||
JpGraphError::RaiseL(25049,$f);//("Font file \"$f\" is not readable or does not exist.");
|
||||
}
|
||||
return $f;
|
||||
if ($family >= FF_MINCHO && $family <= FF_PGOTHIC) {
|
||||
$f = MBTTF_DIR.$f;
|
||||
} else {
|
||||
$f = TTF_DIR.$f;
|
||||
}
|
||||
++$i;
|
||||
} while( $i < $n && (file_exists($f) === false || is_readable($f) === false) );
|
||||
|
||||
if( !file_exists($f) ) {
|
||||
JpGraphError::RaiseL(25049,$f);//("Font file \"$f\" is not readable or does not exist.");
|
||||
}
|
||||
return $f;
|
||||
}
|
||||
|
||||
function SetUserFont($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
||||
$this->font_files[FF_USERFONT] =
|
||||
array(FS_NORMAL => $aNormal,
|
||||
FS_BOLD => $aBold,
|
||||
FS_ITALIC => $aItalic,
|
||||
FS_BOLDITALIC => $aBoldIt ) ;
|
||||
}
|
||||
|
||||
function SetUserFont1($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
||||
$this->font_files[FF_USERFONT1] =
|
||||
array(FS_NORMAL => $aNormal,
|
||||
FS_BOLD => $aBold,
|
||||
FS_ITALIC => $aItalic,
|
||||
FS_BOLDITALIC => $aBoldIt ) ;
|
||||
}
|
||||
|
||||
function SetUserFont2($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
||||
$this->font_files[FF_USERFONT2] =
|
||||
array(FS_NORMAL => $aNormal,
|
||||
FS_BOLD => $aBold,
|
||||
FS_ITALIC => $aItalic,
|
||||
FS_BOLDITALIC => $aBoldIt ) ;
|
||||
}
|
||||
|
||||
function SetUserFont3($aNormal,$aBold='',$aItalic='',$aBoldIt='') {
|
||||
$this->font_files[FF_USERFONT3] =
|
||||
array(FS_NORMAL => $aNormal,
|
||||
FS_BOLD => $aBold,
|
||||
FS_ITALIC => $aItalic,
|
||||
FS_BOLDITALIC => $aBoldIt ) ;
|
||||
}
|
||||
|
||||
} // Class
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CLASS SymChar
|
||||
// Description: Code values for some commonly used characters that
|
||||
// normally isn't available directly on the keyboard, for example
|
||||
// mathematical and greek symbols.
|
||||
//=============================================================================
|
||||
class SymChar {
|
||||
static function Get($aSymb,$aCapital=FALSE) {
|
||||
$iSymbols = array(
|
||||
/* Greek */
|
||||
array('alpha','03B1','0391'),
|
||||
array('beta','03B2','0392'),
|
||||
array('gamma','03B3','0393'),
|
||||
array('delta','03B4','0394'),
|
||||
array('epsilon','03B5','0395'),
|
||||
array('zeta','03B6','0396'),
|
||||
array('ny','03B7','0397'),
|
||||
array('eta','03B8','0398'),
|
||||
array('theta','03B8','0398'),
|
||||
array('iota','03B9','0399'),
|
||||
array('kappa','03BA','039A'),
|
||||
array('lambda','03BB','039B'),
|
||||
array('mu','03BC','039C'),
|
||||
array('nu','03BD','039D'),
|
||||
array('xi','03BE','039E'),
|
||||
array('omicron','03BF','039F'),
|
||||
array('pi','03C0','03A0'),
|
||||
array('rho','03C1','03A1'),
|
||||
array('sigma','03C3','03A3'),
|
||||
array('tau','03C4','03A4'),
|
||||
array('upsilon','03C5','03A5'),
|
||||
array('phi','03C6','03A6'),
|
||||
array('chi','03C7','03A7'),
|
||||
array('psi','03C8','03A8'),
|
||||
array('omega','03C9','03A9'),
|
||||
/* Money */
|
||||
array('euro','20AC'),
|
||||
array('yen','00A5'),
|
||||
array('pound','20A4'),
|
||||
/* Math */
|
||||
array('approx','2248'),
|
||||
array('neq','2260'),
|
||||
array('not','2310'),
|
||||
array('def','2261'),
|
||||
array('inf','221E'),
|
||||
array('sqrt','221A'),
|
||||
array('int','222B'),
|
||||
/* Misc */
|
||||
array('copy','00A9'),
|
||||
array('para','00A7'),
|
||||
array('tm','2122'), /* Trademark symbol */
|
||||
array('rtm','00AE'), /* Registered trademark */
|
||||
array('degree','00b0')
|
||||
|
||||
);
|
||||
|
||||
$n = count($iSymbols);
|
||||
$i=0;
|
||||
$found = false;
|
||||
$aSymb = strtolower($aSymb);
|
||||
while( $i < $n && !$found ) {
|
||||
$found = $aSymb === $iSymbols[$i++][0];
|
||||
}
|
||||
if( $found ) {
|
||||
$ca = $iSymbols[--$i];
|
||||
if( $aCapital && count($ca)==3 )
|
||||
$s = $ca[2];
|
||||
else
|
||||
$s = $ca[1];
|
||||
return sprintf('&#%04d;',hexdec($s));
|
||||
}
|
||||
else
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1,10 +1,11 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: DE.INC.PHP
|
||||
// File: DE.INC.PHP
|
||||
// Description: German language file for error messages
|
||||
// Created: 2006-03-06
|
||||
// Author: Timo Leopold (timo@leopold-hh.de)
|
||||
// Ver: $Id: de.inc.php 993 2008-03-30 21:17:41Z ljp $
|
||||
// Created: 2006-03-06
|
||||
// Author: Timo Leopold (timo@leopold-hh.de)
|
||||
// Johan Persson (ljp@localhost.nil)
|
||||
// Ver: $Id: de.inc.php 1709 2009-07-30 08:00:08Z ljp $
|
||||
//
|
||||
// Copyright (c)
|
||||
//========================================================================
|
||||
@ -17,13 +18,13 @@ $_jpg_messages = array(
|
||||
** Headers wurden bereits gesendet - Fehler. Dies wird als HTML formatiert, weil es direkt als text zurueckgesendet wird
|
||||
*/
|
||||
10 => array('<table border="1"><tr><td style="color:darkred;font-size:1.2em;"><b>JpGraph Fehler:</b>
|
||||
HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zeile <b>%d</b>.</td></tr><tr><td><b>Erklärung:</b><br>HTTP header wurden bereits zum Browser gesendet, wobei die Daten als Text gekennzeichnet wurden, bevor die Bibliothek die Chance hatte, seinen Bild-HTTP-Header zum Browser zu schicken. Dies verhindert, dass die Bibliothek Bilddaten zum Browser schicken kann (weil sie vom Browser als Text interpretiert würden und daher nur Mist dargestellt würde).<p>Wahrscheinlich steht Text im Skript bevor <i>Graph::Stroke()</i> aufgerufen wird. Wenn dieser Text zum Browser gesendet wird, nimmt dieser an, dass die gesamten Daten aus Text bestehen. Such nach irgendwelchem Text, auch nach Leerzeichen und Zeilenumbrüchen, die eventuell bereits zum Browser gesendet wurden. <p>Zum Beispiel ist ein oft auftretender Fehler, eine Leerzeile am Anfang der Datei oder vor <i>Graph::Stroke()</i> zu lassen."<b><?php</b>".</td></tr></table>',2),
|
||||
HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zeile <b>%d</b>.</td></tr><tr><td><b>Erklärung:</b><br>HTTP header wurden bereits zum Browser gesendet, wobei die Daten als Text gekennzeichnet wurden, bevor die Bibliothek die Chance hatte, seinen Bild-HTTP-Header zum Browser zu schicken. Dies verhindert, dass die Bibliothek Bilddaten zum Browser schicken kann (weil sie vom Browser als Text interpretiert würden und daher nur Mist dargestellt würde).<p>Wahrscheinlich steht Text im Skript bevor <i>Graph::Stroke()</i> aufgerufen wird. Wenn dieser Text zum Browser gesendet wird, nimmt dieser an, dass die gesamten Daten aus Text bestehen. Such nach irgendwelchem Text, auch nach Leerzeichen und Zeilenumbrüchen, die eventuell bereits zum Browser gesendet wurden. <p>Zum Beispiel ist ein oft auftretender Fehler, eine Leerzeile am Anfang der Datei oder vor <i>Graph::Stroke()</i> zu lassen."<b><?php</b>".</td></tr></table>',2),
|
||||
|
||||
/*
|
||||
** Setup Fehler
|
||||
*/
|
||||
11 => array('Es wurde kein Pfad für CACHE_DIR angegeben. Bitte gib einen Pfad CACHE_DIR in der Datei jpg-config.inc an.',0),
|
||||
12 => array('Es wurde kein Pfad für TTF_DIR angegeben und der Pfad kann nicht automatisch ermittelt werden. Bitte gib den Pfad in der Datei jpg-config.inc an.',0),
|
||||
11 => array('Es wurde kein Pfad für CACHE_DIR angegeben. Bitte gib einen Pfad CACHE_DIR in der Datei jpg-config.inc an.',0),
|
||||
12 => array('Es wurde kein Pfad für TTF_DIR angegeben und der Pfad kann nicht automatisch ermittelt werden. Bitte gib den Pfad in der Datei jpg-config.inc an.',0),
|
||||
13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s',2),
|
||||
|
||||
/*
|
||||
@ -33,24 +34,25 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
2001 => array('Die Anzahl der Farben ist nicht gleich der Anzahl der Vorlagen in BarPlot::SetPattern().',0),
|
||||
2002 => array('Unbekannte Vorlage im Aufruf von BarPlot::SetPattern().',0),
|
||||
2003 => array('Anzahl der X- und Y-Koordinaten sind nicht identisch. Anzahl der X-Koordinaten: %d; Anzahl der Y-Koordinaten: %d.',2),
|
||||
2004 => array('Alle Werte für ein Balkendiagramm (barplot) müssen numerisch sein. Du hast den Wert nr [%d] == %s angegeben.',2),
|
||||
2005 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0),
|
||||
2006 => array('Unbekannte Position für die Werte der Balken: %s.',1),
|
||||
2004 => array('Alle Werte für ein Balkendiagramm (barplot) müssen numerisch sein. Du hast den Wert nr [%d] == %s angegeben.',2),
|
||||
2005 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0),
|
||||
2006 => array('Unbekannte Position für die Werte der Balken: %s.',1),
|
||||
2007 => array('Kann GroupBarPlot nicht aus einem leeren Vektor erzeugen.',0),
|
||||
2008 => array('GroupBarPlot Element nbr %d wurde nicht definiert oder ist leer.',0),
|
||||
2009 => array('Eins der Objekte, das an GroupBar weitergegeben wurde ist kein Balkendiagramm (BarPlot). Versichere Dich, dass Du den GroupBarPlot aus einem Vektor von Balkendiagrammen (barplot) oder AccBarPlot-Objekten erzeugst. (Class = %s)',1),
|
||||
2010 => array('Kann AccBarPlot nicht aus einem leeren Vektor erzeugen.',0),
|
||||
2011 => array('AccBarPlot-Element nbr %d wurde nicht definiert oder ist leer.',1),
|
||||
2012 => array('Eins der Objekte, das an AccBar weitergegeben wurde ist kein Balkendiagramm (barplot). Versichere Dich, dass Du den AccBar-Plot aus einem Vektor von Balkendiagrammen (barplot) erzeugst. (Class=%s)',1),
|
||||
2013 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0),
|
||||
2013 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0),
|
||||
2014 => array('Die Anzahl der Datenpunkte jeder Datenreihe in AccBarPlot muss gleich sein.',0),
|
||||
2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates',0),
|
||||
|
||||
|
||||
/*
|
||||
** jpgraph_date
|
||||
*/
|
||||
|
||||
3001 => array('Es ist nur möglich, entweder SetDateAlign() oder SetTimeAlign() zu benutzen, nicht beides!',0),
|
||||
3001 => array('Es ist nur möglich, entweder SetDateAlign() oder SetTimeAlign() zu benutzen, nicht beides!',0),
|
||||
|
||||
/*
|
||||
** jpgraph_error
|
||||
@ -62,9 +64,9 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph_flags
|
||||
*/
|
||||
|
||||
5001 => array('Unbekannte Flaggen-Größe (%d).',1),
|
||||
5001 => array('Unbekannte Flaggen-Größe (%d).',1),
|
||||
5002 => array('Der Flaggen-Index %s existiert nicht.',1),
|
||||
5003 => array('Es wurde eine ungültige Ordnungszahl (%d) für den Flaggen-Index angegeben.',1),
|
||||
5003 => array('Es wurde eine ungültige Ordnungszahl (%d) für den Flaggen-Index angegeben.',1),
|
||||
5004 => array('Der Landesname %s hat kein korrespondierendes Flaggenbild. Die Flagge mag existieren, abr eventuell unter einem anderen Namen, z.B. versuche "united states" statt "usa".',1),
|
||||
|
||||
|
||||
@ -72,35 +74,35 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph_gantt
|
||||
*/
|
||||
|
||||
6001 => array('Interner Fehler. Die Höhe für ActivityTitles ist < 0.',0),
|
||||
6002 => array('Es dürfen keine negativen Werte für die Gantt-Diagramm-Dimensionen angegeben werden. Verwende 0, wenn die Dimensionen automatisch ermittelt werden sollen.',0),
|
||||
6003 => array('Ungültiges Format für den Bedingungs-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei index 0 starten und Vektoren in der Form (Row,Constrain-To,Constrain-Type) enthalten.',1),
|
||||
6004 => array('Ungültiges Format für den Fortschritts-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei Index 0 starten und Vektoren in der Form (Row,Progress) enthalten.',1),
|
||||
6001 => array('Interner Fehler. Die Höhe für ActivityTitles ist < 0.',0),
|
||||
6002 => array('Es dürfen keine negativen Werte für die Gantt-Diagramm-Dimensionen angegeben werden. Verwende 0, wenn die Dimensionen automatisch ermittelt werden sollen.',0),
|
||||
6003 => array('Ungültiges Format für den Bedingungs-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei index 0 starten und Vektoren in der Form (Row,Constrain-To,Constrain-Type) enthalten.',1),
|
||||
6004 => array('Ungültiges Format für den Fortschritts-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei Index 0 starten und Vektoren in der Form (Row,Progress) enthalten.',1),
|
||||
6005 => array('SetScale() ist nicht sinnvoll bei Gantt-Diagrammen.',0),
|
||||
6006 => array('Das Gantt-Diagramm kann nicht automatisch skaliert werden. Es existieren keine Aktivitäten mit Termin. [GetBarMinMax() start >= n]',0),
|
||||
6007 => array('Plausibiltätsprüfung für die automatische Gantt-Diagramm-Größe schlug fehl. Entweder die Breite (=%d) oder die Höhe (=%d) ist größer als MAX_GANTTIMG_SIZE. Dies kann möglicherweise durch einen falschen Wert bei einer Aktivität hervorgerufen worden sein.',2),
|
||||
6008 => array('Du hast eine Bedingung angegeben von Reihe=%d bis Reihe=%d, die keine Aktivität hat.',2),
|
||||
6006 => array('Das Gantt-Diagramm kann nicht automatisch skaliert werden. Es existieren keine Aktivitäten mit Termin. [GetBarMinMax() start >= n]',0),
|
||||
6007 => array('Plausibiltätsprüfung für die automatische Gantt-Diagramm-Größe schlug fehl. Entweder die Breite (=%d) oder die Höhe (=%d) ist größer als MAX_GANTTIMG_SIZE. Dies kann möglicherweise durch einen falschen Wert bei einer Aktivität hervorgerufen worden sein.',2),
|
||||
6008 => array('Du hast eine Bedingung angegeben von Reihe=%d bis Reihe=%d, die keine Aktivität hat.',2),
|
||||
6009 => array('Unbekannter Bedingungstyp von Reihe=%d bis Reihe=%d',2),
|
||||
6010 => array('Ungültiger Icon-Index für das eingebaute Gantt-Icon [%d]',1),
|
||||
6011 => array('Argument für IconImage muss entweder ein String oder ein Integer sein.',0),
|
||||
6010 => array('Ungültiger Icon-Index für das eingebaute Gantt-Icon [%d]',1),
|
||||
6011 => array('Argument für IconImage muss entweder ein String oder ein Integer sein.',0),
|
||||
6012 => array('Unbekannter Typ bei der Gantt-Objekt-Title-Definition.',0),
|
||||
6015 => array('Ungültige vertikale Position %d',1),
|
||||
6016 => array('Der eingegebene Datums-String (%s) für eine Gantt-Aktivität kann nicht interpretiert werden. Versichere Dich, dass es ein gültiger Datumsstring ist, z.B. 2005-04-23 13:30',1),
|
||||
6015 => array('Ungültige vertikale Position %d',1),
|
||||
6016 => array('Der eingegebene Datums-String (%s) für eine Gantt-Aktivität kann nicht interpretiert werden. Versichere Dich, dass es ein gültiger Datumsstring ist, z.B. 2005-04-23 13:30',1),
|
||||
6017 => array('Unbekannter Datumstyp in GanttScale (%s).',1),
|
||||
6018 => array('Intervall für Minuten muss ein gerader Teiler einer Stunde sein, z.B. 1,5,10,12,15,20,30, etc. Du hast ein Intervall von %d Minuten angegeben.',1),
|
||||
6019 => array('Die vorhandene Breite (%d) für die Minuten ist zu klein, um angezeigt zu werden. Bitte benutze die automatische Größenermittlung oder vergrößere die Breite des Diagramms.',1),
|
||||
6020 => array('Das Intervall für die Stunden muss ein gerader Teiler eines Tages sein, z.B. 0:30, 1:00, 1:30, 4:00, etc. Du hast ein Intervall von %d eingegeben.',1),
|
||||
6021 => array('Unbekanntes Format für die Woche.',0),
|
||||
6018 => array('Intervall für Minuten muss ein gerader Teiler einer Stunde sein, z.B. 1,5,10,12,15,20,30, etc. Du hast ein Intervall von %d Minuten angegeben.',1),
|
||||
6019 => array('Die vorhandene Breite (%d) für die Minuten ist zu klein, um angezeigt zu werden. Bitte benutze die automatische Größenermittlung oder vergrößere die Breite des Diagramms.',1),
|
||||
6020 => array('Das Intervall für die Stunden muss ein gerader Teiler eines Tages sein, z.B. 0:30, 1:00, 1:30, 4:00, etc. Du hast ein Intervall von %d eingegeben.',1),
|
||||
6021 => array('Unbekanntes Format für die Woche.',0),
|
||||
6022 => array('Die Gantt-Skala wurde nicht eingegeben.',0),
|
||||
6023 => array('Wenn Du sowohl Stunden als auch Minuten anzeigen lassen willst, muss das Stunden-Interval gleich 1 sein (anderenfalls ist es nicht sinnvoll, Minuten anzeigen zu lassen).',0),
|
||||
6024 => array('Das CSIM-Ziel muss als String angegeben werden. Der Start des Ziels ist: %d',1),
|
||||
6025 => array('Der CSIM-Alt-Text muss als String angegeben werden. Der Beginn des Alt-Textes ist: %d',1),
|
||||
6027 => array('Der Fortschrittswert muss im Bereich [0, 1] liegen.',0),
|
||||
6028 => array('Die eingegebene Höhe (%d) für GanttBar ist nicht im zulässigen Bereich.',1),
|
||||
6029 => array('Der Offset für die vertikale Linie muss im Bereich [0,1] sein.',0),
|
||||
6030 => array('Unbekannte Pfeilrichtung für eine Verbindung.',0),
|
||||
6031 => array('Unbekannter Pfeiltyp für eine Verbindung.',0),
|
||||
6032 => array('Interner Fehler: Unbekannter Pfadtyp (=%d) für eine Verbindung.',1),
|
||||
6028 => array('Die eingegebene Höhe (%d) für GanttBar ist nicht im zulässigen Bereich.',1),
|
||||
6029 => array('Der Offset für die vertikale Linie muss im Bereich [0,1] sein.',0),
|
||||
6030 => array('Unbekannte Pfeilrichtung für eine Verbindung.',0),
|
||||
6031 => array('Unbekannter Pfeiltyp für eine Verbindung.',0),
|
||||
6032 => array('Interner Fehler: Unbekannter Pfadtyp (=%d) für eine Verbindung.',1),
|
||||
|
||||
/*
|
||||
** jpgraph_gradient
|
||||
@ -112,107 +114,107 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph_iconplot
|
||||
*/
|
||||
|
||||
8001 => array('Der Mix-Wert für das Icon muss zwischen 0 und 100 sein.',0),
|
||||
8002 => array('Die Ankerposition für Icons muss entweder "top", "bottom", "left", "right" oder "center" sein.',0),
|
||||
8003 => array('Es ist nicht möglich, gleichzeitig ein Bild und eine Landesflagge für dasselbe Icon zu definieren',0),
|
||||
8004 => array('Wenn Du Landesflaggen benutzen willst, musst Du die Datei "jpgraph_flags.php" hinzufügen (per include).',0),
|
||||
8001 => array('Der Mix-Wert für das Icon muss zwischen 0 und 100 sein.',0),
|
||||
8002 => array('Die Ankerposition für Icons muss entweder "top", "bottom", "left", "right" oder "center" sein.',0),
|
||||
8003 => array('Es ist nicht möglich, gleichzeitig ein Bild und eine Landesflagge für dasselbe Icon zu definieren',0),
|
||||
8004 => array('Wenn Du Landesflaggen benutzen willst, musst Du die Datei "jpgraph_flags.php" hinzufügen (per include).',0),
|
||||
|
||||
/*
|
||||
** jpgraph_imgtrans
|
||||
*/
|
||||
|
||||
9001 => array('Der Wert für die Bildtransformation ist außerhalb des zulässigen Bereichs. Der verschwindende Punkt am Horizont muss als Wert zwischen 0 und 1 angegeben werden.',0),
|
||||
9001 => array('Der Wert für die Bildtransformation ist außerhalb des zulässigen Bereichs. Der verschwindende Punkt am Horizont muss als Wert zwischen 0 und 1 angegeben werden.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_lineplot
|
||||
*/
|
||||
|
||||
10001 => array('Die Methode LinePlot::SetFilled() sollte nicht mehr benutzt werden. Benutze lieber SetFillColor()',0),
|
||||
10002 => array('Der Plot ist zu kompliziert für FastLineStroke. Benutze lieber den StandardStroke()',0),
|
||||
10002 => array('Der Plot ist zu kompliziert für FastLineStroke. Benutze lieber den StandardStroke()',0),
|
||||
10003 => array('Each plot in an accumulated lineplot must have the same number of data points.',0),
|
||||
/*
|
||||
** jpgraph_log
|
||||
*/
|
||||
|
||||
11001 => array('Deine Daten enthalten nicht-numerische Werte.',0),
|
||||
11002 => array('Negative Werte können nicht für logarithmische Achsen verwendet werden.',0),
|
||||
11002 => array('Negative Werte können nicht für logarithmische Achsen verwendet werden.',0),
|
||||
11003 => array('Deine Daten enthalten nicht-numerische Werte.',0),
|
||||
11004 => array('Skalierungsfehler für die logarithmische Achse. Es gibt ein Problem mit den Daten der Achse. Der größte Wert muss größer sein als Null. Es ist mathematisch nicht möglich, einen Wert gleich Null in der Skala zu haben.',0),
|
||||
11005 => array('Das Tick-Intervall für die logarithmische Achse ist nicht definiert. Lösche jeden Aufruf von SetTextLabelStart() oder SetTextTickInterval() bei der logarithmischen Achse.',0),
|
||||
11004 => array('Skalierungsfehler für die logarithmische Achse. Es gibt ein Problem mit den Daten der Achse. Der größte Wert muss größer sein als Null. Es ist mathematisch nicht möglich, einen Wert gleich Null in der Skala zu haben.',0),
|
||||
11005 => array('Das Tick-Intervall für die logarithmische Achse ist nicht definiert. Lösche jeden Aufruf von SetTextLabelStart() oder SetTextTickInterval() bei der logarithmischen Achse.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_mgraph
|
||||
*/
|
||||
|
||||
12001 => array("Du benutzt GD 2.x und versuchst ein Nicht-Truecolor-Bild als Hintergrundbild zu benutzen. Um Hintergrundbilder mit GD 2.x zu benutzen, ist es notwendig Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Truetype-Schriften sehr schlecht, wenn man Truetype-Schriften mit Truecolor-Bildern verwendet.",0),
|
||||
12002 => array('Ungültiger Dateiname für MGraph::SetBackgroundImage() : %s. Die Datei muss eine gültige Dateierweiterung haben (jpg,gif,png), wenn die automatische Typerkennung verwendet wird.',1),
|
||||
12003 => array('Unbekannte Dateierweiterung (%s) in MGraph::SetBackgroundImage() für Dateiname: %s',2),
|
||||
12004 => array('Das Bildformat des Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1),
|
||||
12001 => array("Du benutzt GD 2.x und versuchst ein Nicht-Truecolor-Bild als Hintergrundbild zu benutzen. Um Hintergrundbilder mit GD 2.x zu benutzen, ist es notwendig Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Truetype-Schriften sehr schlecht, wenn man Truetype-Schriften mit Truecolor-Bildern verwendet.",0),
|
||||
12002 => array('Ungültiger Dateiname für MGraph::SetBackgroundImage() : %s. Die Datei muss eine gültige Dateierweiterung haben (jpg,gif,png), wenn die automatische Typerkennung verwendet wird.',1),
|
||||
12003 => array('Unbekannte Dateierweiterung (%s) in MGraph::SetBackgroundImage() für Dateiname: %s',2),
|
||||
12004 => array('Das Bildformat des Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1),
|
||||
12005 => array('Das Hintergrundbild kann nicht gelesen werden: %s',1),
|
||||
12006 => array('Es wurden ungültige Größen für Breite oder Höhe beim Erstellen des Bildes angegeben, (Breite=%d, Höhe=%d)',2),
|
||||
12007 => array('Das Argument für MGraph::Add() ist nicht gültig für GD.',0),
|
||||
12008 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Bildformate zu unterstützen.',0),
|
||||
12009 => array('Deine PHP-Installation unterstützt das gewählte Bildformat nicht: %s',1),
|
||||
12010 => array('Es konnte kein Bild als Datei %s erzeugt werden. Überprüfe, ob Du die entsprechenden Schreibrechte im aktuellen Verzeichnis hast.',1),
|
||||
12011 => array('Es konnte kein Truecolor-Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0),
|
||||
12012 => array('Es konnte kein Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0),
|
||||
12006 => array('Es wurden ungültige Größen für Breite oder Höhe beim Erstellen des Bildes angegeben, (Breite=%d, Höhe=%d)',2),
|
||||
12007 => array('Das Argument für MGraph::Add() ist nicht gültig für GD.',0),
|
||||
12008 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Bildformate zu unterstützen.',0),
|
||||
12009 => array('Deine PHP-Installation unterstützt das gewählte Bildformat nicht: %s',1),
|
||||
12010 => array('Es konnte kein Bild als Datei %s erzeugt werden. Überprüfe, ob Du die entsprechenden Schreibrechte im aktuellen Verzeichnis hast.',1),
|
||||
12011 => array('Es konnte kein Truecolor-Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0),
|
||||
12012 => array('Es konnte kein Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_pie3d
|
||||
*/
|
||||
|
||||
14001 => array('Pie3D::ShowBorder(). Missbilligte Funktion. Benutze Pie3D::SetEdge(), um die Ecken der Tortenstücke zu kontrollieren.',0),
|
||||
14001 => array('Pie3D::ShowBorder(). Missbilligte Funktion. Benutze Pie3D::SetEdge(), um die Ecken der Tortenstücke zu kontrollieren.',0),
|
||||
14002 => array('PiePlot3D::SetAngle() 3D-Torten-Projektionswinkel muss zwischen 5 und 85 Grad sein.',0),
|
||||
14003 => array('Interne Festlegung schlug fehl. Pie3D::Pie3DSlice',0),
|
||||
14004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0),
|
||||
14005 => array('Pie3D Interner Fehler: Versuch, zweimal zu umhüllen bei der Suche nach dem Startindex.',0,),
|
||||
14006 => array('Pie3D Interner Fehler: Z-Sortier-Algorithmus für 3D-Tortendiagramme funktioniert nicht einwandfrei (2). Versuch, zweimal zu umhüllen beim Erstellen des Bildes.',0),
|
||||
14007 => array('Die Breite für das 3D-Tortendiagramm ist 0. Gib eine Breite > 0 an.',0),
|
||||
14004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0),
|
||||
14005 => array('Pie3D Interner Fehler: Versuch, zweimal zu umhüllen bei der Suche nach dem Startindex.',0,),
|
||||
14006 => array('Pie3D Interner Fehler: Z-Sortier-Algorithmus für 3D-Tortendiagramme funktioniert nicht einwandfrei (2). Versuch, zweimal zu umhüllen beim Erstellen des Bildes.',0),
|
||||
14007 => array('Die Breite für das 3D-Tortendiagramm ist 0. Gib eine Breite > 0 an.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_pie
|
||||
*/
|
||||
|
||||
15001 => array('PiePLot::SetTheme() Unbekannter Stil: %s',1),
|
||||
15002 => array('Argument für PiePlot::ExplodeSlice() muss ein Integer-Wert sein',0),
|
||||
15003 => array('Argument für PiePlot::Explode() muss ein Vektor mit Integer-Werten sein.',0),
|
||||
15004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0),
|
||||
15002 => array('Argument für PiePlot::ExplodeSlice() muss ein Integer-Wert sein',0),
|
||||
15003 => array('Argument für PiePlot::Explode() muss ein Vektor mit Integer-Werten sein.',0),
|
||||
15004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0),
|
||||
15005 => array('PiePlot::SetFont() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetFont().',0),
|
||||
15006 => array('PiePlot::SetSize() Radius für Tortendiagramm muss entweder als Bruch [0, 0.5] der Bildgröße oder als Absoluwert in Pixel im Bereich [10, 1000] angegeben werden.',0),
|
||||
15006 => array('PiePlot::SetSize() Radius für Tortendiagramm muss entweder als Bruch [0, 0.5] der Bildgröße oder als Absoluwert in Pixel im Bereich [10, 1000] angegeben werden.',0),
|
||||
15007 => array('PiePlot::SetFontColor() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetColor()..',0),
|
||||
15008 => array('PiePlot::SetLabelType() der Typ für Tortendiagramme muss entweder 0 or 1 sein (nicht %d).',1),
|
||||
15009 => array('Ungültiges Tortendiagramm. Die Summe aller Daten ist Null.',0),
|
||||
15008 => array('PiePlot::SetLabelType() der Typ für Tortendiagramme muss entweder 0 or 1 sein (nicht %d).',1),
|
||||
15009 => array('Ungültiges Tortendiagramm. Die Summe aller Daten ist Null.',0),
|
||||
15010 => array('Die Summe aller Daten ist Null.',0),
|
||||
15011 => array('Um Bildtransformationen benutzen zu können, muss die Datei jpgraph_imgtrans.php eingefügt werden (per include).',0),
|
||||
15011 => array('Um Bildtransformationen benutzen zu können, muss die Datei jpgraph_imgtrans.php eingefügt werden (per include).',0),
|
||||
|
||||
/*
|
||||
** jpgraph_plotband
|
||||
*/
|
||||
|
||||
16001 => array('Die Dichte für das Pattern muss zwischen 1 und 100 sein. (Du hast %f eingegeben)',1),
|
||||
16002 => array('Es wurde keine Position für das Pattern angegeben.',0),
|
||||
16001 => array('Die Dichte für das Pattern muss zwischen 1 und 100 sein. (Du hast %f eingegeben)',1),
|
||||
16002 => array('Es wurde keine Position für das Pattern angegeben.',0),
|
||||
16003 => array('Unbekannte Pattern-Definition (%d)',0),
|
||||
16004 => array('Der Mindeswert für das PlotBand ist größer als der Maximalwert. Bitte korrigiere dies!',0),
|
||||
16004 => array('Der Mindeswert für das PlotBand ist größer als der Maximalwert. Bitte korrigiere dies!',0),
|
||||
|
||||
|
||||
/*
|
||||
** jpgraph_polar
|
||||
*/
|
||||
|
||||
17001 => array('PolarPlots müssen eine gerade Anzahl von Datenpunkten haben. Jeder Datenpunkt ist ein Tupel (Winkel, Radius).',0),
|
||||
17002 => array('Unbekannte Ausrichtung für X-Achsen-Titel. (%s)',1),
|
||||
//17003 => array('Set90AndMargin() wird für PolarGraph nicht unterstützt.',0),
|
||||
17004 => array('Unbekannter Achsentyp für PolarGraph. Er muss entweder \'lin\' oder \'log\' sein.',0),
|
||||
17001 => array('PolarPlots müssen eine gerade Anzahl von Datenpunkten haben. Jeder Datenpunkt ist ein Tupel (Winkel, Radius).',0),
|
||||
17002 => array('Unbekannte Ausrichtung für X-Achsen-Titel. (%s)',1),
|
||||
//17003 => array('Set90AndMargin() wird für PolarGraph nicht unterstützt.',0),
|
||||
17004 => array('Unbekannter Achsentyp für PolarGraph. Er muss entweder \'lin\' oder \'log\' sein.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_radar
|
||||
*/
|
||||
|
||||
18001 => array('ClientSideImageMaps werden für RadarPlots nicht unterstützt.',0),
|
||||
18001 => array('ClientSideImageMaps werden für RadarPlots nicht unterstützt.',0),
|
||||
18002 => array('RadarGraph::SupressTickMarks() sollte nicht mehr verwendet werden. Benutze stattdessen HideTickMarks().',0),
|
||||
18003 => array('Ungültiger Achsentyp für RadarPlot (%s). Er muss entweder \'lin\' oder \'log\' sein.',1),
|
||||
18004 => array('Die RadarPlot-Größe muss zwischen 0.1 und 1 sein. (Dein Wert=%f)',1),
|
||||
18005 => array('RadarPlot: nicht unterstützte Tick-Dichte: %d',1),
|
||||
18003 => array('Ungültiger Achsentyp für RadarPlot (%s). Er muss entweder \'lin\' oder \'log\' sein.',1),
|
||||
18004 => array('Die RadarPlot-Größe muss zwischen 0.1 und 1 sein. (Dein Wert=%f)',1),
|
||||
18005 => array('RadarPlot: nicht unterstützte Tick-Dichte: %d',1),
|
||||
18006 => array('Minimum Daten %f (RadarPlots sollten nur verwendet werden, wenn alle Datenpunkte einen Wert > 0 haben).',1),
|
||||
18007 => array('Die Anzahl der Titel entspricht nicht der Anzahl der Datenpunkte.',0),
|
||||
18008 => array('Jeder RadarPlot muss die gleiche Anzahl von Datenpunkten haben.',0),
|
||||
@ -222,29 +224,29 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
*/
|
||||
|
||||
19001 => array('Spline: Anzahl der X- und Y-Koordinaten muss gleich sein.',0),
|
||||
19002 => array('Ungültige Dateneingabe für Spline. Zwei oder mehr aufeinanderfolgende X-Werte sind identisch. Jeder eigegebene X-Wert muss unterschiedlich sein, weil vom mathematischen Standpunkt ein Eins-zu-Eins-Mapping vorliegen muss, d.h. jeder X-Wert korrespondiert mit exakt einem Y-Wert.',0),
|
||||
19002 => array('Ungültige Dateneingabe für Spline. Zwei oder mehr aufeinanderfolgende X-Werte sind identisch. Jeder eigegebene X-Wert muss unterschiedlich sein, weil vom mathematischen Standpunkt ein Eins-zu-Eins-Mapping vorliegen muss, d.h. jeder X-Wert korrespondiert mit exakt einem Y-Wert.',0),
|
||||
19003 => array('Bezier: Anzahl der X- und Y-Koordinaten muss gleich sein.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_scatter
|
||||
*/
|
||||
|
||||
20001 => array('Fieldplots müssen die gleiche Anzahl von X und Y Datenpunkten haben.',0),
|
||||
20002 => array('Bei Fieldplots muss ein Winkel für jeden X und Y Datenpunkt angegeben werden.',0),
|
||||
20003 => array('Scatterplots müssen die gleiche Anzahl von X- und Y-Datenpunkten haben.',0),
|
||||
20001 => array('Fieldplots müssen die gleiche Anzahl von X und Y Datenpunkten haben.',0),
|
||||
20002 => array('Bei Fieldplots muss ein Winkel für jeden X und Y Datenpunkt angegeben werden.',0),
|
||||
20003 => array('Scatterplots müssen die gleiche Anzahl von X- und Y-Datenpunkten haben.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_stock
|
||||
*/
|
||||
|
||||
21001 => array('Die Anzahl der Datenwerte für Stock-Charts müssen ein Mehrfaches von %d Datenpunkten sein.',1),
|
||||
21001 => array('Die Anzahl der Datenwerte für Stock-Charts müssen ein Mehrfaches von %d Datenpunkten sein.',1),
|
||||
|
||||
/*
|
||||
** jpgraph_plotmark
|
||||
*/
|
||||
|
||||
23001 => array('Der Marker "%s" existiert nicht in der Farbe: %d',2),
|
||||
23002 => array('Der Farb-Index ist zu hoch für den Marker "%s"',1),
|
||||
23002 => array('Der Farb-Index ist zu hoch für den Marker "%s"',1),
|
||||
23003 => array('Ein Dateiname muss angegeben werden, wenn Du den Marker-Typ auf MARK_IMG setzt.',0),
|
||||
|
||||
/*
|
||||
@ -259,64 +261,64 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph
|
||||
*/
|
||||
|
||||
25001 => array('Diese PHP-Installation ist nicht mit der GD-Bibliothek kompiliert. Bitte kompiliere PHP mit GD-Unterstützung neu, damit JpGraph funktioniert. (Weder die Funktion imagetypes() noch imagecreatefromstring() existiert!)',0),
|
||||
25002 => array('Diese PHP-Installation scheint nicht die benötigte GD-Bibliothek zu unterstützen. Bitte schau in der PHP-Dokumentation nach, wie man die GD-Bibliothek installiert und aktiviert.',0),
|
||||
25001 => array('Diese PHP-Installation ist nicht mit der GD-Bibliothek kompiliert. Bitte kompiliere PHP mit GD-Unterstützung neu, damit JpGraph funktioniert. (Weder die Funktion imagetypes() noch imagecreatefromstring() existiert!)',0),
|
||||
25002 => array('Diese PHP-Installation scheint nicht die benötigte GD-Bibliothek zu unterstützen. Bitte schau in der PHP-Dokumentation nach, wie man die GD-Bibliothek installiert und aktiviert.',0),
|
||||
25003 => array('Genereller PHP Fehler : Bei %s:%d : %s',3),
|
||||
25004 => array('Genereller PHP Fehler : %s ',1),
|
||||
25005 => array('PHP_SELF, die PHP-Global-Variable kann nicht ermittelt werden. PHP kann nicht von der Kommandozeile gestartet werden, wenn der Cache oder die Bilddateien automatisch benannt werden sollen.',0),
|
||||
25006 => array('Die Benutzung der FF_CHINESE (FF_BIG5) Schriftfamilie benötigt die iconv() Funktion in Deiner PHP-Konfiguration. Dies wird nicht defaultmäßig in PHP kompiliert (benötigt "--width-iconv" bei der Konfiguration).',0),
|
||||
25007 => array('Du versuchst das lokale (%s) zu verwenden, was von Deiner PHP-Installation nicht unterstützt wird. Hinweis: Benutze \'\', um das defaultmäßige Lokale für diese geographische Region festzulegen.',1),
|
||||
25008 => array('Die Bild-Breite und Höhe in Graph::Graph() müssen numerisch sein',0),
|
||||
25006 => array('Die Benutzung der FF_CHINESE (FF_BIG5) Schriftfamilie benötigt die iconv() Funktion in Deiner PHP-Konfiguration. Dies wird nicht defaultmäßig in PHP kompiliert (benötigt "--width-iconv" bei der Konfiguration).',0),
|
||||
25007 => array('Du versuchst das lokale (%s) zu verwenden, was von Deiner PHP-Installation nicht unterstützt wird. Hinweis: Benutze \'\', um das defaultmäßige Lokale für diese geographische Region festzulegen.',1),
|
||||
25008 => array('Die Bild-Breite und Höhe in Graph::Graph() müssen numerisch sein',0),
|
||||
25009 => array('Die Skalierung der Achsen muss angegeben werden mit Graph::SetScale()',0),
|
||||
|
||||
25010 => array('Graph::Add() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25011 => array('Graph::AddY2() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25012 => array('Graph::AddYN() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25013 => array('Es können nur Standard-Plots zu multiplen Y-Achsen hinzugefügt werden',0),
|
||||
25014 => array('Graph::AddText() Du hast versucht, einen leeren Text zum Graph hinzuzufügen.',0),
|
||||
25015 => array('Graph::AddLine() Du hast versucht, eine leere Linie zum Graph hinzuzufügen.',0),
|
||||
25016 => array('Graph::AddBand() Du hast versucht, ein leeres Band zum Graph hinzuzufügen.',0),
|
||||
25017 => array('Du benutzt GD 2.x und versuchst, ein Hintergrundbild in einem Truecolor-Bild zu verwenden. Um Hintergrundbilder mit GD 2.x zu verwenden, ist es notwendig, Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Schrift sehr schlecht, wenn Truetype-Schrift in Truecolor-Bildern verwendet werden.',0),
|
||||
25018 => array('Falscher Dateiname für Graph::SetBackgroundImage() : "%s" muss eine gültige Dateinamenerweiterung (jpg,gif,png) haben, wenn die automatische Dateityperkennung verwenndet werden soll.',1),
|
||||
25019 => array('Unbekannte Dateinamenerweiterung (%s) in Graph::SetBackgroundImage() für Dateiname: "%s"',2),
|
||||
25010 => array('Graph::Add() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25011 => array('Graph::AddY2() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25012 => array('Graph::AddYN() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0),
|
||||
25013 => array('Es können nur Standard-Plots zu multiplen Y-Achsen hinzugefügt werden',0),
|
||||
25014 => array('Graph::AddText() Du hast versucht, einen leeren Text zum Graph hinzuzufügen.',0),
|
||||
25015 => array('Graph::AddLine() Du hast versucht, eine leere Linie zum Graph hinzuzufügen.',0),
|
||||
25016 => array('Graph::AddBand() Du hast versucht, ein leeres Band zum Graph hinzuzufügen.',0),
|
||||
25017 => array('Du benutzt GD 2.x und versuchst, ein Hintergrundbild in einem Truecolor-Bild zu verwenden. Um Hintergrundbilder mit GD 2.x zu verwenden, ist es notwendig, Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Schrift sehr schlecht, wenn Truetype-Schrift in Truecolor-Bildern verwendet werden.',0),
|
||||
25018 => array('Falscher Dateiname für Graph::SetBackgroundImage() : "%s" muss eine gültige Dateinamenerweiterung (jpg,gif,png) haben, wenn die automatische Dateityperkennung verwenndet werden soll.',1),
|
||||
25019 => array('Unbekannte Dateinamenerweiterung (%s) in Graph::SetBackgroundImage() für Dateiname: "%s"',2),
|
||||
|
||||
25020 => array('Graph::SetScale(): Dar Maximalwert muss größer sein als der Mindestwert.',0),
|
||||
25021 => array('Unbekannte Achsendefinition für die Y-Achse. (%s)',1),
|
||||
25022 => array('Unbekannte Achsendefinition für die X-Achse. (%s)',1),
|
||||
25023 => array('Nicht unterstützter Y2-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1),
|
||||
25024 => array('Nicht unterstützter X-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1),
|
||||
25025 => array('Nicht unterstützte Tick-Dichte: %d',1),
|
||||
25026 => array('Nicht unterstützter Typ der nicht angegebenen Y-Achse. Du hast entweder: 1. einen Y-Achsentyp für automatisches Skalieren definiert, aber keine Plots angegeben. 2. eine Achse direkt definiert, aber vergessen, die Tick-Dichte zu festzulegen.',0),
|
||||
25027 => array('Kann cached CSIM "%s" zum Lesen nicht öffnen.',1),
|
||||
25028 => array('Apache/PHP hat keine Schreibrechte, in das CSIM-Cache-Verzeichnis (%s) zu schreiben. Überprüfe die Rechte.',1),
|
||||
25029 => array('Kann nicht in das CSIM "%s" schreiben. Überprüfe die Schreibrechte und den freien Speicherplatz.',1),
|
||||
25020 => array('Graph::SetScale(): Dar Maximalwert muss größer sein als der Mindestwert.',0),
|
||||
25021 => array('Unbekannte Achsendefinition für die Y-Achse. (%s)',1),
|
||||
25022 => array('Unbekannte Achsendefinition für die X-Achse. (%s)',1),
|
||||
25023 => array('Nicht unterstützter Y2-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1),
|
||||
25024 => array('Nicht unterstützter X-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1),
|
||||
25025 => array('Nicht unterstützte Tick-Dichte: %d',1),
|
||||
25026 => array('Nicht unterstützter Typ der nicht angegebenen Y-Achse. Du hast entweder: 1. einen Y-Achsentyp für automatisches Skalieren definiert, aber keine Plots angegeben. 2. eine Achse direkt definiert, aber vergessen, die Tick-Dichte zu festzulegen.',0),
|
||||
25027 => array('Kann cached CSIM "%s" zum Lesen nicht öffnen.',1),
|
||||
25028 => array('Apache/PHP hat keine Schreibrechte, in das CSIM-Cache-Verzeichnis (%s) zu schreiben. Überprüfe die Rechte.',1),
|
||||
25029 => array('Kann nicht in das CSIM "%s" schreiben. Überprüfe die Schreibrechte und den freien Speicherplatz.',1),
|
||||
|
||||
25030 => array('Fehlender Skriptname für StrokeCSIM(). Der Name des aktuellen Skriptes muss als erster Parameter von StrokeCSIM() angegeben werden.',0),
|
||||
25030 => array('Fehlender Skriptname für StrokeCSIM(). Der Name des aktuellen Skriptes muss als erster Parameter von StrokeCSIM() angegeben werden.',0),
|
||||
25031 => array('Der Achsentyp muss mittels Graph::SetScale() angegeben werden.',0),
|
||||
25032 => array('Es existieren keine Plots für die Y-Achse nbr:%d',1),
|
||||
25032 => array('Es existieren keine Plots für die Y-Achse nbr:%d',1),
|
||||
25033 => array('',0),
|
||||
25034 => array('Undefinierte X-Achse kann nicht gezeichnet werden. Es wurden keine Plots definiert.',0),
|
||||
25035 => array('Du hast Clipping aktiviert. Clipping wird nur für Diagramme mit 0 oder 90 Grad Rotation unterstützt. Bitte verändere Deinen Rotationswinkel (=%d Grad) dementsprechend oder deaktiviere Clipping.',1),
|
||||
25035 => array('Du hast Clipping aktiviert. Clipping wird nur für Diagramme mit 0 oder 90 Grad Rotation unterstützt. Bitte verändere Deinen Rotationswinkel (=%d Grad) dementsprechend oder deaktiviere Clipping.',1),
|
||||
25036 => array('Unbekannter Achsentyp AxisStyle() : %s',1),
|
||||
25037 => array('Das Bildformat Deines Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1),
|
||||
25037 => array('Das Bildformat Deines Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1),
|
||||
25038 => array('Das Hintergrundbild scheint von einem anderen Typ (unterschiedliche Dateierweiterung) zu sein als der angegebene Typ. Angegebenen: %s; Datei: %s',2),
|
||||
25039 => array('Hintergrundbild kann nicht gelesen werden: "%s"',1),
|
||||
|
||||
25040 => array('Es ist nicht möglich, sowohl ein Hintergrundbild als auch eine Hintergrund-Landesflagge anzugeben.',0),
|
||||
25041 => array('Um Landesflaggen als Hintergrund benutzen zu können, muss die Datei "jpgraph_flags.php" eingefügt werden (per include).',0),
|
||||
25040 => array('Es ist nicht möglich, sowohl ein Hintergrundbild als auch eine Hintergrund-Landesflagge anzugeben.',0),
|
||||
25041 => array('Um Landesflaggen als Hintergrund benutzen zu können, muss die Datei "jpgraph_flags.php" eingefügt werden (per include).',0),
|
||||
25042 => array('Unbekanntes Hintergrundbild-Layout',0),
|
||||
25043 => array('Unbekannter Titelhintergrund-Stil.',0),
|
||||
25044 => array('Automatisches Skalieren kann nicht verwendet werden, weil es unmöglich ist, einen gültigen min/max Wert für die Y-Achse zu ermitteln (nur Null-Werte).',0),
|
||||
25045 => array('Die Schriftfamilien FF_HANDWRT und FF_BOOK sind wegen Copyright-Problemen nicht mehr verfügbar. Diese Schriften können nicht mehr mit JpGraph verteilt werden. Bitte lade Dir Schriften von http://corefonts.sourceforge.net/ herunter.',0),
|
||||
25044 => array('Automatisches Skalieren kann nicht verwendet werden, weil es unmöglich ist, einen gültigen min/max Wert für die Y-Achse zu ermitteln (nur Null-Werte).',0),
|
||||
25045 => array('Die Schriftfamilien FF_HANDWRT und FF_BOOK sind wegen Copyright-Problemen nicht mehr verfügbar. Diese Schriften können nicht mehr mit JpGraph verteilt werden. Bitte lade Dir Schriften von http://corefonts.sourceforge.net/ herunter.',0),
|
||||
25046 => array('Angegebene TTF-Schriftfamilie (id=%d) ist unbekannt oder existiert nicht. Bitte merke Dir, dass TTF-Schriften wegen Copyright-Problemen nicht mit JpGraph mitgeliefert werden. Du findest MS-TTF-Internetschriften (arial, courier, etc.) zum Herunterladen unter http://corefonts.sourceforge.net/',1),
|
||||
25047 => array('Stil %s ist nicht verfügbar für Schriftfamilie %s',2),
|
||||
25047 => array('Stil %s ist nicht verfügbar für Schriftfamilie %s',2),
|
||||
25048 => array('Unbekannte Schriftstildefinition [%s].',1),
|
||||
25049 => array('Schriftdatei "%s" ist nicht lesbar oder existiert nicht.',1),
|
||||
|
||||
25050 => array('Erstes Argument für Text::Text() muss ein String sein.',0),
|
||||
25051 => array('Ungültige Richtung angegeben für Text.',0),
|
||||
25052 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte vertikale Ausrichtung für Text.',0),
|
||||
25053 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte horizontale Ausrichtung für Text.',0),
|
||||
25050 => array('Erstes Argument für Text::Text() muss ein String sein.',0),
|
||||
25051 => array('Ungültige Richtung angegeben für Text.',0),
|
||||
25052 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte vertikale Ausrichtung für Text.',0),
|
||||
25053 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte horizontale Ausrichtung für Text.',0),
|
||||
25054 => array('Interner Fehler: Unbekannte Grid-Achse %s',1),
|
||||
25055 => array('Axis::SetTickDirection() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetTickSide().',0),
|
||||
25056 => array('SetTickLabelMargin() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelMargin().',0),
|
||||
@ -324,81 +326,91 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
25058 => array('TextLabelIntevall >= 1 muss angegeben werden.',0),
|
||||
25059 => array('SetLabelPos() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelSide().',0),
|
||||
|
||||
25060 => array('Unbekannte Ausrichtung angegeben für X-Achsentitel (%s).',1),
|
||||
25061 => array('Unbekannte Ausrichtung angegeben für Y-Achsentitel (%s).',1),
|
||||
25062 => array('Label unter einem Winkel werden für die Y-Achse nicht unterstützt.',0),
|
||||
25060 => array('Unbekannte Ausrichtung angegeben für X-Achsentitel (%s).',1),
|
||||
25061 => array('Unbekannte Ausrichtung angegeben für Y-Achsentitel (%s).',1),
|
||||
25062 => array('Label unter einem Winkel werden für die Y-Achse nicht unterstützt.',0),
|
||||
25063 => array('Ticks::SetPrecision() sollte nicht mehr verwendet werden. Benutze stattdessen Ticks::SetLabelFormat() (oder Ticks::SetFormatCallback()).',0),
|
||||
25064 => array('Kleinere oder größere Schrittgröße ist 0. Überprüfe, ob Du fälschlicherweise SetTextTicks(0) in Deinem Skript hast. Wenn dies nicht der Fall ist, bist Du eventuell über einen Bug in JpGraph gestolpert. Bitte sende einen Report und füge den Code an, der den Fehler verursacht hat.',0),
|
||||
25065 => array('Tick-Positionen müssen als array() angegeben werden',0),
|
||||
25064 => array('Kleinere oder größere Schrittgröße ist 0. Überprüfe, ob Du fälschlicherweise SetTextTicks(0) in Deinem Skript hast. Wenn dies nicht der Fall ist, bist Du eventuell über einen Bug in JpGraph gestolpert. Bitte sende einen Report und füge den Code an, der den Fehler verursacht hat.',0),
|
||||
25065 => array('Tick-Positionen müssen als array() angegeben werden',0),
|
||||
25066 => array('Wenn die Tick-Positionen und -Label von Hand eingegeben werden, muss die Anzahl der Ticks und der Label gleich sein.',0),
|
||||
25067 => array('Deine von Hand eingegebene Achse und Ticks sind nicht korrekt. Die Skala scheint zu klein zu sein für den Tickabstand.',0),
|
||||
25068 => array('Ein Plot hat eine ungültige Achse. Dies kann beispielsweise der Fall sein, wenn Du automatisches Text-Skalieren verwendest, um ein Liniendiagramm zu zeichnen mit nur einem Datenpunkt, oder wenn die Bildfläche zu klein ist. Es kann auch der Fall sein, dass kein Datenpunkt einen numerischen Wert hat (vielleicht nur \'-\' oder \'x\').',0),
|
||||
25069 => array('Grace muss größer sein als 0',0),
|
||||
25067 => array('Deine von Hand eingegebene Achse und Ticks sind nicht korrekt. Die Skala scheint zu klein zu sein für den Tickabstand.',0),
|
||||
25068 => array('Ein Plot hat eine ungültige Achse. Dies kann beispielsweise der Fall sein, wenn Du automatisches Text-Skalieren verwendest, um ein Liniendiagramm zu zeichnen mit nur einem Datenpunkt, oder wenn die Bildfläche zu klein ist. Es kann auch der Fall sein, dass kein Datenpunkt einen numerischen Wert hat (vielleicht nur \'-\' oder \'x\').',0),
|
||||
25069 => array('Grace muss größer sein als 0',0),
|
||||
|
||||
25070 => array('Deine Daten enthalten nicht-numerische Werte.',0),
|
||||
25071 => array('Du hast mit SetAutoMin() einen Mindestwert angegeben, der größer ist als der Maximalwert für die Achse. Dies ist nicht möglich.',0),
|
||||
25072 => array('Du hast mit SetAutoMax() einen Maximalwert angegeben, der kleiner ist als der Minimalwert der Achse. Dies ist nicht möglich.',0),
|
||||
25073 => array('Interner Fehler. Der Integer-Skalierungs-Algorithmus-Vergleich ist außerhalb der Grenzen (r=%f).',1),
|
||||
25074 => array('Interner Fehler. Der Skalierungsbereich ist negativ (%f) [für %s Achse]. Dieses Problem könnte verursacht werden durch den Versuch, \'ungültige\' Werte in die Daten-Vektoren einzugeben (z.B. nur String- oder NULL-Werte), was beim automatischen Skalieren einen Fehler erzeugt.',2),
|
||||
25075 => array('Die automatischen Ticks können nicht gesetzt werden, weil min==max.',0),
|
||||
25077 => array('Einstellfaktor für die Farbe muss größer sein als 0',0),
|
||||
25071 => array('Du hast mit SetAutoMin() einen Mindestwert angegeben, der größer ist als der Maximalwert für die Achse. Dies ist nicht möglich.',0),
|
||||
25072 => array('Du hast mit SetAutoMax() einen Maximalwert angegeben, der kleiner ist als der Minimalwert der Achse. Dies ist nicht möglich.',0),
|
||||
25073 => array('Interner Fehler. Der Integer-Skalierungs-Algorithmus-Vergleich ist außerhalb der Grenzen (r=%f).',1),
|
||||
25074 => array('Interner Fehler. Der Skalierungsbereich ist negativ (%f) [für %s Achse]. Dieses Problem könnte verursacht werden durch den Versuch, \'ungültige\' Werte in die Daten-Vektoren einzugeben (z.B. nur String- oder NULL-Werte), was beim automatischen Skalieren einen Fehler erzeugt.',2),
|
||||
25075 => array('Die automatischen Ticks können nicht gesetzt werden, weil min==max.',0),
|
||||
25077 => array('Einstellfaktor für die Farbe muss größer sein als 0',0),
|
||||
25078 => array('Unbekannte Farbe: %s',1),
|
||||
25079 => array('Unbekannte Farbdefinition: %s, Größe=%d',2),
|
||||
25079 => array('Unbekannte Farbdefinition: %s, Größe=%d',2),
|
||||
|
||||
25080 => array('Der Alpha-Parameter für Farben muss zwischen 0.0 und 1.0 liegen.',0),
|
||||
25081 => array('Das ausgewählte Grafikformat wird entweder nicht unterstützt oder ist unbekannt [%s]',1),
|
||||
25082 => array('Es wurden ungültige Größen für Breite und Höhe beim Erstellen des Bildes definiert (Breite=%d, Höhe=%d).',2),
|
||||
25083 => array('Es wurde eine ungültige Größe beim Kopieren des Bildes angegeben. Die Größe für das kopierte Bild wurde auf 1 Pixel oder weniger gesetzt.',0),
|
||||
25084 => array('Fehler beim Erstellen eines temporären GD-Canvas. Möglicherweise liegt ein Arbeitsspeicherproblem vor.',0),
|
||||
25085 => array('Ein Bild kann nicht aus dem angegebenen String erzeugt werden. Er ist entweder in einem nicht unterstützen Format oder er represäntiert ein kaputtes Bild.',0),
|
||||
25086 => array('Du scheinst nur GD 1.x installiert zu haben. Um Alphablending zu aktivieren, ist GD 2.x oder höher notwendig. Bitte installiere GD 2.x oder versichere Dich, dass die Konstante USE_GD2 richtig gesetzt ist. Standardmäßig wird die installierte GD-Version automatisch erkannt. Ganz selten wird GD2 erkannt, obwohl nur GD1 installiert ist. Die Konstante USE_GD2 muss dann zu "false" gesetzt werden.',0),
|
||||
25087 => array('Diese PHP-Version wurde ohne TTF-Unterstützung konfiguriert. PHP muss mit TTF-Unterstützung neu kompiliert und installiert werden.',0),
|
||||
25088 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontwidth() ist fehlerhaft.',0),
|
||||
25089 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontheight() ist fehlerhaft.',0),
|
||||
25080 => array('Der Alpha-Parameter für Farben muss zwischen 0.0 und 1.0 liegen.',0),
|
||||
25081 => array('Das ausgewählte Grafikformat wird entweder nicht unterstützt oder ist unbekannt [%s]',1),
|
||||
25082 => array('Es wurden ungültige Größen für Breite und Höhe beim Erstellen des Bildes definiert (Breite=%d, Höhe=%d).',2),
|
||||
25083 => array('Es wurde eine ungültige Größe beim Kopieren des Bildes angegeben. Die Größe für das kopierte Bild wurde auf 1 Pixel oder weniger gesetzt.',0),
|
||||
25084 => array('Fehler beim Erstellen eines temporären GD-Canvas. Möglicherweise liegt ein Arbeitsspeicherproblem vor.',0),
|
||||
25085 => array('Ein Bild kann nicht aus dem angegebenen String erzeugt werden. Er ist entweder in einem nicht unterstützen Format oder er represäntiert ein kaputtes Bild.',0),
|
||||
25086 => array('Du scheinst nur GD 1.x installiert zu haben. Um Alphablending zu aktivieren, ist GD 2.x oder höher notwendig. Bitte installiere GD 2.x oder versichere Dich, dass die Konstante USE_GD2 richtig gesetzt ist. Standardmäßig wird die installierte GD-Version automatisch erkannt. Ganz selten wird GD2 erkannt, obwohl nur GD1 installiert ist. Die Konstante USE_GD2 muss dann zu "false" gesetzt werden.',0),
|
||||
25087 => array('Diese PHP-Version wurde ohne TTF-Unterstützung konfiguriert. PHP muss mit TTF-Unterstützung neu kompiliert und installiert werden.',0),
|
||||
25088 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontwidth() ist fehlerhaft.',0),
|
||||
25089 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontheight() ist fehlerhaft.',0),
|
||||
|
||||
25090 => array('Unbekannte Richtung angegeben im Aufruf von StrokeBoxedText() [%s].',1),
|
||||
25091 => array('Die interne Schrift untestützt das Schreiben von Text in einem beliebigen Winkel nicht. Benutze stattdessen TTF-Schriften.',0),
|
||||
25092 => array('Es liegt entweder ein Konfigurationsproblem mit TrueType oder ein Problem beim Lesen der Schriftdatei "%s" vor. Versichere Dich, dass die Datei existiert und Leserechte und -pfad vergeben sind. (wenn \'basedir\' restriction in PHP aktiviert ist, muss die Schriftdatei im Dokumentwurzelverzeichnis abgelegt werden). Möglicherweise ist die FreeType-Bibliothek falsch installiert. Versuche, mindestens zur FreeType-Version 2.1.13 zu aktualisieren und kompiliere GD mit einem korrekten Setup neu, damit die FreeType-Bibliothek gefunden werden kann.',1),
|
||||
25091 => array('Die interne Schrift untestützt das Schreiben von Text in einem beliebigen Winkel nicht. Benutze stattdessen TTF-Schriften.',0),
|
||||
25092 => array('Es liegt entweder ein Konfigurationsproblem mit TrueType oder ein Problem beim Lesen der Schriftdatei "%s" vor. Versichere Dich, dass die Datei existiert und Leserechte und -pfad vergeben sind. (wenn \'basedir\' restriction in PHP aktiviert ist, muss die Schriftdatei im Dokumentwurzelverzeichnis abgelegt werden). Möglicherweise ist die FreeType-Bibliothek falsch installiert. Versuche, mindestens zur FreeType-Version 2.1.13 zu aktualisieren und kompiliere GD mit einem korrekten Setup neu, damit die FreeType-Bibliothek gefunden werden kann.',1),
|
||||
25093 => array('Die Schriftdatei "%s" kann nicht gelesen werden beim Aufruf von Image::GetBBoxTTF. Bitte versichere Dich, dass die Schrift gesetzt wurde, bevor diese Methode aufgerufen wird, und dass die Schrift im TTF-Verzeichnis installiert ist.',1),
|
||||
25094 => array('Die Textrichtung muss in einem Winkel zwischen 0 und 90 engegeben werden.',0),
|
||||
25095 => array('Unbekannte Schriftfamilien-Definition. ',0),
|
||||
25096 => array('Der Farbpalette können keine weiteren Farben zugewiesen werden. Dem Bild wurde bereits die größtmögliche Anzahl von Farben (%d) zugewiesen und die Palette ist voll. Verwende stattdessen ein TrueColor-Bild',0),
|
||||
25096 => array('Der Farbpalette können keine weiteren Farben zugewiesen werden. Dem Bild wurde bereits die größtmögliche Anzahl von Farben (%d) zugewiesen und die Palette ist voll. Verwende stattdessen ein TrueColor-Bild',0),
|
||||
25097 => array('Eine Farbe wurde als leerer String im Aufruf von PushColor() angegegeben.',0),
|
||||
25098 => array('Negativer Farbindex. Unpassender Aufruf von PopColor().',0),
|
||||
25099 => array('Die Parameter für Helligkeit und Kontrast sind außerhalb des zulässigen Bereichs [-1,1]',0),
|
||||
25099 => array('Die Parameter für Helligkeit und Kontrast sind außerhalb des zulässigen Bereichs [-1,1]',0),
|
||||
|
||||
25100 => array('Es liegt ein Problem mit der Farbpalette und dem GD-Setup vor. Bitte deaktiviere anti-aliasing oder verwende GD2 mit TrueColor. Wenn die GD2-Bibliothek installiert ist, versichere Dich, dass die Konstante USE_GD2 auf "true" gesetzt und TrueColor aktiviert ist.',0),
|
||||
25101 => array('Ungültiges numerisches Argument für SetLineStyle(): (%d)',1),
|
||||
25102 => array('Ungültiges String-Argument für SetLineStyle(): %s',1),
|
||||
25103 => array('Ungültiges Argument für SetLineStyle %s',1),
|
||||
25101 => array('Ungültiges numerisches Argument für SetLineStyle(): (%d)',1),
|
||||
25102 => array('Ungültiges String-Argument für SetLineStyle(): %s',1),
|
||||
25103 => array('Ungültiges Argument für SetLineStyle %s',1),
|
||||
25104 => array('Unbekannter Linientyp: %s',1),
|
||||
25105 => array('Es wurden NULL-Daten für ein gefülltes Polygon angegeben. Sorge dafür, dass keine NULL-Daten angegeben werden.',0),
|
||||
25106 => array('Image::FillToBorder : es können keine weiteren Farben zugewiesen werden.',0),
|
||||
25107 => array('In Datei "%s" kann nicht geschrieben werden. Überprüfe die aktuellen Schreibrechte.',1),
|
||||
25108 => array('Das Bild kann nicht gestreamt werden. Möglicherweise liegt ein Fehler im PHP/GD-Setup vor. Kompiliere PHP neu und verwende die eingebaute GD-Bibliothek, die mit PHP angeboten wird.',0),
|
||||
25109 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Grafikformate zu unterstützen. Sorge zunächst dafür, dass GD als PHP-Modul kompiliert ist. Wenn Du außerdem JPEG-Bilder verwenden willst, musst Du die JPEG-Bibliothek installieren. Weitere Details sind in der PHP-Dokumentation zu finden.',0),
|
||||
25105 => array('Es wurden NULL-Daten für ein gefülltes Polygon angegeben. Sorge dafür, dass keine NULL-Daten angegeben werden.',0),
|
||||
25106 => array('Image::FillToBorder : es können keine weiteren Farben zugewiesen werden.',0),
|
||||
25107 => array('In Datei "%s" kann nicht geschrieben werden. Überprüfe die aktuellen Schreibrechte.',1),
|
||||
25108 => array('Das Bild kann nicht gestreamt werden. Möglicherweise liegt ein Fehler im PHP/GD-Setup vor. Kompiliere PHP neu und verwende die eingebaute GD-Bibliothek, die mit PHP angeboten wird.',0),
|
||||
25109 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Grafikformate zu unterstützen. Sorge zunächst dafür, dass GD als PHP-Modul kompiliert ist. Wenn Du außerdem JPEG-Bilder verwenden willst, musst Du die JPEG-Bibliothek installieren. Weitere Details sind in der PHP-Dokumentation zu finden.',0),
|
||||
|
||||
25110 => array('Dein PHP-Installation unterstützt das gewählte Grafikformat nicht: %s',1),
|
||||
25111 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1),
|
||||
25110 => array('Dein PHP-Installation unterstützt das gewählte Grafikformat nicht: %s',1),
|
||||
25111 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1),
|
||||
25112 => array('Das Datum der gecacheten Datei (%s) liegt in der Zukunft.',1),
|
||||
25113 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1),
|
||||
25114 => array('PHP hat nicht die erforderlichen Rechte, um in die Cache-Datei %s zu schreiben. Bitte versichere Dich, dass der Benutzer, der PHP anwendet, die entsprechenden Schreibrechte für die Datei hat, wenn Du das Cache-System in JPGraph verwenden willst.',1),
|
||||
25115 => array('Berechtigung für gecachetes Bild %s kann nicht gesetzt werden. Problem mit den Rechten?',1),
|
||||
25116 => array('Datei kann nicht aus dem Cache %s geöffnet werden',1),
|
||||
25117 => array('Gecachetes Bild %s kann nicht zum Lesen geöffnet werden.',1),
|
||||
25113 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1),
|
||||
25114 => array('PHP hat nicht die erforderlichen Rechte, um in die Cache-Datei %s zu schreiben. Bitte versichere Dich, dass der Benutzer, der PHP anwendet, die entsprechenden Schreibrechte für die Datei hat, wenn Du das Cache-System in JPGraph verwenden willst.',1),
|
||||
25115 => array('Berechtigung für gecachetes Bild %s kann nicht gesetzt werden. Problem mit den Rechten?',1),
|
||||
25116 => array('Datei kann nicht aus dem Cache %s geöffnet werden',1),
|
||||
25117 => array('Gecachetes Bild %s kann nicht zum Lesen geöffnet werden.',1),
|
||||
25118 => array('Verzeichnis %s kann nicht angelegt werden. Versichere Dich, dass PHP die Schreibrechte in diesem Verzeichnis hat.',1),
|
||||
25119 => array('Rechte für Datei %s können nicht gesetzt werden. Problem mit den Rechten?',1),
|
||||
25119 => array('Rechte für Datei %s können nicht gesetzt werden. Problem mit den Rechten?',1),
|
||||
|
||||
25120 => array('Die Position für die Legende muss als Prozentwert im Bereich 0-1 angegeben werden.',0),
|
||||
25121 => array('Eine leerer Datenvektor wurde für den Plot eingegeben. Es muss wenigstens ein Datenpunkt vorliegen.',0),
|
||||
25120 => array('Die Position für die Legende muss als Prozentwert im Bereich 0-1 angegeben werden.',0),
|
||||
25121 => array('Eine leerer Datenvektor wurde für den Plot eingegeben. Es muss wenigstens ein Datenpunkt vorliegen.',0),
|
||||
25122 => array('Stroke() muss als Subklasse der Klasse Plot definiert sein.',0),
|
||||
25123 => array('Du kannst keine Text-X-Achse mit X-Koordinaten verwenden. Benutze stattdessen eine "int" oder "lin" Achse.',0),
|
||||
25124 => array('Der Eingabedatenvektor mus aufeinanderfolgende Werte von 0 aufwärts beinhalten. Der angegebene Y-Vektor beginnt mit leeren Werten (NULL).',0),
|
||||
25125 => array('Ungültige Richtung für statische Linie.',0),
|
||||
25126 => array('Es kann kein TrueColor-Bild erzeugt werden. Überprüfe, ob die GD2-Bibliothek und PHP korrekt aufgesetzt wurden.',0),
|
||||
25124 => array('Der Eingabedatenvektor mus aufeinanderfolgende Werte von 0 aufwärts beinhalten. Der angegebene Y-Vektor beginnt mit leeren Werten (NULL).',0),
|
||||
25125 => array('Ungültige Richtung für statische Linie.',0),
|
||||
25126 => array('Es kann kein TrueColor-Bild erzeugt werden. Überprüfe, ob die GD2-Bibliothek und PHP korrekt aufgesetzt wurden.',0),
|
||||
25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0),
|
||||
25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.',0),
|
||||
25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.',0),
|
||||
25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.',2),
|
||||
|
||||
|
||||
/*
|
||||
** jpgraph_led
|
||||
*/
|
||||
|
||||
25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.',0),
|
||||
|
||||
|
||||
/*
|
||||
**---------------------------------------------------------------------------------------------
|
||||
** Pro-version strings
|
||||
@ -409,19 +421,19 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph_table
|
||||
*/
|
||||
|
||||
27001 => array('GTextTable: Ungültiges Argument für Set(). Das Array-Argument muss 2-- dimensional sein.',0),
|
||||
27002 => array('GTextTable: Ungültiges Argument für Set()',0),
|
||||
27003 => array('GTextTable: Falsche Anzahl von Argumenten für GTextTable::SetColor()',0),
|
||||
27004 => array('GTextTable: Angegebener Zellenbereich, der verschmolzen werden soll, ist ungültig.',0),
|
||||
27005 => array('GTextTable: Bereits verschmolzene Zellen im Bereich (%d,%d) bis (%d,%d) können nicht ein weiteres Mal verschmolzen werden.',4),
|
||||
27006 => array('GTextTable: Spalten-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1),
|
||||
27007 => array('GTextTable: Zeilen-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1),
|
||||
27008 => array('GTextTable: Spalten- und Zeilengröße müssen zu den Dimensionen der Tabelle passen.',0),
|
||||
27001 => array('GTextTable: Ungültiges Argument für Set(). Das Array-Argument muss 2-- dimensional sein.',0),
|
||||
27002 => array('GTextTable: Ungültiges Argument für Set()',0),
|
||||
27003 => array('GTextTable: Falsche Anzahl von Argumenten für GTextTable::SetColor()',0),
|
||||
27004 => array('GTextTable: Angegebener Zellenbereich, der verschmolzen werden soll, ist ungültig.',0),
|
||||
27005 => array('GTextTable: Bereits verschmolzene Zellen im Bereich (%d,%d) bis (%d,%d) können nicht ein weiteres Mal verschmolzen werden.',4),
|
||||
27006 => array('GTextTable: Spalten-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1),
|
||||
27007 => array('GTextTable: Zeilen-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1),
|
||||
27008 => array('GTextTable: Spalten- und Zeilengröße müssen zu den Dimensionen der Tabelle passen.',0),
|
||||
27009 => array('GTextTable: Die Anzahl der Tabellenspalten oder -zeilen ist 0. Versichere Dich, dass die Methoden Init() oder Set() aufgerufen werden.',0),
|
||||
27010 => array('GTextTable: Es wurde keine Ausrichtung beim Aufruf von SetAlign() angegeben.',0),
|
||||
27011 => array('GTextTable: Es wurde eine unbekannte Ausrichtung beim Aufruf von SetAlign() abgegeben. Horizontal=%s, Vertikal=%s',2),
|
||||
27012 => array('GTextTable: Interner Fehler. Es wurde ein ungültiges Argument festgeleget %s',1),
|
||||
27013 => array('GTextTable: Das Argument für FormatNumber() muss ein String sein.',0),
|
||||
27012 => array('GTextTable: Interner Fehler. Es wurde ein ungültiges Argument festgeleget %s',1),
|
||||
27013 => array('GTextTable: Das Argument für FormatNumber() muss ein String sein.',0),
|
||||
27014 => array('GTextTable: Die Tabelle wurde weder mit einem Aufruf von Set() noch von Init() initialisiert.',0),
|
||||
27015 => array('GTextTable: Der Zellenbildbedingungstyp muss entweder TIMG_WIDTH oder TIMG_HEIGHT sein.',0),
|
||||
|
||||
@ -429,25 +441,25 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
** jpgraph_windrose
|
||||
*/
|
||||
|
||||
22001 => array('Die Gesamtsumme der prozentualen Anteile aller Windrosenarme darf 100%% nicht überschreiten!\n(Aktuell max: %d)',1),
|
||||
22002 => array('Das Bild ist zu klein für eine Skala. Bitte vergrößere das Bild.',0),
|
||||
22004 => array('Die Etikettendefinition für Windrosenrichtungen müssen 16 Werte haben (eine für jede Kompassrichtung).',0),
|
||||
22005 => array('Der Linientyp für radiale Linien muss einer von ("solid","dotted","dashed","longdashed") sein.',0),
|
||||
22006 => array('Es wurde ein ungültiger Windrosentyp angegeben.',0),
|
||||
22007 => array('Es wurden zu wenig Werte für die Bereichslegende angegeben.',0),
|
||||
22001 => array('Die Gesamtsumme der prozentualen Anteile aller Windrosenarme darf 100%% nicht überschreiten!\n(Aktuell max: %d)',1),
|
||||
22002 => array('Das Bild ist zu klein für eine Skala. Bitte vergrößere das Bild.',0),
|
||||
22004 => array('Die Etikettendefinition für Windrosenrichtungen müssen 16 Werte haben (eine für jede Kompassrichtung).',0),
|
||||
22005 => array('Der Linientyp für radiale Linien muss einer von ("solid","dotted","dashed","longdashed") sein.',0),
|
||||
22006 => array('Es wurde ein ungültiger Windrosentyp angegeben.',0),
|
||||
22007 => array('Es wurden zu wenig Werte für die Bereichslegende angegeben.',0),
|
||||
22008 => array('Interner Fehler: Versuch, eine freie Windrose zu plotten, obwohl der Typ keine freie Windrose ist.',0),
|
||||
22009 => array('Du hast die gleiche Richtung zweimal angegeben, einmal mit einem Winkel und einmal mit einer Kompassrichtung (%f Grad).',0),
|
||||
22010 => array('Die Richtung muss entweder ein numerischer Wert sein oder eine der 16 Kompassrichtungen',0),
|
||||
22011 => array('Der Windrosenindex muss ein numerischer oder Richtungswert sein. Du hast angegeben Index=%d',1),
|
||||
22012 => array('Die radiale Achsendefinition für die Windrose enthält eine nicht aktivierte Richtung.',0),
|
||||
22013 => array('Du hast dasselbe Look&Feel für die gleiche Kompassrichtung zweimal engegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1),
|
||||
22014 => array('Der Index für eine Kompassrichtung muss zwischen 0 und 15 sein.',0),
|
||||
22012 => array('Die radiale Achsendefinition für die Windrose enthält eine nicht aktivierte Richtung.',0),
|
||||
22013 => array('Du hast dasselbe Look&Feel für die gleiche Kompassrichtung zweimal engegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1),
|
||||
22014 => array('Der Index für eine Kompassrichtung muss zwischen 0 und 15 sein.',0),
|
||||
22015 => array('Du hast einen unbekannten Windrosenplottyp angegeben.',0),
|
||||
22016 => array('Der Windrosenarmindex muss ein numerischer oder ein Richtungswert sein.',0),
|
||||
22017 => array('Die Windrosendaten enthalten eine Richtung, die nicht aktiviert ist. Bitte berichtige, welche Label angezeigt werden sollen.',0),
|
||||
22018 => array('Du hast für dieselbe Kompassrichtung zweimal Daten angegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1),
|
||||
22019 => array('Der Index für eine Richtung muss zwischen 0 und 15 sein. Winkel dürfen nicht für einen regelmäßigen Windplot angegeben werden, sondern entweder ein Index oder eine Kompassrichtung.',0),
|
||||
22020 => array('Der Windrosenplot ist zu groß für die angegebene Bildgröße. Benutze entweder WindrosePlot::SetSize(), um den Plot kleiner zu machen oder vergrößere das Bild im ursprünglichen Aufruf von WindroseGraph().',0),
|
||||
22018 => array('Du hast für dieselbe Kompassrichtung zweimal Daten angegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1),
|
||||
22019 => array('Der Index für eine Richtung muss zwischen 0 und 15 sein. Winkel dürfen nicht für einen regelmäßigen Windplot angegeben werden, sondern entweder ein Index oder eine Kompassrichtung.',0),
|
||||
22020 => array('Der Windrosenplot ist zu groß für die angegebene Bildgröße. Benutze entweder WindrosePlot::SetSize(), um den Plot kleiner zu machen oder vergrößere das Bild im ursprünglichen Aufruf von WindroseGraph().',0),
|
||||
22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph',0),
|
||||
|
||||
/*
|
||||
@ -455,7 +467,7 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
*/
|
||||
|
||||
13001 => array('Unbekannter Nadeltypstil (%d).',1),
|
||||
13002 => array('Ein Wert für das Odometer (%f) ist außerhalb des angegebenen Bereichs [%f,%f]',3),
|
||||
13002 => array('Ein Wert für das Odometer (%f) ist außerhalb des angegebenen Bereichs [%f,%f]',3),
|
||||
|
||||
/*
|
||||
** jpgraph_barcode
|
||||
@ -463,38 +475,63 @@ HTTP header wurden bereits gesendet.<br>Fehler in der Datei <b>%s</b> in der Zei
|
||||
|
||||
1001 => array('Unbekannte Kodier-Specifikation: %s',1),
|
||||
1002 => array('datenvalidierung schlug fehl. [%s] kann nicht mittels der Kodierung "%s" kodiert werden',2),
|
||||
1003 => array('Interner Kodierfehler. Kodieren von %s ist nicht möglich in Code 128',1),
|
||||
1003 => array('Interner Kodierfehler. Kodieren von %s ist nicht möglich in Code 128',1),
|
||||
1004 => array('Interner barcode Fehler. Unbekannter UPC-E Kodiertyp: %s',1),
|
||||
1005 => array('Interner Fehler. Das Textzeichen-Tupel (%s, %s) kann nicht im Code-128 Zeichensatz C kodiert werden.',2),
|
||||
1006 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, CTRL in CHARSET != A zu kodieren.',0),
|
||||
1007 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, DEL in CHARSET != B zu kodieren.',0),
|
||||
1008 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, kleine Buchstaben in CHARSET != B zu kodieren.',0),
|
||||
1009 => array('Kodieren mittels CODE 93 wird noch nicht unterstützt.',0),
|
||||
1010 => array('Kodieren mittels POSTNET wird noch nicht unterstützt.',0),
|
||||
1011 => array('Nicht untrstütztes Barcode-Backend für den Typ %s',1),
|
||||
1006 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, CTRL in CHARSET != A zu kodieren.',0),
|
||||
1007 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, DEL in CHARSET != B zu kodieren.',0),
|
||||
1008 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, kleine Buchstaben in CHARSET != B zu kodieren.',0),
|
||||
1009 => array('Kodieren mittels CODE 93 wird noch nicht unterstützt.',0),
|
||||
1010 => array('Kodieren mittels POSTNET wird noch nicht unterstützt.',0),
|
||||
1011 => array('Nicht untrstütztes Barcode-Backend für den Typ %s',1),
|
||||
|
||||
/*
|
||||
** PDF417
|
||||
*/
|
||||
|
||||
26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.',0),
|
||||
26001 => array('PDF417: Die Anzahl der Spalten muss zwischen 1 und 30 sein.',0),
|
||||
26002 => array('PDF417: Der Fehler-Level muss zwischen 0 und 8 sein.',0),
|
||||
26003 => array('PDF417: Ungültiges Format für Eingabedaten, um sie mit PDF417 zu kodieren.',0),
|
||||
26004 => array('PDF417: die eigebenen Daten können nicht mit Fehler-Level %d und %d spalten kodiert werden, weil daraus zu viele Symbole oder mehr als 90 Zeilen resultieren.',2),
|
||||
26005 => array('PDF417: Die Datei "%s" kann nicht zum Schreiben geöffnet werden.',1),
|
||||
26006 => array('PDF417: Interner Fehler. Die Eingabedatendatei für PDF417-Cluster %d ist fehlerhaft.',1),
|
||||
26007 => array('PDF417: Interner Fehler. GetPattern: Ungültiger Code-Wert %d (Zeile %d)',2),
|
||||
26003 => array('PDF417: Ungültiges Format für Eingabedaten, um sie mit PDF417 zu kodieren.',0),
|
||||
26004 => array('PDF417: die eigebenen Daten können nicht mit Fehler-Level %d und %d spalten kodiert werden, weil daraus zu viele Symbole oder mehr als 90 Zeilen resultieren.',2),
|
||||
26005 => array('PDF417: Die Datei "%s" kann nicht zum Schreiben geöffnet werden.',1),
|
||||
26006 => array('PDF417: Interner Fehler. Die Eingabedatendatei für PDF417-Cluster %d ist fehlerhaft.',1),
|
||||
26007 => array('PDF417: Interner Fehler. GetPattern: Ungültiger Code-Wert %d (Zeile %d)',2),
|
||||
26008 => array('PDF417: Interner Fehler. Modus wurde nicht in der Modusliste!! Modus %d',1),
|
||||
26009 => array('PDF417: Kodierfehler: Ungültiges Zeichen. Zeichen kann nicht mit ASCII-Code %d kodiert werden.',1),
|
||||
26009 => array('PDF417: Kodierfehler: Ungültiges Zeichen. Zeichen kann nicht mit ASCII-Code %d kodiert werden.',1),
|
||||
26010 => array('PDF417: Interner Fehler: Keine Eingabedaten beim Dekodieren.',0),
|
||||
26011 => array('PDF417: Kodierfehler. Numerisches Kodieren bei nicht-numerischen Daten nicht möglich.',0),
|
||||
26012 => array('PDF417: Interner Fehler. Es wurden für den Binary-Kompressor keine Daten zum Dekodieren eingegeben.',0),
|
||||
26011 => array('PDF417: Kodierfehler. Numerisches Kodieren bei nicht-numerischen Daten nicht möglich.',0),
|
||||
26012 => array('PDF417: Interner Fehler. Es wurden für den Binary-Kompressor keine Daten zum Dekodieren eingegeben.',0),
|
||||
26013 => array('PDF417: Interner Fehler. Checksum Fehler. Koeffiziententabellen sind fehlerhaft.',0),
|
||||
26014 => array('PDF417: Interner Fehler. Es wurden keine Daten zum Berechnen von Kodewörtern eingegeben.',0),
|
||||
26015 => array('PDF417: Interner Fehler. Ein Eintrag 0 in die Statusübertragungstabellen ist nicht NULL. Eintrag 1 = (%s)',1),
|
||||
26016 => array('PDF417: Interner Fehler: Nichtregistrierter Statusübertragungsmodus beim Dekodieren.',0),
|
||||
26014 => array('PDF417: Interner Fehler. Es wurden keine Daten zum Berechnen von Kodewörtern eingegeben.',0),
|
||||
26015 => array('PDF417: Interner Fehler. Ein Eintrag 0 in die Statusübertragungstabellen ist nicht NULL. Eintrag 1 = (%s)',1),
|
||||
26016 => array('PDF417: Interner Fehler: Nichtregistrierter Statusübertragungsmodus beim Dekodieren.',0),
|
||||
|
||||
|
||||
/*
|
||||
** jpgraph_contour
|
||||
*/
|
||||
|
||||
28001 => array('Dritten parameter fur Contour muss ein vector der fargen sind.',0),
|
||||
28002 => array('Die anzahlen der farges jeder isobar linien muss gleich sein.',0),
|
||||
28003 => array('ContourPlot Interner Fehler: isobarHCrossing: Spalten index ist zu hoch (%d)',1),
|
||||
28004 => array('ContourPlot Interner Fehler: isobarHCrossing: Reihe index ist zu hoch (%d)',1),
|
||||
28005 => array('ContourPlot Interner Fehler: isobarVCrossing: Reihe index ist zu hoch (%d)',1),
|
||||
28006 => array('ContourPlot Interner Fehler: isobarVCrossing: Spalten index ist zu hoch (%d)',1),
|
||||
28007 => array('ContourPlot. Interpolation faktor ist zu hoch (>5)',0),
|
||||
|
||||
|
||||
/*
|
||||
* jpgraph_matrix and colormap
|
||||
*/
|
||||
29201 => array('Min range value must be less or equal to max range value for colormaps'),
|
||||
29202 => array('The distance between min and max value is too small for numerical precision'),
|
||||
29203 => array('Number of color quantification level must be at least %d',1),
|
||||
29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d',3),
|
||||
29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]',1),
|
||||
29206 => array('Invalid object added to MatrixGraph'),
|
||||
29207 => array('Empty input data specified for MatrixPlot'),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: EN.INC.PHP
|
||||
// File: EN.INC.PHP
|
||||
// Description: English language file for error messages
|
||||
// Created: 2006-01-25
|
||||
// Ver: $Id: en.inc.php 993 2008-03-30 21:17:41Z ljp $
|
||||
// Created: 2006-01-25
|
||||
// Ver: $Id: en.inc.php 1709 2009-07-30 08:00:08Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
@ -44,6 +44,7 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)',1),
|
||||
2013 => array('You have specified an empty array for shadow colors in the bar plot.',0),
|
||||
2014 => array('Number of datapoints for each data set in accbarplot must be the same',0),
|
||||
2015 => array('Individual bar plots in an AccBarPlot or GroupBarPlot can not have specified X-coordinates',0),
|
||||
|
||||
|
||||
/*
|
||||
@ -398,7 +399,13 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0),
|
||||
25128 => array('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.',0),
|
||||
25129 => array('Anti-alias can not be used with dashed lines. Please disable anti-alias or use solid lines.',0),
|
||||
25130 => array('Too small plot area. (%d x %d). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins.',2),
|
||||
|
||||
/*
|
||||
** jpgraph_led
|
||||
*/
|
||||
|
||||
25500 => array('Multibyte strings must be enabled in the PHP installation in order to run the LED module so that the function mb_strlen() is available. See PHP documentation for more information.',0),
|
||||
|
||||
/*
|
||||
**---------------------------------------------------------------------------------------------
|
||||
@ -476,7 +483,7 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
/*
|
||||
** PDF417
|
||||
*/
|
||||
|
||||
26000 => array('PDF417: The PDF417 module requires that the PHP installation must support the function bcmod(). This is normally enabled at compile time. See documentation for more information.',0),
|
||||
26001 => array('PDF417: Number of Columns must be >= 1 and <= 30',0),
|
||||
26002 => array('PDF417: Error level must be between 0 and 8',0),
|
||||
26003 => array('PDF417: Invalid format for input data to encode with PDF417',0),
|
||||
@ -494,6 +501,29 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)',1),
|
||||
26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.',0),
|
||||
|
||||
/*
|
||||
** jpgraph_contour
|
||||
*/
|
||||
|
||||
28001 => array('Third argument to Contour must be an array of colors.',0),
|
||||
28002 => array('Number of colors must equal the number of isobar lines specified',0),
|
||||
28003 => array('ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)',1),
|
||||
28004 => array('ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)',1),
|
||||
28005 => array('ContourPlot Internal Error: isobarVCrossing: Row index too large (%d)',1),
|
||||
28006 => array('ContourPlot Internal Error: isobarVCrossing: Col index too large (%d)',1),
|
||||
28007 => array('ContourPlot interpolation factor is too large (>5)',0),
|
||||
|
||||
/*
|
||||
* jpgraph_matrix and colormap
|
||||
*/
|
||||
29201 => array('Min range value must be less or equal to max range value for colormaps'),
|
||||
29202 => array('The distance between min and max value is too small for numerical precision'),
|
||||
29203 => array('Number of color quantification level must be at least %d',1),
|
||||
29204 => array('Number of colors (%d) is invalid for this colormap. It must be a number that can be written as: %d + k*%d',3),
|
||||
29205 => array('Colormap specification out of range. Must be an integer in range [0,%d]',1),
|
||||
29206 => array('Invalid object added to MatrixGraph'),
|
||||
29207 => array('Empty input data specified for MatrixPlot'),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Description: Special localization file with the same error messages
|
||||
// for all errors.
|
||||
// Created: 2006-02-18
|
||||
// Ver: $Id: prod.inc.php 993 2008-03-30 21:17:41Z ljp $
|
||||
// Ver: $Id: prod.inc.php 1709 2009-07-30 08:00:08Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
@ -275,6 +275,8 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
25127 => array(DEFAULT_ERROR_MESSAGE.'25127',0),
|
||||
25128 => array(DEFAULT_ERROR_MESSAGE.'25128',0),
|
||||
25129 => array(DEFAULT_ERROR_MESSAGE.'25129',0),
|
||||
25130 => array(DEFAULT_ERROR_MESSAGE.'25130',0),
|
||||
25500 => array(DEFAULT_ERROR_MESSAGE.'25500',0),
|
||||
24003 => array(DEFAULT_ERROR_MESSAGE.'24003',0),
|
||||
24004 => array(DEFAULT_ERROR_MESSAGE.'24004',0),
|
||||
24005 => array(DEFAULT_ERROR_MESSAGE.'24005',0),
|
||||
@ -320,6 +322,7 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
1009 => array(DEFAULT_ERROR_MESSAGE.'1009',0),
|
||||
1010 => array(DEFAULT_ERROR_MESSAGE.'1010',0),
|
||||
1011 => array(DEFAULT_ERROR_MESSAGE.'1011',0),
|
||||
26000 => array(DEFAULT_ERROR_MESSAGE.'26000',0),
|
||||
26001 => array(DEFAULT_ERROR_MESSAGE.'26001',0),
|
||||
26002 => array(DEFAULT_ERROR_MESSAGE.'26002',0),
|
||||
26003 => array(DEFAULT_ERROR_MESSAGE.'26003',0),
|
||||
@ -352,6 +355,23 @@ HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at
|
||||
27013 => array(DEFAULT_ERROR_MESSAGE.'27013',0),
|
||||
27014 => array(DEFAULT_ERROR_MESSAGE.'27014',0),
|
||||
27015 => array(DEFAULT_ERROR_MESSAGE.'27015',0),
|
||||
|
||||
28001 => array(DEFAULT_ERROR_MESSAGE.'28001',0),
|
||||
28002 => array(DEFAULT_ERROR_MESSAGE.'28002',0),
|
||||
28003 => array(DEFAULT_ERROR_MESSAGE.'28003',0),
|
||||
28004 => array(DEFAULT_ERROR_MESSAGE.'28004',0),
|
||||
28005 => array(DEFAULT_ERROR_MESSAGE.'28005',0),
|
||||
28006 => array(DEFAULT_ERROR_MESSAGE.'28006',0),
|
||||
28007 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
|
||||
29201 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29202 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29203 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29204 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29205 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29206 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
29207 => array(DEFAULT_ERROR_MESSAGE.'28007',0),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user