mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 03:19:05 +02:00
- Update lang files (Pandora Console)
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@59 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f7ad7cae85
commit
90dd5ed9db
@ -961,11 +961,11 @@ while ($row=mysql_fetch_array($result)){
|
|||||||
|
|
||||||
<input type="text" name="other" size="5">
|
<input type="text" name="other" size="5">
|
||||||
|
|
||||||
<tr><td class="datos"><?php echo $lang_label["min"]." ".$lang_label["alerts"] ?>
|
<tr><td class="datos"><?php echo $lang_label["min_alerts"] ?>
|
||||||
<td class="datos">
|
<td class="datos">
|
||||||
<input type="text" name="min_alerts" size="5" value="<?php if (isset($alerta_min_alerts)) {echo$alerta_min_alerts;} ?>">
|
<input type="text" name="min_alerts" size="5" value="<?php if (isset($alerta_min_alerts)) {echo$alerta_min_alerts;} ?>">
|
||||||
|
|
||||||
<?php echo $lang_label["max"]." ".$lang_label["alerts"] ?>
|
<?php echo $lang_label["max_alerts"] ?>
|
||||||
|
|
||||||
<input type="text" name="max_alerts" size="5" value="<?php if (isset($alerta_max_alerts)) {echo $alerta_max_alerts;} ?>">
|
<input type="text" name="max_alerts" size="5" value="<?php if (isset($alerta_max_alerts)) {echo $alerta_max_alerts;} ?>">
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
|
// Raul Mateos <raulofpandora@gmail.com>, 2004-2006
|
||||||
// David Muniz , 2005-2006
|
// David Muniz , 2005-2006
|
||||||
|
|
||||||
$lang_label["view_agents"]="Agüeyar axentes";
|
$lang_label["view_agents"]="Agüeyar axentes";
|
||||||
$lang_label["manage_incidents"]="Xestión d'incidentes";
|
$lang_label["manage_incidents"]="Xestión d'incidentes";
|
||||||
$lang_label["view_users"]="Agüeyar usuarios";
|
$lang_label["view_users"]="Agüeyar usuarios";
|
||||||
$lang_label["new_incident"]="Nuevu incidente";
|
$lang_label["new_incident"]="Nuevu incidente";
|
||||||
$lang_label["search_incident"]="Buscar incidente";
|
$lang_label["search_incident"]="Buscar incidente";
|
||||||
$lang_label["index_myuser"]="Editar mi usuariu";
|
$lang_label["index_myuser"]="Editar mi usuariu";
|
||||||
@ -201,7 +201,7 @@ $lang_label["db_stat_agent"]="Estadístiques de la Base de Datos per axent
|
|||||||
$lang_label["configure"]="Configurar";
|
$lang_label["configure"]="Configurar";
|
||||||
$lang_label["event_main_view"]="Vista principal d'eventos";
|
$lang_label["event_main_view"]="Vista principal d'eventos";
|
||||||
$lang_label["event_name"]="Nome del eventu";
|
$lang_label["event_name"]="Nome del eventu";
|
||||||
$lang_label["view_events"]="Agüeyar eventos";
|
$lang_label["view_events"]="Agüeyar eventos";
|
||||||
$lang_label["timestamp"]="Fecha/Hora";
|
$lang_label["timestamp"]="Fecha/Hora";
|
||||||
$lang_label["links_header"]="Enllaces";
|
$lang_label["links_header"]="Enllaces";
|
||||||
$lang_label["godmode_header"]="Alministración";
|
$lang_label["godmode_header"]="Alministración";
|
||||||
@ -247,8 +247,8 @@ $lang_label["add"]="Añadir";
|
|||||||
$lang_label["db_purge_event"]="Llimpieza de la Base de Datos d'eventos";
|
$lang_label["db_purge_event"]="Llimpieza de la Base de Datos d'eventos";
|
||||||
$lang_label["db_event"]="BD de eventos";
|
$lang_label["db_event"]="BD de eventos";
|
||||||
$lang_label["max_min"]="Max/Min";
|
$lang_label["max_min"]="Max/Min";
|
||||||
$lang_label["max"]="Máximo";
|
$lang_label["max"]="Máximo";
|
||||||
$lang_label["min"]="Mínimo";
|
$lang_label["min"]="Mínimo";
|
||||||
$lang_label["med"]="Media";
|
$lang_label["med"]="Media";
|
||||||
$lang_label["month_graph"]="Gráficu mensual";
|
$lang_label["month_graph"]="Gráficu mensual";
|
||||||
$lang_label["week_graph"]="Gráficu selmanal";
|
$lang_label["week_graph"]="Gráficu selmanal";
|
||||||
@ -301,9 +301,9 @@ $lang_label["manage_config"]="Xestionar conf.";
|
|||||||
$lang_label["config_manage"]="Xestión de Configuraciones";
|
$lang_label["config_manage"]="Xestión de Configuraciones";
|
||||||
$lang_label["get_info"]="Obtener info.";
|
$lang_label["get_info"]="Obtener info.";
|
||||||
$lang_label["are_you_sure"]="¿Ta usté seguru?";
|
$lang_label["are_you_sure"]="¿Ta usté seguru?";
|
||||||
$lang_label["users_msg"]="Los perfiles d'usuariu en Pandora definen que usuarios puen aceder a Pandora y que puen facer cada unu. Los grupos definen ellementos en común, cada usuariu pue pertenecer a unu o más grupos, y tien asignáu un perfil a cada grupu que pertenezca. Un perfil ye una llista de lo que pue y nun pue facer cada grupu, como per exemplu «agüeyar incidentes» o «xestionar bases de datos». Abaxu se muestra una llista de los perfiles disponibles (definíos por los alministraores llocales de Pandora)";
|
$lang_label["users_msg"]="Los perfiles d'usuariu en Pandora definen que usuarios puen aceder a Pandora y que puen facer cada unu. Los grupos definen ellementos en común, cada usuariu pue pertenecer a unu o más grupos, y tien asignáu un perfil a cada grupu que pertenezca. Un perfil ye una llista de lo que pue y nun pue facer cada grupu, como per exemplu «agüeyar incidentes» o «xestionar bases de datos». Abaxu se muestra una llista de los perfiles disponibles (definíos por los alministraores llocales de Pandora)";
|
||||||
$help_label["users_msg1"]="Esti usuariu ye especial y tien permisu pa tou, pasando per encima de los privilexios asignados mediante grupos/perfiles";
|
$help_label["users_msg1"]="Esti usuariu ye especial y tien permisu pa tou, pasando per encima de los privilexios asignados mediante grupos/perfiles";
|
||||||
$help_label["users_msg2"]="Esti usuariu tien permisos segregaos pa agüeyar datos en los axentes de su grupu, crear incidentes dientru d'aquellos grupos sobre los que tenga acceso y añadir notes en incidentes o de terceros.";
|
$help_label["users_msg2"]="Esti usuariu tien permisos segregaos pa agüeyar datos en los axentes de su grupu, crear incidentes dientru d'aquellos grupos sobre los que tenga acceso y añadir notes en incidentes o de terceros.";
|
||||||
$help_label["db_purge1"]="Esti botón resfresca la información sobre el usu de la Base de Datos a lo llargu del tiempu";
|
$help_label["db_purge1"]="Esti botón resfresca la información sobre el usu de la Base de Datos a lo llargu del tiempu";
|
||||||
$help_label["db_purge0"]="Use esti control pa selecionar un axente. Ye necesariu selecionar un axente tantu pa obtener información de la Base de Datos como pa borrar datos de la misma";
|
$help_label["db_purge0"]="Use esti control pa selecionar un axente. Ye necesariu selecionar un axente tantu pa obtener información de la Base de Datos como pa borrar datos de la misma";
|
||||||
$lang_label["profiles"]="Perfiles";
|
$lang_label["profiles"]="Perfiles";
|
||||||
@ -314,7 +314,7 @@ $lang_label["create_profile"]="Crear perfil";
|
|||||||
$lang_label["profile_name"]="Nome del perfil";
|
$lang_label["profile_name"]="Nome del perfil";
|
||||||
$lang_label["pandora_management"]="Xestión de Pandora";
|
$lang_label["pandora_management"]="Xestión de Pandora";
|
||||||
$lang_label["manage_db"]="Xestión de BD";
|
$lang_label["manage_db"]="Xestión de BD";
|
||||||
$lang_label["incident_view"]="Agüeyar incidentes";
|
$lang_label["incident_view"]="Agüeyar incidentes";
|
||||||
$lang_label["incident_edit"]="Editar incidentes";
|
$lang_label["incident_edit"]="Editar incidentes";
|
||||||
$lang_label["agent_edit"]="Editar axentes";
|
$lang_label["agent_edit"]="Editar axentes";
|
||||||
$lang_label["alert_edit"]="Editar alertes";
|
$lang_label["alert_edit"]="Editar alertes";
|
||||||
@ -368,7 +368,7 @@ $lang_label["statistics"]="Estadístiques";
|
|||||||
$lang_label["incident_priority"]="Prioridaes de los incidentes";
|
$lang_label["incident_priority"]="Prioridaes de los incidentes";
|
||||||
$lang_label["copy"]="Copiar";
|
$lang_label["copy"]="Copiar";
|
||||||
$lang_label["choose_agent"]="Escoxa axente";
|
$lang_label["choose_agent"]="Escoxa axente";
|
||||||
$lang_label["press_db_info"]="Pulse equí pa agüeyar información de la BD como texto";
|
$lang_label["press_db_info"]="Pulse equí pa agüeyar información de la BD como texto";
|
||||||
$lang_label["event_statistics"]="Estadístiques de eventos";
|
$lang_label["event_statistics"]="Estadístiques de eventos";
|
||||||
$lang_label["deletedata"]="Borrar datos";
|
$lang_label["deletedata"]="Borrar datos";
|
||||||
$lang_label["source"]="Orixen";
|
$lang_label["source"]="Orixen";
|
||||||
@ -554,5 +554,4 @@ $lang_label["graph_order"]="Orden del gráficu";
|
|||||||
$lang_label["truetype"]="Fontes truetype";
|
$lang_label["truetype"]="Fontes truetype";
|
||||||
$lang_label["right_left"]="dre. a manz.";
|
$lang_label["right_left"]="dre. a manz.";
|
||||||
$lang_label["left_right"]="manz. a dre.";
|
$lang_label["left_right"]="manz. a dre.";
|
||||||
$lang_label["enabled"]="habilitáu";
|
|
||||||
?>
|
?>
|
@ -245,9 +245,9 @@ $lang_label["doit"]="Fes-ho!";
|
|||||||
$lang_label["add"]="Afegeix";
|
$lang_label["add"]="Afegeix";
|
||||||
$lang_label["db_purge_event"]="Purgar la base de dades d'events";
|
$lang_label["db_purge_event"]="Purgar la base de dades d'events";
|
||||||
$lang_label["db_event"]="Event de la base de dades";
|
$lang_label["db_event"]="Event de la base de dades";
|
||||||
$lang_label["max_min"]="Max/Min";
|
$lang_label["max_min"]="Màx/Mín";
|
||||||
$lang_label["max"]="Màxim";
|
$lang_label["max"]="Màxim";
|
||||||
$lang_label["min"]="Mínim";
|
$lang_label["min"]="Mínim";
|
||||||
$lang_label["med"]="Mitjana";
|
$lang_label["med"]="Mitjana";
|
||||||
$lang_label["month_graph"]="Gràfica mensual";
|
$lang_label["month_graph"]="Gràfica mensual";
|
||||||
$lang_label["week_graph"]="Gràfica setmanal";
|
$lang_label["week_graph"]="Gràfica setmanal";
|
||||||
|
File diff suppressed because one or more lines are too long
@ -116,7 +116,7 @@ $lang_label["description"] ="Descripción";
|
|||||||
$lang_label["last_fired"]="Lanzada por última vez";
|
$lang_label["last_fired"]="Lanzada por última vez";
|
||||||
$lang_label["type"]="Tipo";
|
$lang_label["type"]="Tipo";
|
||||||
$lang_label["last_contact"]="Último contacto";
|
$lang_label["last_contact"]="Último contacto";
|
||||||
$lang_label["last_data_chunk"]="Contenido de los ultimos paquetes enviado por el agente : ";
|
$lang_label["last_data_chunk"]="Contenido de los últimos paquetes enviados por el agente: ";
|
||||||
$lang_label["graph"]="Gráfica";
|
$lang_label["graph"]="Gráfica";
|
||||||
$lang_label["raw_data"]="Datos";
|
$lang_label["raw_data"]="Datos";
|
||||||
$lang_label["data"]="Datos";
|
$lang_label["data"]="Datos";
|
||||||
@ -283,8 +283,8 @@ $lang_label["add"]="Añadir";
|
|||||||
$lang_label["db_purge_event"]="Limpieza de la Base de Datos de eventos";
|
$lang_label["db_purge_event"]="Limpieza de la Base de Datos de eventos";
|
||||||
$lang_label["db_event"]="BBDD de eventos";
|
$lang_label["db_event"]="BBDD de eventos";
|
||||||
$lang_label["max_min"]="Máx/Mín";
|
$lang_label["max_min"]="Máx/Mín";
|
||||||
$lang_label["max"]="Máximo";
|
$lang_label["max"]="Máximo";
|
||||||
$lang_label["min"]="Mínimo";
|
$lang_label["min"]="Mínimo";
|
||||||
$lang_label["med"]="Media";
|
$lang_label["med"]="Media";
|
||||||
$lang_label["month_graph"]="Gráfica mensual";
|
$lang_label["month_graph"]="Gráfica mensual";
|
||||||
$lang_label["week_graph"]="Gráfica semanal";
|
$lang_label["week_graph"]="Gráfica semanal";
|
||||||
@ -615,8 +615,6 @@ $lang_label["graph_order"]="Orden del gráfico";
|
|||||||
$lang_label["truetype"]="Fuentes truetype";
|
$lang_label["truetype"]="Fuentes truetype";
|
||||||
$lang_label["right_left"]="der. a izq.";
|
$lang_label["right_left"]="der. a izq.";
|
||||||
$lang_label["left_right"]="izq. a der.";
|
$lang_label["left_right"]="izq. a der.";
|
||||||
$lang_label["enabled"]="habilitado";
|
|
||||||
$lang_label["disabled"]="deshabilitado";
|
|
||||||
|
|
||||||
global $lang_label;
|
global $lang_label;
|
||||||
global $help_label;
|
global $help_label;
|
||||||
|
@ -609,14 +609,12 @@ $lang_label["del_server_ok"]="Serveur éliminé avec succès";
|
|||||||
$lang_label["del_server_no"]=" Pandora a rencontré un problème pour éliminer le serveur ";
|
$lang_label["del_server_no"]=" Pandora a rencontré un problème pour éliminer le serveur ";
|
||||||
$lang_label["groups"]="groupes";
|
$lang_label["groups"]="groupes";
|
||||||
$lang_label["other"]="Autre";
|
$lang_label["other"]="Autre";
|
||||||
$lang_label["icon"]="Icône";
|
$lang_label["icon"]="Icône";
|
||||||
$lang_label["agent_exists"]="Cet agent existe déjà";
|
$lang_label["agent_exists"]="Cet agent existe déjà";
|
||||||
$lang_label["graph_order"]="Ordre du tableau";
|
$lang_label["graph_order"]="Ordre du tableau";
|
||||||
$lang_label["truetype"]="Polices truetype";
|
$lang_label["truetype"]="Polices truetype";
|
||||||
$lang_label["right_left"]="dr. a gau.";
|
$lang_label["right_left"]="dr. a gau.";
|
||||||
$lang_label["left_right"]="gau. a dr.";
|
$lang_label["left_right"]="gau. a dr.";
|
||||||
$lang_label["enabled"]="habilité";
|
|
||||||
$lang_label["disabled"]="deshabilité";
|
|
||||||
|
|
||||||
global $lang_label;
|
global $lang_label;
|
||||||
global $help_label;
|
global $help_label;
|
||||||
|
@ -249,9 +249,9 @@ $lang_label["add"] = "Adicionar";
|
|||||||
$lang_label["db_purge_event"] = "Limpeza da Base de Dados de eventos";
|
$lang_label["db_purge_event"] = "Limpeza da Base de Dados de eventos";
|
||||||
$lang_label["db_event"] = "BD de eventos";
|
$lang_label["db_event"] = "BD de eventos";
|
||||||
$lang_label["max_min"] = "Máx/Mín";
|
$lang_label["max_min"] = "Máx/Mín";
|
||||||
$lang_label["max"] = "Máximo";
|
$lang_label["max"] = "Máximo";
|
||||||
$lang_label["min"] = "Mínimo";
|
$lang_label["min"] = "Mínimo";
|
||||||
$lang_label["med"] = "Média";
|
$lang_label["med"] = "Média";
|
||||||
$lang_label["month_graph"] = "Gráfico mensal";
|
$lang_label["month_graph"] = "Gráfico mensal";
|
||||||
$lang_label["week_graph"] = "Gráfico Semanal";
|
$lang_label["week_graph"] = "Gráfico Semanal";
|
||||||
$lang_label["day_graph"] = "Gráfico Diário";
|
$lang_label["day_graph"] = "Gráfico Diário";
|
||||||
@ -554,8 +554,8 @@ $lang_label["icon"] = "ícone";
|
|||||||
$lang_label["agent_exists"] = "O agente já existe";
|
$lang_label["agent_exists"] = "O agente já existe";
|
||||||
$lang_label["graph_order"] = "Ordem do gráfico";
|
$lang_label["graph_order"] = "Ordem do gráfico";
|
||||||
$lang_label["truetype"] = "Fontes truetype";
|
$lang_label["truetype"] = "Fontes truetype";
|
||||||
$lang_label["right_left"]="Dir. à Esq."; // direita à esquerda
|
$lang_label["right_left"]="Dir. à Esq."; // direita à esquerda
|
||||||
$lang_label["left_right"]="Esq. à Dir."; // esquerda à direita
|
$lang_label["left_right"]="Esq. à Dir."; // esquerda à direita
|
||||||
|
|
||||||
global $lang_label;
|
global $lang_label;
|
||||||
global $help_label;
|
global $help_label;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,105 +1,105 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: IMGDATA_BEVELS.INC
|
// File: IMGDATA_BEVELS.INC
|
||||||
// Description: Base64 encoded images for round bevels
|
// Description: Base64 encoded images for round bevels
|
||||||
// Created: 2003-03-20
|
// Created: 2003-03-20
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: imgdata_bevels.inc 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: imgdata_bevels.inc 20 2005-05-30 20:34:41Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
class ImgData_Bevels extends ImgData {
|
class ImgData_Bevels extends ImgData {
|
||||||
var $name = 'Round Bevels';
|
protected $name = 'Round Bevels';
|
||||||
var $an = array(MARK_IMG_BEVEL => 'imgdata');
|
protected $an = array(MARK_IMG_BEVEL => 'imgdata');
|
||||||
|
|
||||||
var $colors = array('green','purple','orange','red','yellow');
|
protected $colors = array('green','purple','orange','red','yellow');
|
||||||
var $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3);
|
protected $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3);
|
||||||
var $maxidx = 4 ;
|
protected $maxidx = 4 ;
|
||||||
|
|
||||||
var $imgdata ;
|
protected $imgdata ;
|
||||||
|
|
||||||
function ImgData_Bevels() {
|
function ImgData_Bevels() {
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bullets_balls_red_013.png
|
// File: bullets_balls_red_013.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[0][0]= 337 ;
|
$this->imgdata[0][0]= 337 ;
|
||||||
$this->imgdata[0][1]=
|
$this->imgdata[0][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||||
'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'.
|
'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'.
|
||||||
'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'.
|
'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'.
|
||||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||||
'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'.
|
'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'.
|
||||||
'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'.
|
'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'.
|
||||||
'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'.
|
'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'.
|
||||||
'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'.
|
'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'.
|
||||||
'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'.
|
'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'.
|
||||||
'==' ;
|
'==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bullets_balls_green_013.png
|
// File: bullets_balls_green_013.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[1][0]= 344 ;
|
$this->imgdata[1][0]= 344 ;
|
||||||
$this->imgdata[1][1]=
|
$this->imgdata[1][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||||
'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'.
|
'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'.
|
||||||
'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'.
|
'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'.
|
||||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||||
'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'.
|
'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'.
|
||||||
'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'.
|
'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'.
|
||||||
'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'.
|
'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'.
|
||||||
'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'.
|
'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'.
|
||||||
'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'.
|
'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'.
|
||||||
'VORK5CYII=' ;
|
'VORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bullets_balls_oy_035.png
|
// File: bullets_balls_oy_035.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[2][0]= 341 ;
|
$this->imgdata[2][0]= 341 ;
|
||||||
$this->imgdata[2][1]=
|
$this->imgdata[2][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||||
'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'.
|
'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'.
|
||||||
'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'.
|
'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'.
|
||||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||||
'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'.
|
'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'.
|
||||||
'+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'.
|
'+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'.
|
||||||
'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'.
|
'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'.
|
||||||
'5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'.
|
'5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'.
|
||||||
'9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'.
|
'9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'.
|
||||||
'5CYII=' ;
|
'5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bullets_balls_oy_036.png
|
// File: bullets_balls_oy_036.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[3][0]= 340 ;
|
$this->imgdata[3][0]= 340 ;
|
||||||
$this->imgdata[3][1]=
|
$this->imgdata[3][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||||
'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'.
|
'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'.
|
||||||
'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'.
|
'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'.
|
||||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
||||||
'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'.
|
'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'.
|
||||||
'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'.
|
'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'.
|
||||||
'4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'.
|
'4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'.
|
||||||
'7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'.
|
'7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'.
|
||||||
'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ;
|
'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bullets_balls_pp_019.png
|
// File: bullets_balls_pp_019.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[4][0]= 334 ;
|
$this->imgdata[4][0]= 334 ;
|
||||||
$this->imgdata[4][1]=
|
$this->imgdata[4][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||||
'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'.
|
'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'.
|
||||||
'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'.
|
'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'.
|
||||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||||
'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'.
|
'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'.
|
||||||
'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'.
|
'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'.
|
||||||
'5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'.
|
'5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'.
|
||||||
'4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'.
|
'4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'.
|
||||||
'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ;
|
'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -1,178 +1,178 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: IMGDATA_DIAMONDS.INC
|
// File: IMGDATA_DIAMONDS.INC
|
||||||
// Description: Base64 encoded images for diamonds
|
// Description: Base64 encoded images for diamonds
|
||||||
// Created: 2003-03-20
|
// Created: 2003-03-20
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: imgdata_diamonds.inc 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: imgdata_diamonds.inc 20 2005-05-30 20:34:41Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
class ImgData_Diamonds extends ImgData {
|
class ImgData_Diamonds extends ImgData {
|
||||||
var $name = 'Diamonds';
|
protected $name = 'Diamonds';
|
||||||
var $an = array(MARK_IMG_DIAMOND =>'imgdata');
|
protected $an = array(MARK_IMG_DIAMOND =>'imgdata');
|
||||||
var $colors = array('lightblue','darkblue','gray',
|
protected $colors = array('lightblue','darkblue','gray',
|
||||||
'blue','pink','purple','red','yellow');
|
'blue','pink','purple','red','yellow');
|
||||||
var $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6,
|
protected $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6,
|
||||||
'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3);
|
'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3);
|
||||||
|
|
||||||
var $maxidx = 7 ;
|
protected $maxidx = 7 ;
|
||||||
var $imgdata ;
|
protected $imgdata ;
|
||||||
|
|
||||||
function ImgData_Diamonds() {
|
function ImgData_Diamonds() {
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_red.png
|
// File: diam_red.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[0][0]= 668 ;
|
$this->imgdata[0][0]= 668 ;
|
||||||
$this->imgdata[0][1]=
|
$this->imgdata[0][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||||
'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'.
|
'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'.
|
||||||
'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'.
|
'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'.
|
||||||
'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'.
|
'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'.
|
||||||
'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'.
|
'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'.
|
||||||
'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'.
|
'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'.
|
||||||
'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'.
|
'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'.
|
||||||
'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'.
|
'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'.
|
||||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'.
|
'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'.
|
||||||
'1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'.
|
'1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'.
|
||||||
'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'.
|
'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'.
|
||||||
'/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'.
|
'/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'.
|
||||||
'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'.
|
'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'.
|
||||||
'+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'.
|
'+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'.
|
||||||
'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'.
|
'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'.
|
||||||
'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'.
|
'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'.
|
||||||
'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ;
|
'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_pink.png
|
// File: diam_pink.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[1][0]= 262 ;
|
$this->imgdata[1][0]= 262 ;
|
||||||
$this->imgdata[1][1]=
|
$this->imgdata[1][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||||
'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'.
|
'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'.
|
||||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||||
'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||||
'==' ;
|
'==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_blue.png
|
// File: diam_blue.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[2][0]= 662 ;
|
$this->imgdata[2][0]= 662 ;
|
||||||
$this->imgdata[2][1]=
|
$this->imgdata[2][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'.
|
||||||
'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'.
|
'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'.
|
||||||
'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'.
|
'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'.
|
||||||
'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'.
|
'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'.
|
||||||
'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'.
|
'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'.
|
||||||
'/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'.
|
'/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'.
|
||||||
'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'.
|
'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'.
|
||||||
'9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'.
|
'9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'.
|
||||||
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
||||||
'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'.
|
'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'.
|
||||||
'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'.
|
'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'.
|
||||||
'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'.
|
'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'.
|
||||||
'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'.
|
'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'.
|
||||||
'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'.
|
'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'.
|
||||||
'6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'.
|
'6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'.
|
||||||
'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'.
|
'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'.
|
||||||
'5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'.
|
'5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'.
|
||||||
'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ;
|
'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_yellow.png
|
// File: diam_yellow.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[3][0]= 262 ;
|
$this->imgdata[3][0]= 262 ;
|
||||||
$this->imgdata[3][1]=
|
$this->imgdata[3][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||||
'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'.
|
'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'.
|
||||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||||
'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||||
'==' ;
|
'==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_lightblue.png
|
// File: diam_lightblue.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[4][0]= 671 ;
|
$this->imgdata[4][0]= 671 ;
|
||||||
$this->imgdata[4][1]=
|
$this->imgdata[4][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'.
|
||||||
'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'.
|
'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'.
|
||||||
'//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'.
|
'//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'.
|
||||||
'8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'.
|
'8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'.
|
||||||
'//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'.
|
'//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'.
|
||||||
'8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'.
|
'8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'.
|
||||||
'1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'.
|
'1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'.
|
||||||
'+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'.
|
'+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'.
|
||||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||||
'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'.
|
'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'.
|
||||||
'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'.
|
'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'.
|
||||||
'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'.
|
'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'.
|
||||||
'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'.
|
'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'.
|
||||||
'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'.
|
'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'.
|
||||||
'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'.
|
'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'.
|
||||||
'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'.
|
'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'.
|
||||||
'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'.
|
'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'.
|
||||||
'7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ;
|
'7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_purple.png
|
// File: diam_purple.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[5][0]= 657 ;
|
$this->imgdata[5][0]= 657 ;
|
||||||
$this->imgdata[5][1]=
|
$this->imgdata[5][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||||
'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'.
|
'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'.
|
||||||
'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'.
|
'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'.
|
||||||
'+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'.
|
'+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'.
|
||||||
'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'.
|
'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'.
|
||||||
'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'.
|
'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'.
|
||||||
'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'.
|
'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'.
|
||||||
'/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'.
|
'/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'.
|
||||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'.
|
'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'.
|
||||||
'1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'.
|
'1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'.
|
||||||
'+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'.
|
'+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'.
|
||||||
'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'.
|
'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'.
|
||||||
'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'.
|
'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'.
|
||||||
'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'.
|
'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'.
|
||||||
'25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'.
|
'25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'.
|
||||||
'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'.
|
'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'.
|
||||||
'EdF1ECWW1SAAAAAElFTkSuQmCC' ;
|
'EdF1ECWW1SAAAAAElFTkSuQmCC' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_gray.png
|
// File: diam_gray.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[6][0]= 262 ;
|
$this->imgdata[6][0]= 262 ;
|
||||||
$this->imgdata[6][1]=
|
$this->imgdata[6][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||||
'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'.
|
'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'.
|
||||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||||
'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||||
'==' ;
|
'==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: diam_blgr.png
|
// File: diam_blgr.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[7][0]= 262 ;
|
$this->imgdata[7][0]= 262 ;
|
||||||
$this->imgdata[7][1]=
|
$this->imgdata[7][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||||
'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'.
|
'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'.
|
||||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||||
'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||||
'==' ;
|
'==' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,151 +1,151 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: IMGDATA_SQUARES.INC
|
// File: IMGDATA_SQUARES.INC
|
||||||
// Description: Base64 encoded images for squares
|
// Description: Base64 encoded images for squares
|
||||||
// Created: 2003-03-20
|
// Created: 2003-03-20
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: imgdata_squares.inc 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: imgdata_squares.inc 20 2005-05-30 20:34:41Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
class ImgData_Squares extends ImgData {
|
class ImgData_Squares extends ImgData {
|
||||||
var $name = 'Squares';
|
protected $name = 'Squares';
|
||||||
var $an = array(MARK_IMG_SQUARE =>'imgdata');
|
protected $an = array(MARK_IMG_SQUARE =>'imgdata');
|
||||||
|
|
||||||
var $colors = array('bluegreen','blue','green',
|
protected $colors = array('bluegreen','blue','green',
|
||||||
'lightblue','orange','purple','red','yellow');
|
'lightblue','orange','purple','red','yellow');
|
||||||
var $index = array('bluegreen' =>2,'blue'=>5,'green'=>6,
|
protected $index = array('bluegreen' =>2,'blue'=>5,'green'=>6,
|
||||||
'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1);
|
'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1);
|
||||||
var $maxidx = 7 ;
|
protected $maxidx = 7 ;
|
||||||
var $imgdata ;
|
protected $imgdata ;
|
||||||
|
|
||||||
function ImgData_Squares () {
|
function ImgData_Squares () {
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_lblue.png
|
//sq_lblue.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[0][0]= 362 ;
|
$this->imgdata[0][0]= 362 ;
|
||||||
$this->imgdata[0][1]=
|
$this->imgdata[0][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'.
|
||||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||||
'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'.
|
'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'.
|
||||||
'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'.
|
'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'.
|
||||||
'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'.
|
'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'.
|
||||||
'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'.
|
'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'.
|
||||||
'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'.
|
'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'.
|
||||||
'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'.
|
'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'.
|
||||||
'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'.
|
'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'.
|
||||||
'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ;
|
'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_yellow.png
|
//sq_yellow.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[1][0]= 338 ;
|
$this->imgdata[1][0]= 338 ;
|
||||||
$this->imgdata[1][1]=
|
$this->imgdata[1][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'.
|
||||||
'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'.
|
'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'.
|
||||||
'/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'.
|
'/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'.
|
||||||
'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'.
|
'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'.
|
||||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'.
|
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'.
|
||||||
'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'.
|
'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'.
|
||||||
'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'.
|
'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'.
|
||||||
'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'.
|
'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'.
|
||||||
'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'.
|
'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'.
|
||||||
'I=' ;
|
'I=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_blgr.png
|
//sq_blgr.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[2][0]= 347 ;
|
$this->imgdata[2][0]= 347 ;
|
||||||
$this->imgdata[2][1]=
|
$this->imgdata[2][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'.
|
||||||
'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'.
|
'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'.
|
||||||
'0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'.
|
'0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'.
|
||||||
'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'.
|
'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'.
|
||||||
'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'.
|
'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'.
|
||||||
'1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'.
|
'1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'.
|
||||||
'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'.
|
'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'.
|
||||||
'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'.
|
'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'.
|
||||||
'0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'.
|
'0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'.
|
||||||
'AASUVORK5CYII=' ;
|
'AASUVORK5CYII=' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_red.png
|
//sq_red.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[3][0]= 324 ;
|
$this->imgdata[3][0]= 324 ;
|
||||||
$this->imgdata[3][1]=
|
$this->imgdata[3][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||||
'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'.
|
'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'.
|
||||||
'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'.
|
'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'.
|
||||||
'3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'.
|
'3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'.
|
||||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'.
|
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'.
|
||||||
'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'.
|
'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'.
|
||||||
'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'.
|
'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'.
|
||||||
'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'.
|
'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'.
|
||||||
'/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ;
|
'/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_pink.png
|
//sq_pink.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[4][0]= 445 ;
|
$this->imgdata[4][0]= 445 ;
|
||||||
$this->imgdata[4][1]=
|
$this->imgdata[4][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'.
|
||||||
'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'.
|
'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'.
|
||||||
'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'.
|
'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'.
|
||||||
'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'.
|
'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'.
|
||||||
'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'.
|
'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'.
|
||||||
'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'.
|
'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'.
|
||||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'.
|
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'.
|
||||||
'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'.
|
'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'.
|
||||||
'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'.
|
'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'.
|
||||||
'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'.
|
'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'.
|
||||||
'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'.
|
'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'.
|
||||||
'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ;
|
'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_blue.png
|
//sq_blue.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[5][0]= 283 ;
|
$this->imgdata[5][0]= 283 ;
|
||||||
$this->imgdata[5][1]=
|
$this->imgdata[5][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'.
|
||||||
'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'.
|
'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'.
|
||||||
'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'.
|
'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'.
|
||||||
'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'.
|
'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'.
|
||||||
'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'.
|
'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'.
|
||||||
'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'.
|
'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'.
|
||||||
'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'.
|
'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'.
|
||||||
'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ;
|
'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_green.png
|
//sq_green.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[6][0]= 325 ;
|
$this->imgdata[6][0]= 325 ;
|
||||||
$this->imgdata[6][1]=
|
$this->imgdata[6][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||||
'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'.
|
'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'.
|
||||||
'6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'.
|
'6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'.
|
||||||
'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'.
|
'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'.
|
||||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'.
|
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'.
|
||||||
'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'.
|
'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'.
|
||||||
'5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'.
|
'5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'.
|
||||||
'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'.
|
'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'.
|
||||||
'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ;
|
'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
//sq_orange.png
|
//sq_orange.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[7][0]= 321 ;
|
$this->imgdata[7][0]= 321 ;
|
||||||
$this->imgdata[7][1]=
|
$this->imgdata[7][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'.
|
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'.
|
||||||
'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'.
|
'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'.
|
||||||
'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'.
|
'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'.
|
||||||
'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'.
|
'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'.
|
||||||
'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'.
|
'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'.
|
||||||
'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'.
|
'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'.
|
||||||
'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'.
|
'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'.
|
||||||
'1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'.
|
'1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'.
|
||||||
'AbWuGMOr5COSAAAAAElFTkSuQmCC' ;
|
'AbWuGMOr5COSAAAAAElFTkSuQmCC' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -1,145 +1,145 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: IMGDATA_STARS.INC
|
// File: IMGDATA_STARS.INC
|
||||||
// Description: Base64 encoded images for stars
|
// Description: Base64 encoded images for stars
|
||||||
// Created: 2003-03-20
|
// Created: 2003-03-20
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: imgdata_stars.inc 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: imgdata_stars.inc 20 2005-05-30 20:34:41Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
|
|
||||||
class ImgData_Stars extends ImgData {
|
class ImgData_Stars extends ImgData {
|
||||||
var $name = 'Stars';
|
protected $name = 'Stars';
|
||||||
var $an = array(MARK_IMG_STAR => 'imgdata');
|
protected $an = array(MARK_IMG_STAR => 'imgdata');
|
||||||
|
|
||||||
var $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow');
|
protected $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow');
|
||||||
var $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1,
|
protected $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1,
|
||||||
'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6);
|
'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6);
|
||||||
var $maxidx = 7 ;
|
protected $maxidx = 7 ;
|
||||||
var $imgdata ;
|
protected $imgdata ;
|
||||||
|
|
||||||
function ImgData_Stars() {
|
function ImgData_Stars() {
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_green_001.png
|
// File: bstar_green_001.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[0][0]= 329 ;
|
$this->imgdata[0][0]= 329 ;
|
||||||
$this->imgdata[0][1]=
|
$this->imgdata[0][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'.
|
||||||
'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'.
|
'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'.
|
||||||
'/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'.
|
'/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'.
|
||||||
'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
||||||
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'.
|
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'.
|
||||||
'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'.
|
'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'.
|
||||||
'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'.
|
'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'.
|
||||||
'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'.
|
'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'.
|
||||||
'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ;
|
'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ;
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_blred.png
|
// File: bstar_blred.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[1][0]= 325 ;
|
$this->imgdata[1][0]= 325 ;
|
||||||
$this->imgdata[1][1]=
|
$this->imgdata[1][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'.
|
'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'.
|
||||||
'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'.
|
'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'.
|
||||||
'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'.
|
||||||
'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_red_001.png
|
// File: bstar_red_001.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[2][0]= 325 ;
|
$this->imgdata[2][0]= 325 ;
|
||||||
$this->imgdata[2][1]=
|
$this->imgdata[2][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'.
|
'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'.
|
||||||
'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'.
|
'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'.
|
||||||
'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'.
|
||||||
'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_blgr_001.png
|
// File: bstar_blgr_001.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[3][0]= 325 ;
|
$this->imgdata[3][0]= 325 ;
|
||||||
$this->imgdata[3][1]=
|
$this->imgdata[3][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'.
|
'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'.
|
||||||
'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'.
|
'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'.
|
||||||
'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'.
|
||||||
'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_blgr_002.png
|
// File: bstar_blgr_002.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[4][0]= 325 ;
|
$this->imgdata[4][0]= 325 ;
|
||||||
$this->imgdata[4][1]=
|
$this->imgdata[4][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'.
|
'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'.
|
||||||
'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'.
|
'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'.
|
||||||
'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'.
|
||||||
'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_blue_001.png
|
// File: bstar_blue_001.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[5][0]= 325 ;
|
$this->imgdata[5][0]= 325 ;
|
||||||
$this->imgdata[5][1]=
|
$this->imgdata[5][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'.
|
'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'.
|
||||||
'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'.
|
'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'.
|
||||||
'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'.
|
||||||
'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_oy_007.png
|
// File: bstar_oy_007.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[6][0]= 325 ;
|
$this->imgdata[6][0]= 325 ;
|
||||||
$this->imgdata[6][1]=
|
$this->imgdata[6][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'.
|
'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'.
|
||||||
'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'.
|
'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'.
|
||||||
'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'.
|
||||||
'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
|
|
||||||
//==========================================================
|
//==========================================================
|
||||||
// File: bstar_lred.png
|
// File: bstar_lred.png
|
||||||
//==========================================================
|
//==========================================================
|
||||||
$this->imgdata[7][0]= 325 ;
|
$this->imgdata[7][0]= 325 ;
|
||||||
$this->imgdata[7][1]=
|
$this->imgdata[7][1]=
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||||
'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'.
|
'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'.
|
||||||
'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'.
|
'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'.
|
||||||
'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'.
|
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'.
|
||||||
'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,205 +1,206 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: JPGRAPH_ANTISPAM.PHP
|
// File: JPGRAPH_ANTISPAM.PHP
|
||||||
// Description: Genarate anti-spam challenge
|
// Description: Genarate anti-spam challenge
|
||||||
// Created: 2004-10-07
|
// Created: 2004-10-07
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_antispam-digits.php 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: jpgraph_antispam-digits.php 629 2006-05-26 00:05:28Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
class HandDigits {
|
class HandDigits {
|
||||||
var $digits_thumb30x30 = array();
|
public $digits = array();
|
||||||
var $iHeight=30, $iWidth=30;
|
public $iHeight=30, $iWidth=30;
|
||||||
function HandDigits() {
|
|
||||||
//==========================================================
|
function HandDigits() {
|
||||||
// d6-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d6-small.jpg
|
||||||
$this->digits['6'][0]= 645 ;
|
//==========================================================
|
||||||
$this->digits['6'][1]=
|
$this->digits['6'][0]= 645 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['6'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'.
|
||||||
'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'.
|
'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'.
|
||||||
'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'.
|
'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'.
|
||||||
'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'.
|
'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'.
|
||||||
'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'.
|
'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'.
|
||||||
'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ;
|
'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'.
|
||||||
|
'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ;
|
||||||
//==========================================================
|
|
||||||
// d2-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d2-small.jpg
|
||||||
$this->digits['2'][0]= 606 ;
|
//==========================================================
|
||||||
$this->digits['2'][1]=
|
$this->digits['2'][0]= 606 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['2'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'.
|
||||||
'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'.
|
'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'.
|
||||||
'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'.
|
'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'.
|
||||||
'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'.
|
'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'.
|
||||||
'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'.
|
'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'.
|
||||||
'DLZ6f//Z' ;
|
'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'.
|
||||||
|
'DLZ6f//Z' ;
|
||||||
//==========================================================
|
|
||||||
// d9-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d9-small.jpg
|
||||||
$this->digits['9'][0]= 680 ;
|
//==========================================================
|
||||||
$this->digits['9'][1]=
|
$this->digits['9'][0]= 680 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['9'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'.
|
||||||
'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'.
|
'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'.
|
||||||
'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'.
|
'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'.
|
||||||
'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'.
|
'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'.
|
||||||
'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'.
|
'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'.
|
||||||
'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'.
|
'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'.
|
||||||
'1V1//9k=' ;
|
'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'.
|
||||||
|
'1V1//9k=' ;
|
||||||
//==========================================================
|
|
||||||
// d5-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d5-small.jpg
|
||||||
$this->digits['5'][0]= 632 ;
|
//==========================================================
|
||||||
$this->digits['5'][1]=
|
$this->digits['5'][0]= 632 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['5'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'.
|
||||||
'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'.
|
'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'.
|
||||||
'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'.
|
'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'.
|
||||||
'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'.
|
'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'.
|
||||||
'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'.
|
'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'.
|
||||||
'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ;
|
'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'.
|
||||||
|
'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ;
|
||||||
//==========================================================
|
|
||||||
// d1-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d1-small.jpg
|
||||||
$this->digits['1'][0]= 646 ;
|
//==========================================================
|
||||||
$this->digits['1'][1]=
|
$this->digits['1'][0]= 646 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['1'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'.
|
||||||
'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'.
|
'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'.
|
||||||
'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'.
|
'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'.
|
||||||
'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'.
|
'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'.
|
||||||
'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'.
|
'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'.
|
||||||
'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ;
|
'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'.
|
||||||
|
'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ;
|
||||||
//==========================================================
|
|
||||||
// d8-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d8-small.jpg
|
||||||
$this->digits['8'][0]= 694 ;
|
//==========================================================
|
||||||
$this->digits['8'][1]=
|
$this->digits['8'][0]= 694 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['8'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'.
|
||||||
'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'.
|
'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'.
|
||||||
'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'.
|
'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'.
|
||||||
'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'.
|
'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'.
|
||||||
'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'.
|
'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'.
|
||||||
'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'.
|
'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'.
|
||||||
'EylmLHQltptPZKQOBo1FzH//2Q==' ;
|
'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'.
|
||||||
|
'EylmLHQltptPZKQOBo1FzH//2Q==' ;
|
||||||
//==========================================================
|
|
||||||
// d4-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d4-small.jpg
|
||||||
$this->digits['4'][0]= 643 ;
|
//==========================================================
|
||||||
$this->digits['4'][1]=
|
$this->digits['4'][0]= 643 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['4'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'.
|
||||||
'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'.
|
'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'.
|
||||||
'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'.
|
'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'.
|
||||||
'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'.
|
'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'.
|
||||||
'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'.
|
'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'.
|
||||||
'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ;
|
'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'.
|
||||||
|
'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ;
|
||||||
//==========================================================
|
|
||||||
// d7-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d7-small.jpg
|
||||||
$this->digits['7'][0]= 658 ;
|
//==========================================================
|
||||||
$this->digits['7'][1]=
|
$this->digits['7'][0]= 658 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['7'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'.
|
||||||
'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'.
|
'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'.
|
||||||
'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'.
|
'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'.
|
||||||
'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'.
|
'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'.
|
||||||
'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'.
|
'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'.
|
||||||
'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ;
|
'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'.
|
||||||
|
'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ;
|
||||||
//==========================================================
|
|
||||||
// d3-small.jpg
|
//==========================================================
|
||||||
//==========================================================
|
// d3-small.jpg
|
||||||
$this->digits['3'][0]= 662 ;
|
//==========================================================
|
||||||
$this->digits['3'][1]=
|
$this->digits['3'][0]= 662 ;
|
||||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
$this->digits['3'][1]=
|
||||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'.
|
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||||
'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'.
|
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'.
|
||||||
'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'.
|
'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'.
|
||||||
'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'.
|
'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'.
|
||||||
'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'.
|
'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'.
|
||||||
'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'.
|
'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'.
|
||||||
'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ;
|
'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'.
|
||||||
}
|
'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
class AntiSpam {
|
|
||||||
|
class AntiSpam {
|
||||||
var $iNumber='';
|
|
||||||
|
var $iNumber='';
|
||||||
function AntiSpam($aNumber='') {
|
|
||||||
$this->iNumber = $aNumber;
|
function AntiSpam($aNumber='') {
|
||||||
}
|
$this->iNumber = $aNumber;
|
||||||
|
}
|
||||||
function Rand($aLen) {
|
|
||||||
$d='';
|
function Rand($aLen) {
|
||||||
for($i=0; $i < $aLen; ++$i) {
|
$d='';
|
||||||
$d .= rand(1,9);
|
for($i=0; $i < $aLen; ++$i) {
|
||||||
}
|
$d .= rand(1,9);
|
||||||
$this->iNumber = $d;
|
}
|
||||||
return $d;
|
$this->iNumber = $d;
|
||||||
}
|
return $d;
|
||||||
|
}
|
||||||
function Stroke() {
|
|
||||||
|
function Stroke() {
|
||||||
$n=strlen($this->iNumber);
|
|
||||||
for($i=0; $i < $n; ++$i ) {
|
$n=strlen($this->iNumber);
|
||||||
if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) {
|
for($i=0; $i < $n; ++$i ) {
|
||||||
return false;
|
if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) {
|
||||||
}
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$dd = new HandDigits();
|
|
||||||
$n = strlen($this->iNumber);
|
$dd = new HandDigits();
|
||||||
$img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight);
|
$n = strlen($this->iNumber);
|
||||||
if( $img < 1 ) {
|
$img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight);
|
||||||
return false;
|
if( $img < 1 ) {
|
||||||
}
|
return false;
|
||||||
$start=0;
|
}
|
||||||
for($i=0; $i < $n; ++$i ) {
|
$start=0;
|
||||||
$size = $dd->digits[$this->iNumber[$i]][0];
|
for($i=0; $i < $n; ++$i ) {
|
||||||
$dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1]));
|
$size = $dd->digits[$this->iNumber[$i]][0];
|
||||||
imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight);
|
$dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1]));
|
||||||
$start += imagesx($dimg);
|
imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight);
|
||||||
}
|
$start += imagesx($dimg);
|
||||||
$resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4);
|
}
|
||||||
if( $resimg < 1 ) {
|
$resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4);
|
||||||
return false;
|
if( $resimg < 1 ) {
|
||||||
}
|
return false;
|
||||||
imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight);
|
}
|
||||||
header("Content-type: image/jpeg");
|
imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight);
|
||||||
imagejpeg($resimg);
|
header("Content-type: image/jpeg");
|
||||||
return true;
|
imagejpeg($resimg);
|
||||||
}
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
|
||||||
|
?>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,72 +1,96 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_CANVAS.PHP
|
// File: JPGRAPH_CANVAS.PHP
|
||||||
// Description: Canvas drawing extension for JpGraph
|
// Description: Canvas drawing extension for JpGraph
|
||||||
// Created: 2001-01-08
|
// Created: 2001-01-08
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_canvas.php 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: jpgraph_canvas.php 626 2006-05-08 19:06:19Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS CanvasGraph
|
// CLASS CanvasGraph
|
||||||
// Description: Creates a simple canvas graph which
|
// Description: Creates a simple canvas graph which
|
||||||
// might be used together with the basic Image drawing
|
// might be used together with the basic Image drawing
|
||||||
// primitives. Useful to auickoly produce some arbitrary
|
// primitives. Useful to auickoly produce some arbitrary
|
||||||
// graphic which benefits from all the functionality in the
|
// graphic which benefits from all the functionality in the
|
||||||
// graph liek caching for example.
|
// graph liek caching for example.
|
||||||
//===================================================
|
//===================================================
|
||||||
class CanvasGraph extends Graph {
|
class CanvasGraph extends Graph {
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function CanvasGraph($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) {
|
function CanvasGraph($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) {
|
||||||
$this->Graph($aWidth,$aHeight,$aCachedName,$timeout,$inline);
|
$this->Graph($aWidth,$aHeight,$aCachedName,$timeout,$inline);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
|
|
||||||
function InitFrame() {
|
function InitFrame() {
|
||||||
$this->StrokePlotArea();
|
$this->StrokePlotArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method description
|
// Method description
|
||||||
function Stroke($aStrokeFileName="") {
|
function Stroke($aStrokeFileName="") {
|
||||||
if( $this->texts != null ) {
|
if( $this->texts != null ) {
|
||||||
for($i=0; $i<count($this->texts); ++$i) {
|
for($i=0; $i < count($this->texts); ++$i) {
|
||||||
$this->texts[$i]->Stroke($this->img);
|
$this->texts[$i]->Stroke($this->img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->StrokeTitles();
|
if( $this->iTables !== null ) {
|
||||||
|
for($i=0; $i < count($this->iTables); ++$i) {
|
||||||
// Should we do any final image transformation
|
$this->iTables[$i]->Stroke($this->img);
|
||||||
if( $this->iImgTrans ) {
|
}
|
||||||
if( !class_exists('ImgTrans') ) {
|
}
|
||||||
require_once('jpgraph_imgtrans.php');
|
$this->StrokeTitles();
|
||||||
}
|
|
||||||
|
// If the filename is the predefined value = '_csim_special_'
|
||||||
$tform = new ImgTrans($this->img->img);
|
// we assume that the call to stroke only needs to do enough
|
||||||
$this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
|
// to correctly generate the CSIM maps.
|
||||||
$this->iImgTransDirection,$this->iImgTransHighQ,
|
// We use this variable to skip things we don't strictly need
|
||||||
$this->iImgTransMinSize,$this->iImgTransFillColor,
|
// to do to generate the image map to improve performance
|
||||||
$this->iImgTransBorder);
|
// a best we can. Therefor you will see a lot of tests !$_csim in the
|
||||||
}
|
// code below.
|
||||||
|
$_csim = ($aStrokeFileName===_CSIM_SPECIALFILE);
|
||||||
|
|
||||||
// If the filename is given as the special _IMG_HANDLER
|
// We need to know if we have stroked the plot in the
|
||||||
// then the image handler is returned and the image is NOT
|
// GetCSIMareas. Otherwise the CSIM hasn't been generated
|
||||||
// streamed back
|
// and in the case of GetCSIM called before stroke to generate
|
||||||
if( $aStrokeFileName == _IMG_HANDLER ) {
|
// CSIM without storing an image to disk GetCSIM must call Stroke.
|
||||||
return $this->img->img;
|
$this->iHasStroked = true;
|
||||||
}
|
|
||||||
else {
|
if( !$_csim ) {
|
||||||
// Finally stream the generated picture
|
|
||||||
$this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);
|
// Should we do any final image transformation
|
||||||
return true;
|
if( $this->iImgTrans ) {
|
||||||
}
|
if( !class_exists('ImgTrans') ) {
|
||||||
}
|
require_once('jpgraph_imgtrans.php');
|
||||||
} // Class
|
}
|
||||||
/* EOF */
|
|
||||||
|
$tform = new ImgTrans($this->img->img);
|
||||||
|
$this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
|
||||||
|
$this->iImgTransDirection,$this->iImgTransHighQ,
|
||||||
|
$this->iImgTransMinSize,$this->iImgTransFillColor,
|
||||||
|
$this->iImgTransBorder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// If the filename is given as the special _IMG_HANDLER
|
||||||
|
// then the image handler is returned and the image is NOT
|
||||||
|
// streamed back
|
||||||
|
if( $aStrokeFileName == _IMG_HANDLER ) {
|
||||||
|
return $this->img->img;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Finally stream the generated picture
|
||||||
|
$this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // Class
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
?>
|
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,491 +1,495 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_DATE.PHP
|
// File: JPGRAPH_DATE.PHP
|
||||||
// Description: Classes to handle Date scaling
|
// Description: Classes to handle Date scaling
|
||||||
// Created: 2005-05-02
|
// Created: 2005-05-02
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_date.php 220 2005-10-15 16:53:53Z ljp $
|
// Ver: $Id: jpgraph_date.php 573 2006-03-04 10:41:59Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEFINE('HOURADJ_1',0+30);
|
DEFINE('HOURADJ_1',0+30);
|
||||||
DEFINE('HOURADJ_2',1+30);
|
DEFINE('HOURADJ_2',1+30);
|
||||||
DEFINE('HOURADJ_3',2+30);
|
DEFINE('HOURADJ_3',2+30);
|
||||||
DEFINE('HOURADJ_4',3+30);
|
DEFINE('HOURADJ_4',3+30);
|
||||||
DEFINE('HOURADJ_6',4+30);
|
DEFINE('HOURADJ_6',4+30);
|
||||||
DEFINE('HOURADJ_12',5+30);
|
DEFINE('HOURADJ_12',5+30);
|
||||||
|
|
||||||
DEFINE('MINADJ_1',0+20);
|
DEFINE('MINADJ_1',0+20);
|
||||||
DEFINE('MINADJ_5',1+20);
|
DEFINE('MINADJ_5',1+20);
|
||||||
DEFINE('MINADJ_10',2+20);
|
DEFINE('MINADJ_10',2+20);
|
||||||
DEFINE('MINADJ_15',3+20);
|
DEFINE('MINADJ_15',3+20);
|
||||||
DEFINE('MINADJ_30',4+20);
|
DEFINE('MINADJ_30',4+20);
|
||||||
|
|
||||||
DEFINE('SECADJ_1',0);
|
DEFINE('SECADJ_1',0);
|
||||||
DEFINE('SECADJ_5',1);
|
DEFINE('SECADJ_5',1);
|
||||||
DEFINE('SECADJ_10',2);
|
DEFINE('SECADJ_10',2);
|
||||||
DEFINE('SECADJ_15',3);
|
DEFINE('SECADJ_15',3);
|
||||||
DEFINE('SECADJ_30',4);
|
DEFINE('SECADJ_30',4);
|
||||||
|
|
||||||
|
|
||||||
DEFINE('YEARADJ_1',0+30);
|
DEFINE('YEARADJ_1',0+30);
|
||||||
DEFINE('YEARADJ_2',1+30);
|
DEFINE('YEARADJ_2',1+30);
|
||||||
DEFINE('YEARADJ_5',2+30);
|
DEFINE('YEARADJ_5',2+30);
|
||||||
|
|
||||||
DEFINE('MONTHADJ_1',0+20);
|
DEFINE('MONTHADJ_1',0+20);
|
||||||
DEFINE('MONTHADJ_6',1+20);
|
DEFINE('MONTHADJ_6',1+20);
|
||||||
|
|
||||||
DEFINE('DAYADJ_1',0);
|
DEFINE('DAYADJ_1',0);
|
||||||
DEFINE('DAYADJ_WEEK',1);
|
DEFINE('DAYADJ_WEEK',1);
|
||||||
DEFINE('DAYADJ_7',1);
|
DEFINE('DAYADJ_7',1);
|
||||||
|
|
||||||
DEFINE('SECPERYEAR',31536000);
|
DEFINE('SECPERYEAR',31536000);
|
||||||
DEFINE('SECPERDAY',86400);
|
DEFINE('SECPERDAY',86400);
|
||||||
DEFINE('SECPERHOUR',3600);
|
DEFINE('SECPERHOUR',3600);
|
||||||
DEFINE('SECPERMIN',60);
|
DEFINE('SECPERMIN',60);
|
||||||
|
|
||||||
|
|
||||||
class DateScale extends LinearScale {
|
class DateScale extends LinearScale {
|
||||||
var $date_format = '';
|
private $date_format = '';
|
||||||
var $iStartAlign = false, $iEndAlign = false;
|
private $iStartAlign = false, $iEndAlign = false;
|
||||||
var $iStartTimeAlign = false, $iEndTimeAlign = false;
|
private $iStartTimeAlign = false, $iEndTimeAlign = false;
|
||||||
|
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function DateScale($aMin=0,$aMax=0,$aType='x') {
|
function DateScale($aMin=0,$aMax=0,$aType='x') {
|
||||||
assert($aType=="x");
|
assert($aType=="x");
|
||||||
assert($aMin<=$aMax);
|
assert($aMin<=$aMax);
|
||||||
|
|
||||||
$this->type=$aType;
|
$this->type=$aType;
|
||||||
$this->scale=array($aMin,$aMax);
|
$this->scale=array($aMin,$aMax);
|
||||||
$this->world_size=$aMax-$aMin;
|
$this->world_size=$aMax-$aMin;
|
||||||
$this->ticks = new LinearTicks();
|
$this->ticks = new LinearTicks();
|
||||||
$this->intscale=true;
|
$this->intscale=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Utility Function AdjDate()
|
// Utility Function AdjDate()
|
||||||
// Description: Will round a given time stamp to an even year, month or day
|
// Description: Will round a given time stamp to an even year, month or day
|
||||||
// argument.
|
// argument.
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||||
$h=0;$i=0;$s=0;
|
$h=0;$i=0;$s=0;
|
||||||
if( $aYearType !== false ) {
|
if( $aYearType !== false ) {
|
||||||
$yearAdj = array(0=>1, 1=>2, 2=>5);
|
$yearAdj = array(0=>1, 1=>2, 2=>5);
|
||||||
if( $aRound == 0 ) {
|
if( $aRound == 0 ) {
|
||||||
$y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
$y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
++$y;
|
++$y;
|
||||||
$y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
$y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||||
}
|
}
|
||||||
$m=1;$d=1;
|
$m=1;$d=1;
|
||||||
}
|
}
|
||||||
elseif( $aMonthType !== false ) {
|
elseif( $aMonthType !== false ) {
|
||||||
$monthAdj = array(0=>1, 1=>6);
|
$monthAdj = array(0=>1, 1=>6);
|
||||||
if( $aRound == 0 ) {
|
if( $aRound == 0 ) {
|
||||||
$m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
$m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||||
$d=1;
|
$d=1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
++$m;
|
++$m;
|
||||||
$m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
$m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||||
$d=1;
|
$d=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif( $aDayType !== false ) {
|
elseif( $aDayType !== false ) {
|
||||||
if( $aDayType == 0 ) {
|
if( $aDayType == 0 ) {
|
||||||
if( $aRound == 1 ) {
|
if( $aRound == 1 ) {
|
||||||
//++$d;
|
//++$d;
|
||||||
$h=23;$i=59;$s=59;
|
$h=23;$i=59;$s=59;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Adjust to an even week boundary.
|
// Adjust to an even week boundary.
|
||||||
$w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat
|
$w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat
|
||||||
if( true ) { // Adjust to start on Mon
|
if( true ) { // Adjust to start on Mon
|
||||||
if( $w==0 ) $w=6;
|
if( $w==0 ) $w=6;
|
||||||
else --$w;
|
else --$w;
|
||||||
}
|
}
|
||||||
if( $aRound == 0 ) {
|
if( $aRound == 0 ) {
|
||||||
$d -= $w;
|
$d -= $w;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$d += (7-$w);
|
$d += (7-$w);
|
||||||
$h=23;$i=59;$s=59;
|
$h=23;$i=59;$s=59;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mktime($h,$i,$s,$m,$d,$y);
|
return mktime($h,$i,$s,$m,$d,$y);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||||
// it downwards.
|
// it downwards.
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||||
return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType);
|
return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||||
// it upwards
|
// it upwards
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||||
return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType);
|
return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Utility Function AdjTime()
|
// Utility Function AdjTime()
|
||||||
// Description: Will round a given time stamp to an even time according to
|
// Description: Will round a given time stamp to an even time according to
|
||||||
// argument.
|
// argument.
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) {
|
function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime);
|
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime);
|
||||||
if( $aHourType !== false ) {
|
if( $aHourType !== false ) {
|
||||||
$aHourType %= 6;
|
$aHourType %= 6;
|
||||||
$hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12);
|
$hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12);
|
||||||
if( $aRound == 0 )
|
if( $aRound == 0 )
|
||||||
$h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
$h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||||
else {
|
else {
|
||||||
if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) {
|
if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) {
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
$h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
$h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||||
if( $h >= 24 ) {
|
if( $h >= 24 ) {
|
||||||
$aTime += 86400;
|
$aTime += 86400;
|
||||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||||
$h -= 24;
|
$h -= 24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$i=0;$s=0;
|
$i=0;$s=0;
|
||||||
}
|
}
|
||||||
elseif( $aMinType !== false ) {
|
elseif( $aMinType !== false ) {
|
||||||
$aMinType %= 5;
|
$aMinType %= 5;
|
||||||
$minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
$minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||||
if( $aRound == 0 ) {
|
if( $aRound == 0 ) {
|
||||||
$i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
$i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) {
|
if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
$i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||||
if( $i >= 60) {
|
if( $i >= 60) {
|
||||||
$aTime += 3600;
|
$aTime += 3600;
|
||||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||||
$h = (int)date('H',$aTime); $i = 0;
|
$h = (int)date('H',$aTime); $i = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$s=0;
|
$s=0;
|
||||||
}
|
}
|
||||||
elseif( $aSecType !== false ) {
|
elseif( $aSecType !== false ) {
|
||||||
$aSecType %= 5;
|
$aSecType %= 5;
|
||||||
$secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
$secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||||
if( $aRound == 0 ) {
|
if( $aRound == 0 ) {
|
||||||
$s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType];
|
$s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType];
|
$s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType];
|
||||||
if( $s >= 60) {
|
if( $s >= 60) {
|
||||||
$s=0;
|
$s=0;
|
||||||
$aTime += 60;
|
$aTime += 60;
|
||||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime);
|
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mktime($h,$i,$s,$m,$d,$y);
|
return mktime($h,$i,$s,$m,$d,$y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||||
// it downwards.
|
// it downwards.
|
||||||
// Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20
|
// Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||||
return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType);
|
return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||||
// it upwards
|
// it upwards
|
||||||
// Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30
|
// Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||||
return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType);
|
return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
// DateAutoScale
|
// DateAutoScale
|
||||||
// Autoscale a date axis given start and end time
|
// Autoscale a date axis given start and end time
|
||||||
// Returns an array ($start,$end,$major,$minor,$format)
|
// Returns an array ($start,$end,$major,$minor,$format)
|
||||||
//------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------
|
||||||
function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) {
|
function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) {
|
||||||
// Format of array
|
// Format of array
|
||||||
// array ( Decision point, array( array( Major-scale-step-array ),
|
// array ( Decision point, array( array( Major-scale-step-array ),
|
||||||
// array( Minor-scale-step-array ),
|
// array( Minor-scale-step-array ),
|
||||||
// array( 0=date-adjust, 1=time-adjust, adjustment-alignment) )
|
// array( 0=date-adjust, 1=time-adjust, adjustment-alignment) )
|
||||||
//
|
//
|
||||||
$scalePoints =
|
$scalePoints =
|
||||||
array(
|
array(
|
||||||
/* Intervall larger than 10 years */
|
/* Intervall larger than 10 years */
|
||||||
SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2),
|
SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2),
|
||||||
array(SECPERYEAR),
|
array(SECPERYEAR),
|
||||||
array(0,YEARADJ_1, 0,YEARADJ_1) ),
|
array(0,YEARADJ_1, 0,YEARADJ_1) ),
|
||||||
|
|
||||||
/* Intervall larger than 2 years */
|
/* Intervall larger than 2 years */
|
||||||
SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR),
|
SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR),
|
||||||
array(0,YEARADJ_1) ),
|
array(0,YEARADJ_1) ),
|
||||||
|
|
||||||
/* Intervall larger than 90 days (approx 3 month) */
|
/* Intervall larger than 90 days (approx 3 month) */
|
||||||
SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY),
|
SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY),
|
||||||
array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY),
|
array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY),
|
||||||
array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)),
|
array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 30 days (approx 1 month) */
|
/* Intervall larger than 30 days (approx 1 month) */
|
||||||
SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY),
|
SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY),
|
||||||
array(SECPERDAY,SECPERDAY.SECPERDAY,SECPERDAY),
|
array(SECPERDAY,SECPERDAY.SECPERDAY,SECPERDAY),
|
||||||
array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)),
|
array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 7 days */
|
/* Intervall larger than 7 days */
|
||||||
SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2),
|
SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2),
|
||||||
array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR),
|
array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR),
|
||||||
array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)),
|
array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 1 day */
|
/* Intervall larger than 1 day */
|
||||||
SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR),
|
SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR),
|
||||||
array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR),
|
array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR),
|
||||||
array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)),
|
array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 12 hours */
|
/* Intervall larger than 12 hours */
|
||||||
SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600),
|
SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600),
|
||||||
array(1800,1800,900,300,300),
|
array(1800,1800,900,300,300),
|
||||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||||
|
|
||||||
/* Intervall larger than 2 hours */
|
/* Intervall larger than 2 hours */
|
||||||
SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300),
|
SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300),
|
||||||
array(1800,900,300,120,60),
|
array(1800,900,300,120,60),
|
||||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||||
|
|
||||||
/* Intervall larger than 1 hours */
|
/* Intervall larger than 1 hours */
|
||||||
SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60),
|
SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60),
|
||||||
array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||||
|
|
||||||
/* Intervall larger than 30 min */
|
/* Intervall larger than 30 min */
|
||||||
SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN),
|
SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN),
|
||||||
array(300,300,60,10),
|
array(300,300,60,10),
|
||||||
array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)),
|
array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 1 min */
|
/* Intervall larger than 1 min */
|
||||||
SECPERMIN,array(array(SECPERMIN,15,10,5),
|
SECPERMIN,array(array(SECPERMIN,15,10,5),
|
||||||
array(15,5,2,1),
|
array(15,5,2,1),
|
||||||
array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)),
|
array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)),
|
||||||
|
|
||||||
/* Intervall larger than 10 sec */
|
/* Intervall larger than 10 sec */
|
||||||
10,array(array(5,2),
|
10,array(array(5,2),
|
||||||
array(1,1),
|
array(1,1),
|
||||||
array(1,SECADJ_5, 1,SECADJ_1)),
|
array(1,SECADJ_5, 1,SECADJ_1)),
|
||||||
|
|
||||||
/* Intervall larger than 1 sec */
|
/* Intervall larger than 1 sec */
|
||||||
1,array(array(1),
|
1,array(array(1),
|
||||||
array(1),
|
array(1),
|
||||||
array(1,SECADJ_1)),
|
array(1,SECADJ_1)),
|
||||||
);
|
);
|
||||||
|
|
||||||
$ns = count($scalePoints);
|
$ns = count($scalePoints);
|
||||||
// Establish major and minor scale units for the date scale
|
// Establish major and minor scale units for the date scale
|
||||||
$diff = $aEndTime - $aStartTime;
|
$diff = $aEndTime - $aStartTime;
|
||||||
if( $diff < 1 ) return false;
|
if( $diff < 1 ) return false;
|
||||||
$done=false;
|
$done=false;
|
||||||
$i=0;
|
$i=0;
|
||||||
while( ! $done ) {
|
while( ! $done ) {
|
||||||
if( $diff > $scalePoints[2*$i] ) {
|
if( $diff > $scalePoints[2*$i] ) {
|
||||||
// Get major and minor scale for this intervall
|
// Get major and minor scale for this intervall
|
||||||
$scaleSteps = $scalePoints[2*$i+1];
|
$scaleSteps = $scalePoints[2*$i+1];
|
||||||
$major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)];
|
$major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)];
|
||||||
// Try to find out which minor step looks best
|
// Try to find out which minor step looks best
|
||||||
$minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)];
|
$minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)];
|
||||||
if( $aAdjust ) {
|
if( $aAdjust ) {
|
||||||
// Find out how we should align the start and end timestamps
|
// Find out how we should align the start and end timestamps
|
||||||
$idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1);
|
$idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1);
|
||||||
if( $scaleSteps[2][$idx] === 0 ) {
|
if( $scaleSteps[2][$idx] === 0 ) {
|
||||||
// Use date adjustment
|
// Use date adjustment
|
||||||
$adj = $scaleSteps[2][$idx+1];
|
$adj = $scaleSteps[2][$idx+1];
|
||||||
if( $adj >= 30 ) {
|
if( $adj >= 30 ) {
|
||||||
$start = $this->AdjStartDate($aStartTime,$adj-30);
|
$start = $this->AdjStartDate($aStartTime,$adj-30);
|
||||||
$end = $this->AdjEndDate($aEndTime,$adj-30);
|
$end = $this->AdjEndDate($aEndTime,$adj-30);
|
||||||
}
|
}
|
||||||
elseif( $adj >= 20 ) {
|
elseif( $adj >= 20 ) {
|
||||||
$start = $this->AdjStartDate($aStartTime,false,$adj-20);
|
$start = $this->AdjStartDate($aStartTime,false,$adj-20);
|
||||||
$end = $this->AdjEndDate($aEndTime,false,$adj-20);
|
$end = $this->AdjEndDate($aEndTime,false,$adj-20);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$start = $this->AdjStartDate($aStartTime,false,false,$adj);
|
$start = $this->AdjStartDate($aStartTime,false,false,$adj);
|
||||||
$end = $this->AdjEndDate($aEndTime,false,false,$adj);
|
$end = $this->AdjEndDate($aEndTime,false,false,$adj);
|
||||||
// We add 1 second for date adjustment to make sure we end on 00:00 the following day
|
// We add 1 second for date adjustment to make sure we end on 00:00 the following day
|
||||||
// This makes the final major tick be srawn when we step day-by-day instead of ending
|
// This makes the final major tick be srawn when we step day-by-day instead of ending
|
||||||
// on xx:59:59 which would not draw the final major tick
|
// on xx:59:59 which would not draw the final major tick
|
||||||
$end++;
|
$end++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Use time adjustment
|
// Use time adjustment
|
||||||
$adj = $scaleSteps[2][$idx+1];
|
$adj = $scaleSteps[2][$idx+1];
|
||||||
if( $adj >= 30 ) {
|
if( $adj >= 30 ) {
|
||||||
$start = $this->AdjStartTime($aStartTime,$adj-30);
|
$start = $this->AdjStartTime($aStartTime,$adj-30);
|
||||||
$end = $this->AdjEndTime($aEndTime,$adj-30);
|
$end = $this->AdjEndTime($aEndTime,$adj-30);
|
||||||
}
|
}
|
||||||
elseif( $adj >= 20 ) {
|
elseif( $adj >= 20 ) {
|
||||||
$start = $this->AdjStartTime($aStartTime,false,$adj-20);
|
$start = $this->AdjStartTime($aStartTime,false,$adj-20);
|
||||||
$end = $this->AdjEndTime($aEndTime,false,$adj-20);
|
$end = $this->AdjEndTime($aEndTime,false,$adj-20);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$start = $this->AdjStartTime($aStartTime,false,false,$adj);
|
$start = $this->AdjStartTime($aStartTime,false,false,$adj);
|
||||||
$end = $this->AdjEndTime($aEndTime,false,false,$adj);
|
$end = $this->AdjEndTime($aEndTime,false,false,$adj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the overall date span is larger than 1 day ten we show date
|
// If the overall date span is larger than 1 day ten we show date
|
||||||
$format = '';
|
$format = '';
|
||||||
if( ($end-$start) > SECPERDAY ) {
|
if( ($end-$start) > SECPERDAY ) {
|
||||||
$format = 'Y-m-d ';
|
$format = 'Y-m-d ';
|
||||||
}
|
}
|
||||||
// If the major step is less than 1 day we need to whow hours + min
|
// If the major step is less than 1 day we need to whow hours + min
|
||||||
if( $major < SECPERDAY ) {
|
if( $major < SECPERDAY ) {
|
||||||
$format .= 'H:i';
|
$format .= 'H:i';
|
||||||
}
|
}
|
||||||
// If the major step is less than 1 min we need to show sec
|
// If the major step is less than 1 min we need to show sec
|
||||||
if( $major < 60 ) {
|
if( $major < 60 ) {
|
||||||
$format .= ':s';
|
$format .= ':s';
|
||||||
}
|
}
|
||||||
$done=true;
|
$done=true;
|
||||||
}
|
}
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
return array($start,$end,$major,$minor,$format);
|
return array($start,$end,$major,$minor,$format);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overrides the automatic determined date format. Must be a valid date() format string
|
// Overrides the automatic determined date format. Must be a valid date() format string
|
||||||
function SetDateFormat($aFormat) {
|
function SetDateFormat($aFormat) {
|
||||||
$this->date_format = $aFormat;
|
$this->date_format = $aFormat;
|
||||||
}
|
$this->ticks->SetLabelDateFormat($this->date_format);
|
||||||
|
}
|
||||||
function SetDateAlign($aStartAlign,$aEndAlign=false) {
|
|
||||||
if( $aEndAlign === false ) {
|
function SetDateAlign($aStartAlign,$aEndAlign=false) {
|
||||||
$aEndAlign=$aStartAlign;
|
if( $aEndAlign === false ) {
|
||||||
}
|
$aEndAlign=$aStartAlign;
|
||||||
$this->iStartAlign = $aStartAlign;
|
}
|
||||||
$this->iEndAlign = $aEndAlign;
|
$this->iStartAlign = $aStartAlign;
|
||||||
}
|
$this->iEndAlign = $aEndAlign;
|
||||||
|
}
|
||||||
function SetTimeAlign($aStartAlign,$aEndAlign=false) {
|
|
||||||
if( $aEndAlign === false ) {
|
function SetTimeAlign($aStartAlign,$aEndAlign=false) {
|
||||||
$aEndAlign=$aStartAlign;
|
if( $aEndAlign === false ) {
|
||||||
}
|
$aEndAlign=$aStartAlign;
|
||||||
$this->iStartTimeAlign = $aStartAlign;
|
}
|
||||||
$this->iEndTimeAlign = $aEndAlign;
|
$this->iStartTimeAlign = $aStartAlign;
|
||||||
}
|
$this->iEndTimeAlign = $aEndAlign;
|
||||||
|
}
|
||||||
|
|
||||||
function AutoScale(&$img,$aStartTime,$aEndTime,$aNumSteps) {
|
|
||||||
if( $aStartTime == $aEndTime ) {
|
function AutoScale($img,$aStartTime,$aEndTime,$aNumSteps,$_adummy=false) {
|
||||||
// Special case when we only have one data point.
|
// We need to have one dummy argument to make the signature of AutoScale()
|
||||||
// Create a small artifical intervall to do the autoscaling
|
// identical to LinearScale::AutoScale
|
||||||
$aStartTime -= 10;
|
if( $aStartTime == $aEndTime ) {
|
||||||
$aEndTime += 10;
|
// Special case when we only have one data point.
|
||||||
}
|
// Create a small artifical intervall to do the autoscaling
|
||||||
$done=false;
|
$aStartTime -= 10;
|
||||||
$i=0;
|
$aEndTime += 10;
|
||||||
while( ! $done && $i < 5) {
|
}
|
||||||
list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i);
|
$done=false;
|
||||||
$n = floor(($adjend-$adjstart)/$maj);
|
$i=0;
|
||||||
if( $n * 1.7 > $aNumSteps ) {
|
while( ! $done && $i < 5) {
|
||||||
$done=true;
|
list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i);
|
||||||
}
|
$n = floor(($adjend-$adjstart)/$maj);
|
||||||
$i++;
|
if( $n * 1.7 > $aNumSteps ) {
|
||||||
}
|
$done=true;
|
||||||
|
}
|
||||||
/*
|
$i++;
|
||||||
if( 0 ) { // DEBUG
|
}
|
||||||
echo " Start =".date("Y-m-d H:i:s",$aStartTime)."<br>";
|
|
||||||
echo " End =".date("Y-m-d H:i:s",$aEndTime)."<br>";
|
/*
|
||||||
echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."<br>";
|
if( 0 ) { // DEBUG
|
||||||
echo "Adj End =".date("Y-m-d H:i:s",$adjend)."<p>";
|
echo " Start =".date("Y-m-d H:i:s",$aStartTime)."<br>";
|
||||||
echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day<br>";
|
echo " End =".date("Y-m-d H:i:s",$aEndTime)."<br>";
|
||||||
echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day<br>";
|
echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."<br>";
|
||||||
echo "Format=$format<p>";
|
echo "Adj End =".date("Y-m-d H:i:s",$adjend)."<p>";
|
||||||
}
|
echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day<br>";
|
||||||
*/
|
echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day<br>";
|
||||||
|
echo "Format=$format<p>";
|
||||||
if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) {
|
}
|
||||||
JpGraphError::Raise('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both');
|
*/
|
||||||
}
|
|
||||||
|
if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) {
|
||||||
if( $this->iStartTimeAlign !== false ) {
|
JpGraphError::RaiseL(3001);
|
||||||
if( $this->iStartTimeAlign >= 30 ) {
|
//('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both');
|
||||||
$adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30);
|
}
|
||||||
}
|
|
||||||
elseif( $this->iStartTimeAlign >= 20 ) {
|
if( $this->iStartTimeAlign !== false ) {
|
||||||
$adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20);
|
if( $this->iStartTimeAlign >= 30 ) {
|
||||||
}
|
$adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30);
|
||||||
else {
|
}
|
||||||
$adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign);
|
elseif( $this->iStartTimeAlign >= 20 ) {
|
||||||
}
|
$adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20);
|
||||||
}
|
}
|
||||||
if( $this->iEndTimeAlign !== false ) {
|
else {
|
||||||
if( $this->iEndTimeAlign >= 30 ) {
|
$adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign);
|
||||||
$adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30);
|
}
|
||||||
}
|
}
|
||||||
elseif( $this->iEndTimeAlign >= 20 ) {
|
if( $this->iEndTimeAlign !== false ) {
|
||||||
$adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20);
|
if( $this->iEndTimeAlign >= 30 ) {
|
||||||
}
|
$adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30);
|
||||||
else {
|
}
|
||||||
$adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign);
|
elseif( $this->iEndTimeAlign >= 20 ) {
|
||||||
}
|
$adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign);
|
||||||
|
}
|
||||||
if( $this->iStartAlign !== false ) {
|
}
|
||||||
if( $this->iStartAlign >= 30 ) {
|
|
||||||
$adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30);
|
|
||||||
}
|
|
||||||
elseif( $this->iStartAlign >= 20 ) {
|
if( $this->iStartAlign !== false ) {
|
||||||
$adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20);
|
if( $this->iStartAlign >= 30 ) {
|
||||||
}
|
$adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30);
|
||||||
else {
|
}
|
||||||
$adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign);
|
elseif( $this->iStartAlign >= 20 ) {
|
||||||
}
|
$adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20);
|
||||||
}
|
}
|
||||||
if( $this->iEndAlign !== false ) {
|
else {
|
||||||
if( $this->iEndAlign >= 30 ) {
|
$adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign);
|
||||||
$adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30);
|
}
|
||||||
}
|
}
|
||||||
elseif( $this->iEndAlign >= 20 ) {
|
if( $this->iEndAlign !== false ) {
|
||||||
$adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20);
|
if( $this->iEndAlign >= 30 ) {
|
||||||
}
|
$adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30);
|
||||||
else {
|
}
|
||||||
$adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign);
|
elseif( $this->iEndAlign >= 20 ) {
|
||||||
}
|
$adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20);
|
||||||
}
|
}
|
||||||
$this->Update($img,$adjstart,$adjend);
|
else {
|
||||||
if( ! $this->ticks->IsSpecified() )
|
$adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign);
|
||||||
$this->ticks->Set($maj,$min);
|
}
|
||||||
if( $this->date_format == '' )
|
}
|
||||||
$this->ticks->SetLabelDateFormat($format);
|
$this->Update($img,$adjstart,$adjend);
|
||||||
else
|
if( ! $this->ticks->IsSpecified() )
|
||||||
$this->ticks->SetLabelDateFormat($this->date_format);
|
$this->ticks->Set($maj,$min);
|
||||||
}
|
if( $this->date_format == '' )
|
||||||
}
|
$this->ticks->SetLabelDateFormat($format);
|
||||||
|
else
|
||||||
|
$this->ticks->SetLabelDateFormat($this->date_format);
|
||||||
?>
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
@ -1,156 +1,157 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_ERROR.PHP
|
// File: JPGRAPH_ERROR.PHP
|
||||||
// Description: Error plot extension for JpGraph
|
// Description: Error plot extension for JpGraph
|
||||||
// Created: 2001-01-08
|
// Created: 2001-01-08
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_error.php 88 2005-08-07 17:18:51Z ljp $
|
// Ver: $Id: jpgraph_error.php 462 2006-02-04 12:07:05Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS ErrorPlot
|
// CLASS ErrorPlot
|
||||||
// Description: Error plot with min/max value for
|
// Description: Error plot with min/max value for
|
||||||
// each datapoint
|
// each datapoint
|
||||||
//===================================================
|
//===================================================
|
||||||
class ErrorPlot extends Plot {
|
class ErrorPlot extends Plot {
|
||||||
var $errwidth=2;
|
private $errwidth=2;
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function ErrorPlot(&$datay,$datax=false) {
|
function ErrorPlot($datay,$datax=false) {
|
||||||
$this->Plot($datay,$datax);
|
$this->Plot($datay,$datax);
|
||||||
$this->numpoints /= 2;
|
$this->numpoints /= 2;
|
||||||
}
|
}
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
|
|
||||||
// Gets called before any axis are stroked
|
// Gets called before any axis are stroked
|
||||||
function PreStrokeAdjust(&$graph) {
|
function PreStrokeAdjust($graph) {
|
||||||
if( $this->center ) {
|
if( $this->center ) {
|
||||||
$a=0.5; $b=0.5;
|
$a=0.5; $b=0.5;
|
||||||
++$this->numpoints;
|
++$this->numpoints;
|
||||||
} else {
|
} else {
|
||||||
$a=0; $b=0;
|
$a=0; $b=0;
|
||||||
}
|
}
|
||||||
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
||||||
$graph->SetTextScaleOff($b);
|
$graph->SetTextScaleOff($b);
|
||||||
//$graph->xaxis->scale->ticks->SupressMinorTickMarks();
|
//$graph->xaxis->scale->ticks->SupressMinorTickMarks();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method description
|
// Method description
|
||||||
function Stroke(&$img,&$xscale,&$yscale) {
|
function Stroke($img,$xscale,$yscale) {
|
||||||
$numpoints=count($this->coords[0])/2;
|
$numpoints=count($this->coords[0])/2;
|
||||||
$img->SetColor($this->color);
|
$img->SetColor($this->color);
|
||||||
$img->SetLineWeight($this->weight);
|
$img->SetLineWeight($this->weight);
|
||||||
|
|
||||||
if( isset($this->coords[1]) ) {
|
if( isset($this->coords[1]) ) {
|
||||||
if( count($this->coords[1])!=$numpoints )
|
if( count($this->coords[1])!=$numpoints )
|
||||||
JpGraphError::Raise("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints);
|
||||||
else
|
//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
||||||
$exist_x = true;
|
else
|
||||||
}
|
$exist_x = true;
|
||||||
else
|
}
|
||||||
$exist_x = false;
|
else
|
||||||
|
$exist_x = false;
|
||||||
for( $i=0; $i<$numpoints; ++$i) {
|
|
||||||
if( $exist_x )
|
for( $i=0; $i<$numpoints; ++$i) {
|
||||||
$x=$this->coords[1][$i];
|
if( $exist_x )
|
||||||
else
|
$x=$this->coords[1][$i];
|
||||||
$x=$i;
|
else
|
||||||
|
$x=$i;
|
||||||
if( !is_numeric($x) ||
|
|
||||||
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) {
|
if( !is_numeric($x) ||
|
||||||
continue;
|
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
$xt = $xscale->Translate($x);
|
|
||||||
$yt1 = $yscale->Translate($this->coords[0][$i*2]);
|
$xt = $xscale->Translate($x);
|
||||||
$yt2 = $yscale->Translate($this->coords[0][$i*2+1]);
|
$yt1 = $yscale->Translate($this->coords[0][$i*2]);
|
||||||
$img->Line($xt,$yt1,$xt,$yt2);
|
$yt2 = $yscale->Translate($this->coords[0][$i*2+1]);
|
||||||
$img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1);
|
$img->Line($xt,$yt1,$xt,$yt2);
|
||||||
$img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2);
|
$img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1);
|
||||||
}
|
$img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2);
|
||||||
return true;
|
}
|
||||||
}
|
return true;
|
||||||
} // Class
|
}
|
||||||
|
} // Class
|
||||||
|
|
||||||
//===================================================
|
|
||||||
// CLASS ErrorLinePlot
|
//===================================================
|
||||||
// Description: Combine a line and error plot
|
// CLASS ErrorLinePlot
|
||||||
// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR
|
// Description: Combine a line and error plot
|
||||||
// BACKWARD COMPATIBILITY
|
// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR
|
||||||
//===================================================
|
// BACKWARD COMPATIBILITY
|
||||||
class ErrorLinePlot extends ErrorPlot {
|
//===================================================
|
||||||
var $line=null;
|
class ErrorLinePlot extends ErrorPlot {
|
||||||
//---------------
|
public $line=null;
|
||||||
// CONSTRUCTOR
|
//---------------
|
||||||
function ErrorLinePlot(&$datay,$datax=false) {
|
// CONSTRUCTOR
|
||||||
$this->ErrorPlot($datay,$datax);
|
function ErrorLinePlot($datay,$datax=false) {
|
||||||
// Calculate line coordinates as the average of the error limits
|
$this->ErrorPlot($datay,$datax);
|
||||||
$n = count($datay);
|
// Calculate line coordinates as the average of the error limits
|
||||||
for($i=0; $i < $n; $i+=2 ) {
|
$n = count($datay);
|
||||||
$ly[]=($datay[$i]+$datay[$i+1])/2;
|
for($i=0; $i < $n; $i+=2 ) {
|
||||||
}
|
$ly[]=($datay[$i]+$datay[$i+1])/2;
|
||||||
$this->line=new LinePlot($ly,$datax);
|
}
|
||||||
}
|
$this->line=new LinePlot($ly,$datax);
|
||||||
|
}
|
||||||
//---------------
|
|
||||||
// PUBLIC METHODS
|
//---------------
|
||||||
function Legend(&$graph) {
|
// PUBLIC METHODS
|
||||||
if( $this->legend != "" )
|
function Legend($graph) {
|
||||||
$graph->legend->Add($this->legend,$this->color);
|
if( $this->legend != "" )
|
||||||
$this->line->Legend($graph);
|
$graph->legend->Add($this->legend,$this->color);
|
||||||
}
|
$this->line->Legend($graph);
|
||||||
|
}
|
||||||
function Stroke(&$img,&$xscale,&$yscale) {
|
|
||||||
parent::Stroke($img,$xscale,$yscale);
|
function Stroke($img,$xscale,$yscale) {
|
||||||
$this->line->Stroke($img,$xscale,$yscale);
|
parent::Stroke($img,$xscale,$yscale);
|
||||||
}
|
$this->line->Stroke($img,$xscale,$yscale);
|
||||||
} // Class
|
}
|
||||||
|
} // Class
|
||||||
|
|
||||||
//===================================================
|
|
||||||
// CLASS LineErrorPlot
|
//===================================================
|
||||||
// Description: Combine a line and error plot
|
// CLASS LineErrorPlot
|
||||||
//===================================================
|
// Description: Combine a line and error plot
|
||||||
class LineErrorPlot extends ErrorPlot {
|
//===================================================
|
||||||
var $line=null;
|
class LineErrorPlot extends ErrorPlot {
|
||||||
//---------------
|
public $line=null;
|
||||||
// CONSTRUCTOR
|
//---------------
|
||||||
// Data is (val, errdeltamin, errdeltamax)
|
// CONSTRUCTOR
|
||||||
function LineErrorPlot(&$datay,$datax=false) {
|
// Data is (val, errdeltamin, errdeltamax)
|
||||||
$ly=array(); $ey=array();
|
function LineErrorPlot($datay,$datax=false) {
|
||||||
$n = count($datay);
|
$ly=array(); $ey=array();
|
||||||
if( $n % 3 != 0 ) {
|
$n = count($datay);
|
||||||
JpGraphError::Raise('Error in input data to LineErrorPlot.'.
|
if( $n % 3 != 0 ) {
|
||||||
'Number of data points must be a multiple of 3');
|
JpGraphError::RaiseL(4002);
|
||||||
}
|
//('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3');
|
||||||
for($i=0; $i < $n; $i+=3 ) {
|
}
|
||||||
$ly[]=$datay[$i];
|
for($i=0; $i < $n; $i+=3 ) {
|
||||||
$ey[]=$datay[$i]+$datay[$i+1];
|
$ly[]=$datay[$i];
|
||||||
$ey[]=$datay[$i]+$datay[$i+2];
|
$ey[]=$datay[$i]+$datay[$i+1];
|
||||||
}
|
$ey[]=$datay[$i]+$datay[$i+2];
|
||||||
$this->ErrorPlot($ey,$datax);
|
}
|
||||||
$this->line=new LinePlot($ly,$datax);
|
$this->ErrorPlot($ey,$datax);
|
||||||
}
|
$this->line=new LinePlot($ly,$datax);
|
||||||
|
}
|
||||||
//---------------
|
|
||||||
// PUBLIC METHODS
|
//---------------
|
||||||
function Legend(&$graph) {
|
// PUBLIC METHODS
|
||||||
if( $this->legend != "" )
|
function Legend($graph) {
|
||||||
$graph->legend->Add($this->legend,$this->color);
|
if( $this->legend != "" )
|
||||||
$this->line->Legend($graph);
|
$graph->legend->Add($this->legend,$this->color);
|
||||||
}
|
$this->line->Legend($graph);
|
||||||
|
}
|
||||||
function Stroke(&$img,&$xscale,&$yscale) {
|
|
||||||
parent::Stroke($img,$xscale,$yscale);
|
function Stroke($img,$xscale,$yscale) {
|
||||||
$this->line->Stroke($img,$xscale,$yscale);
|
parent::Stroke($img,$xscale,$yscale);
|
||||||
}
|
$this->line->Stroke($img,$xscale,$yscale);
|
||||||
} // Class
|
}
|
||||||
|
} // Class
|
||||||
|
|
||||||
/* EOF */
|
|
||||||
|
/* EOF */
|
||||||
?>
|
?>
|
@ -1,370 +1,374 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: JPGRAPH_FLAGS.PHP
|
// File: JPGRAPH_FLAGS.PHP
|
||||||
// Description: Class Jpfile. Handles plotmarks
|
// Description: Class Jpfile. Handles plotmarks
|
||||||
// Created: 2003-06-28
|
// Created: 2003-06-28
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_flags.php 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: jpgraph_flags.php 472 2006-02-04 12:13:48Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
// Defines for the different basic sizes of flags
|
// Defines for the different basic sizes of flags
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
DEFINE('FLAGSIZE1',1);
|
DEFINE('FLAGSIZE1',1);
|
||||||
DEFINE('FLAGSIZE2',2);
|
DEFINE('FLAGSIZE2',2);
|
||||||
DEFINE('FLAGSIZE3',3);
|
DEFINE('FLAGSIZE3',3);
|
||||||
DEFINE('FLAGSIZE4',4);
|
DEFINE('FLAGSIZE4',4);
|
||||||
|
|
||||||
class FlagImages {
|
class FlagImages {
|
||||||
|
|
||||||
var $iCountryNameMap = array(
|
private $iCountryNameMap = array(
|
||||||
'Afghanistan' => 'afgh',
|
'Afghanistan' => 'afgh',
|
||||||
'Republic of Angola' => 'agla',
|
'Republic of Angola' => 'agla',
|
||||||
'Republic of Albania' => 'alba',
|
'Republic of Albania' => 'alba',
|
||||||
'Alderney' => 'alde',
|
'Alderney' => 'alde',
|
||||||
'Democratic and Popular Republic of Algeria' => 'alge',
|
'Democratic and Popular Republic of Algeria' => 'alge',
|
||||||
'Territory of American Samoa' => 'amsa',
|
'Territory of American Samoa' => 'amsa',
|
||||||
'Principality of Andorra' => 'andr',
|
'Principality of Andorra' => 'andr',
|
||||||
'British Overseas Territory of Anguilla' => 'angu',
|
'British Overseas Territory of Anguilla' => 'angu',
|
||||||
'Antarctica' => 'anta',
|
'Antarctica' => 'anta',
|
||||||
'Argentine Republic' => 'arge',
|
'Argentine Republic' => 'arge',
|
||||||
'League of Arab States' => 'arle',
|
'League of Arab States' => 'arle',
|
||||||
'Republic of Armenia' => 'arme',
|
'Republic of Armenia' => 'arme',
|
||||||
'Aruba' => 'arub',
|
'Aruba' => 'arub',
|
||||||
'Commonwealth of Australia' => 'astl',
|
'Commonwealth of Australia' => 'astl',
|
||||||
'Republic of Austria' => 'aust',
|
'Republic of Austria' => 'aust',
|
||||||
'Azerbaijani Republic' => 'azer',
|
'Azerbaijani Republic' => 'azer',
|
||||||
'British Antarctic Territory' => 'bant',
|
'British Antarctic Territory' => 'bant',
|
||||||
'Kingdom of Belgium' => 'belg',
|
'Kingdom of Belgium' => 'belg',
|
||||||
'British Overseas Territory of Bermuda' => 'berm',
|
'British Overseas Territory of Bermuda' => 'berm',
|
||||||
'Commonwealth of the Bahamas' => 'bhms',
|
'Commonwealth of the Bahamas' => 'bhms',
|
||||||
'Kingdom of Bahrain' => 'bhrn',
|
'Kingdom of Bahrain' => 'bhrn',
|
||||||
'Republic of Belarus' => 'blru',
|
'Republic of Belarus' => 'blru',
|
||||||
'Republic of Bolivia' => 'blva',
|
'Republic of Bolivia' => 'blva',
|
||||||
'Belize' => 'blze',
|
'Belize' => 'blze',
|
||||||
'Republic of Benin' => 'bnin',
|
'Republic of Benin' => 'bnin',
|
||||||
'Republic of Botswana' => 'bots',
|
'Republic of Botswana' => 'bots',
|
||||||
'Federative Republic of Brazil' => 'braz',
|
'Federative Republic of Brazil' => 'braz',
|
||||||
'Barbados' => 'brbd',
|
'Barbados' => 'brbd',
|
||||||
'British Indian Ocean Territory' => 'brin',
|
'British Indian Ocean Territory' => 'brin',
|
||||||
'Brunei Darussalam' => 'brun',
|
'Brunei Darussalam' => 'brun',
|
||||||
'Republic of Burkina' => 'bufa',
|
'Republic of Burkina' => 'bufa',
|
||||||
'Republic of Bulgaria' => 'bulg',
|
'Republic of Bulgaria' => 'bulg',
|
||||||
'Republic of Burundi' => 'buru',
|
'Republic of Burundi' => 'buru',
|
||||||
'Overseas Territory of the British Virgin Islands' => 'bvis',
|
'Overseas Territory of the British Virgin Islands' => 'bvis',
|
||||||
'Central African Republic' => 'cafr',
|
'Central African Republic' => 'cafr',
|
||||||
'Kingdom of Cambodia' => 'camb',
|
'Kingdom of Cambodia' => 'camb',
|
||||||
'Republic of Cameroon' => 'came',
|
'Republic of Cameroon' => 'came',
|
||||||
'Dominion of Canada' => 'cana',
|
'Dominion of Canada' => 'cana',
|
||||||
'Caribbean Community' => 'cari',
|
'Caribbean Community' => 'cari',
|
||||||
'Republic of Cape Verde' => 'cave',
|
'Republic of Cape Verde' => 'cave',
|
||||||
'Republic of Chad' => 'chad',
|
'Republic of Chad' => 'chad',
|
||||||
'Republic of Chile' => 'chil',
|
'Republic of Chile' => 'chil',
|
||||||
'Peoples Republic of China' => 'chin',
|
'Peoples Republic of China' => 'chin',
|
||||||
'Territory of Christmas Island' => 'chms',
|
'Territory of Christmas Island' => 'chms',
|
||||||
'Commonwealth of Independent States' => 'cins',
|
'Commonwealth of Independent States' => 'cins',
|
||||||
'Cook Islands' => 'ckis',
|
'Cook Islands' => 'ckis',
|
||||||
'Republic of Colombia' => 'clmb',
|
'Republic of Colombia' => 'clmb',
|
||||||
'Territory of Cocos Islands' => 'cois',
|
'Territory of Cocos Islands' => 'cois',
|
||||||
'Commonwealth' => 'comn',
|
'Commonwealth' => 'comn',
|
||||||
'Union of the Comoros' => 'como',
|
'Union of the Comoros' => 'como',
|
||||||
'Republic of the Congo' => 'cong',
|
'Republic of the Congo' => 'cong',
|
||||||
'Republic of Costa Rica' => 'corc',
|
'Republic of Costa Rica' => 'corc',
|
||||||
'Republic of Croatia' => 'croa',
|
'Republic of Croatia' => 'croa',
|
||||||
'Republic of Cuba' => 'cuba',
|
'Republic of Cuba' => 'cuba',
|
||||||
'British Overseas Territory of the Cayman Islands' => 'cyis',
|
'British Overseas Territory of the Cayman Islands' => 'cyis',
|
||||||
'Republic of Cyprus' => 'cypr',
|
'Republic of Cyprus' => 'cypr',
|
||||||
'The Czech Republic' => 'czec',
|
'The Czech Republic' => 'czec',
|
||||||
'Kingdom of Denmark' => 'denm',
|
'Kingdom of Denmark' => 'denm',
|
||||||
'Republic of Djibouti' => 'djib',
|
'Republic of Djibouti' => 'djib',
|
||||||
'Commonwealth of Dominica' => 'domn',
|
'Commonwealth of Dominica' => 'domn',
|
||||||
'Dominican Republic' => 'dore',
|
'Dominican Republic' => 'dore',
|
||||||
'Republic of Ecuador' => 'ecua',
|
'Republic of Ecuador' => 'ecua',
|
||||||
'Arab Republic of Egypt' => 'egyp',
|
'Arab Republic of Egypt' => 'egyp',
|
||||||
'Republic of El Salvador' => 'elsa',
|
'Republic of El Salvador' => 'elsa',
|
||||||
'England' => 'engl',
|
'England' => 'engl',
|
||||||
'Republic of Equatorial Guinea' => 'eqgu',
|
'Republic of Equatorial Guinea' => 'eqgu',
|
||||||
'State of Eritrea' => 'erit',
|
'State of Eritrea' => 'erit',
|
||||||
'Republic of Estonia' => 'estn',
|
'Republic of Estonia' => 'estn',
|
||||||
'Ethiopia' => 'ethp',
|
'Ethiopia' => 'ethp',
|
||||||
'European Union' => 'euun',
|
'European Union' => 'euun',
|
||||||
'British Overseas Territory of the Falkland Islands' => 'fais',
|
'British Overseas Territory of the Falkland Islands' => 'fais',
|
||||||
'International Federation of Vexillological Associations' => 'fiav',
|
'International Federation of Vexillological Associations' => 'fiav',
|
||||||
'Republic of Fiji' => 'fiji',
|
'Republic of Fiji' => 'fiji',
|
||||||
'Republic of Finland' => 'finl',
|
'Republic of Finland' => 'finl',
|
||||||
'Territory of French Polynesia' => 'fpol',
|
'Territory of French Polynesia' => 'fpol',
|
||||||
'French Republic' => 'fran',
|
'French Republic' => 'fran',
|
||||||
'Overseas Department of French Guiana' => 'frgu',
|
'Overseas Department of French Guiana' => 'frgu',
|
||||||
'Gabonese Republic' => 'gabn',
|
'Gabonese Republic' => 'gabn',
|
||||||
'Republic of the Gambia' => 'gamb',
|
'Republic of the Gambia' => 'gamb',
|
||||||
'Republic of Georgia' => 'geor',
|
'Republic of Georgia' => 'geor',
|
||||||
'Federal Republic of Germany' => 'germ',
|
'Federal Republic of Germany' => 'germ',
|
||||||
'Republic of Ghana' => 'ghan',
|
'Republic of Ghana' => 'ghan',
|
||||||
'Gibraltar' => 'gibr',
|
'Gibraltar' => 'gibr',
|
||||||
'Hellenic Republic' => 'grec',
|
'Hellenic Republic' => 'grec',
|
||||||
'State of Grenada' => 'gren',
|
'State of Grenada' => 'gren',
|
||||||
'Overseas Department of Guadeloupe' => 'guad',
|
'Overseas Department of Guadeloupe' => 'guad',
|
||||||
'Territory of Guam' => 'guam',
|
'Territory of Guam' => 'guam',
|
||||||
'Republic of Guatemala' => 'guat',
|
'Republic of Guatemala' => 'guat',
|
||||||
'The Bailiwick of Guernsey' => 'guer',
|
'The Bailiwick of Guernsey' => 'guer',
|
||||||
'Republic of Guinea' => 'guin',
|
'Republic of Guinea' => 'guin',
|
||||||
'Republic of Haiti' => 'hait',
|
'Republic of Haiti' => 'hait',
|
||||||
'Hong Kong Special Administrative Region' => 'hokn',
|
'Hong Kong Special Administrative Region' => 'hokn',
|
||||||
'Republic of Honduras' => 'hond',
|
'Republic of Honduras' => 'hond',
|
||||||
'Republic of Hungary' => 'hung',
|
'Republic of Hungary' => 'hung',
|
||||||
'Republic of Iceland' => 'icel',
|
'Republic of Iceland' => 'icel',
|
||||||
'International Committee of the Red Cross' => 'icrc',
|
'International Committee of the Red Cross' => 'icrc',
|
||||||
'Republic of India' => 'inda',
|
'Republic of India' => 'inda',
|
||||||
'Republic of Indonesia' => 'indn',
|
'Republic of Indonesia' => 'indn',
|
||||||
'Republic of Iraq' => 'iraq',
|
'Republic of Iraq' => 'iraq',
|
||||||
'Republic of Ireland' => 'irel',
|
'Republic of Ireland' => 'irel',
|
||||||
'Organization of the Islamic Conference' => 'isco',
|
'Organization of the Islamic Conference' => 'isco',
|
||||||
'Isle of Man' => 'isma',
|
'Isle of Man' => 'isma',
|
||||||
'State of Israel' => 'isra',
|
'State of Israel' => 'isra',
|
||||||
'Italian Republic' => 'ital',
|
'Italian Republic' => 'ital',
|
||||||
'Jamaica' => 'jama',
|
'Jamaica' => 'jama',
|
||||||
'Japan' => 'japa',
|
'Japan' => 'japa',
|
||||||
'The Bailiwick of Jersey' => 'jers',
|
'The Bailiwick of Jersey' => 'jers',
|
||||||
'Hashemite Kingdom of Jordan' => 'jord',
|
'Hashemite Kingdom of Jordan' => 'jord',
|
||||||
'Republic of Kazakhstan' => 'kazk',
|
'Republic of Kazakhstan' => 'kazk',
|
||||||
'Republic of Kenya' => 'keny',
|
'Republic of Kenya' => 'keny',
|
||||||
'Republic of Kiribati' => 'kirb',
|
'Republic of Kiribati' => 'kirb',
|
||||||
'State of Kuwait' => 'kuwa',
|
'State of Kuwait' => 'kuwa',
|
||||||
'Kyrgyz Republic' => 'kyrg',
|
'Kyrgyz Republic' => 'kyrg',
|
||||||
'Republic of Latvia' => 'latv',
|
'Republic of Latvia' => 'latv',
|
||||||
'Lebanese Republic' => 'leba',
|
'Lebanese Republic' => 'leba',
|
||||||
'Kingdom of Lesotho' => 'lest',
|
'Kingdom of Lesotho' => 'lest',
|
||||||
'Republic of Liberia' => 'libe',
|
'Republic of Liberia' => 'libe',
|
||||||
'Principality of Liechtenstein' => 'liec',
|
'Principality of Liechtenstein' => 'liec',
|
||||||
'Republic of Lithuania' => 'lith',
|
'Republic of Lithuania' => 'lith',
|
||||||
'Grand Duchy of Luxembourg' => 'luxe',
|
'Grand Duchy of Luxembourg' => 'luxe',
|
||||||
'Macao Special Administrative Region' => 'maca',
|
'Macao Special Administrative Region' => 'maca',
|
||||||
'Republic of Macedonia' => 'mace',
|
'Republic of Macedonia' => 'mace',
|
||||||
'Republic of Madagascar' => 'mada',
|
'Republic of Madagascar' => 'mada',
|
||||||
'Republic of the Marshall Islands' => 'mais',
|
'Republic of the Marshall Islands' => 'mais',
|
||||||
'Republic of Mali' => 'mali',
|
'Republic of Mali' => 'mali',
|
||||||
'Federation of Malaysia' => 'mals',
|
'Federation of Malaysia' => 'mals',
|
||||||
'Republic of Malta' => 'malt',
|
'Republic of Malta' => 'malt',
|
||||||
'Republic of Malawi' => 'malw',
|
'Republic of Malawi' => 'malw',
|
||||||
'Overseas Department of Martinique' => 'mart',
|
'Overseas Department of Martinique' => 'mart',
|
||||||
'Islamic Republic of Mauritania' => 'maur',
|
'Islamic Republic of Mauritania' => 'maur',
|
||||||
'Territorial Collectivity of Mayotte' => 'mayt',
|
'Territorial Collectivity of Mayotte' => 'mayt',
|
||||||
'United Mexican States' => 'mexc',
|
'United Mexican States' => 'mexc',
|
||||||
'Federated States of Micronesia' => 'micr',
|
'Federated States of Micronesia' => 'micr',
|
||||||
'Midway Islands' => 'miis',
|
'Midway Islands' => 'miis',
|
||||||
'Republic of Moldova' => 'mold',
|
'Republic of Moldova' => 'mold',
|
||||||
'Principality of Monaco' => 'mona',
|
'Principality of Monaco' => 'mona',
|
||||||
'Republic of Mongolia' => 'mong',
|
'Republic of Mongolia' => 'mong',
|
||||||
'British Overseas Territory of Montserrat' => 'mont',
|
'British Overseas Territory of Montserrat' => 'mont',
|
||||||
'Kingdom of Morocco' => 'morc',
|
'Kingdom of Morocco' => 'morc',
|
||||||
'Republic of Mozambique' => 'moza',
|
'Republic of Mozambique' => 'moza',
|
||||||
'Republic of Mauritius' => 'mrts',
|
'Republic of Mauritius' => 'mrts',
|
||||||
'Union of Myanmar' => 'myan',
|
'Union of Myanmar' => 'myan',
|
||||||
'Republic of Namibia' => 'namb',
|
'Republic of Namibia' => 'namb',
|
||||||
'North Atlantic Treaty Organization' => 'nato',
|
'North Atlantic Treaty Organization' => 'nato',
|
||||||
'Republic of Nauru' => 'naur',
|
'Republic of Nauru' => 'naur',
|
||||||
'Turkish Republic of Northern Cyprus' => 'ncyp',
|
'Turkish Republic of Northern Cyprus' => 'ncyp',
|
||||||
'Netherlands Antilles' => 'nean',
|
'Netherlands Antilles' => 'nean',
|
||||||
'Kingdom of Nepal' => 'nepa',
|
'Kingdom of Nepal' => 'nepa',
|
||||||
'Kingdom of the Netherlands' => 'neth',
|
'Kingdom of the Netherlands' => 'neth',
|
||||||
'Territory of Norfolk Island' => 'nfis',
|
'Territory of Norfolk Island' => 'nfis',
|
||||||
'Federal Republic of Nigeria' => 'ngra',
|
'Federal Republic of Nigeria' => 'ngra',
|
||||||
'Republic of Nicaragua' => 'nica',
|
'Republic of Nicaragua' => 'nica',
|
||||||
'Republic of Niger' => 'nigr',
|
'Republic of Niger' => 'nigr',
|
||||||
'Niue' => 'niue',
|
'Niue' => 'niue',
|
||||||
'Commonwealth of the Northern Mariana Islands' => 'nmar',
|
'Commonwealth of the Northern Mariana Islands' => 'nmar',
|
||||||
'Province of Northern Ireland' => 'noir',
|
'Province of Northern Ireland' => 'noir',
|
||||||
'Nordic Council' => 'nord',
|
'Nordic Council' => 'nord',
|
||||||
'Kingdom of Norway' => 'norw',
|
'Kingdom of Norway' => 'norw',
|
||||||
'Territory of New Caledonia and Dependencies' => 'nwca',
|
'Territory of New Caledonia and Dependencies' => 'nwca',
|
||||||
'New Zealand' => 'nwze',
|
'New Zealand' => 'nwze',
|
||||||
'Organization of American States' => 'oast',
|
'Organization of American States' => 'oast',
|
||||||
'Organization of African Unity' => 'oaun',
|
'Organization of African Unity' => 'oaun',
|
||||||
'International Olympic Committee' => 'olym',
|
'International Olympic Committee' => 'olym',
|
||||||
'Sultanate of Oman' => 'oman',
|
'Sultanate of Oman' => 'oman',
|
||||||
'Islamic Republic of Pakistan' => 'paks',
|
'Islamic Republic of Pakistan' => 'paks',
|
||||||
'Republic of Palau' => 'pala',
|
'Republic of Palau' => 'pala',
|
||||||
'Independent State of Papua New Guinea' => 'pang',
|
'Independent State of Papua New Guinea' => 'pang',
|
||||||
'Republic of Paraguay' => 'para',
|
'Republic of Paraguay' => 'para',
|
||||||
'Republic of the Philippines' => 'phil',
|
'Republic of Peru' => 'peru',
|
||||||
'British Overseas Territory of the Pitcairn Islands' => 'piis',
|
'Republic of the Philippines' => 'phil',
|
||||||
'Republic of Poland' => 'pola',
|
'British Overseas Territory of the Pitcairn Islands' => 'piis',
|
||||||
'Republic of Portugal' => 'port',
|
'Republic of Poland' => 'pola',
|
||||||
'Commonwealth of Puerto Rico' => 'purc',
|
'Republic of Portugal' => 'port',
|
||||||
'State of Qatar' => 'qata',
|
'Commonwealth of Puerto Rico' => 'purc',
|
||||||
'Russian Federation' => 'russ',
|
'State of Qatar' => 'qata',
|
||||||
'Republic of Rwanda' => 'rwan',
|
'Russian Federation' => 'russ',
|
||||||
'Kingdom of Saudi Arabia' => 'saar',
|
'Republic of Rwanda' => 'rwan',
|
||||||
'Republic of San Marino' => 'sama',
|
'Kingdom of Saudi Arabia' => 'saar',
|
||||||
'Nordic Sami Conference' => 'sami',
|
'Republic of San Marino' => 'sama',
|
||||||
'Sark' => 'sark',
|
'Nordic Sami Conference' => 'sami',
|
||||||
'Scotland' => 'scot',
|
'Sark' => 'sark',
|
||||||
'Principality of Seborga' => 'sebo',
|
'Scotland' => 'scot',
|
||||||
'Republic of Sierra Leone' => 'sile',
|
'Principality of Seborga' => 'sebo',
|
||||||
'Republic of Singapore' => 'sing',
|
'Republic of Sierra Leone' => 'sile',
|
||||||
'Republic of Korea' => 'skor',
|
'Republic of Singapore' => 'sing',
|
||||||
'Republic of Slovenia' => 'slva',
|
'Republic of Korea' => 'skor',
|
||||||
'Somali Republic' => 'smla',
|
'Republic of Slovenia' => 'slva',
|
||||||
'Republic of Somaliland' => 'smld',
|
'Somali Republic' => 'smla',
|
||||||
'Republic of South Africa' => 'soaf',
|
'Republic of Somaliland' => 'smld',
|
||||||
'Solomon Islands' => 'sois',
|
'Republic of South Africa' => 'soaf',
|
||||||
'Kingdom of Spain' => 'span',
|
'Solomon Islands' => 'sois',
|
||||||
'Secretariat of the Pacific Community' => 'spco',
|
'Kingdom of Spain' => 'span',
|
||||||
'Democratic Socialist Republic of Sri Lanka' => 'srla',
|
'Secretariat of the Pacific Community' => 'spco',
|
||||||
'Saint Lucia' => 'stlu',
|
'Democratic Socialist Republic of Sri Lanka' => 'srla',
|
||||||
'Republic of the Sudan' => 'suda',
|
'Saint Lucia' => 'stlu',
|
||||||
'Republic of Suriname' => 'surn',
|
'Republic of the Sudan' => 'suda',
|
||||||
'Slovak Republic' => 'svka',
|
'Republic of Suriname' => 'surn',
|
||||||
'Kingdom of Sweden' => 'swdn',
|
'Slovak Republic' => 'svka',
|
||||||
'Swiss Confederation' => 'swit',
|
'Kingdom of Sweden' => 'swdn',
|
||||||
'Syrian Arab Republic' => 'syra',
|
'Swiss Confederation' => 'swit',
|
||||||
'Kingdom of Swaziland' => 'szld',
|
'Syrian Arab Republic' => 'syra',
|
||||||
'Republic of China' => 'taiw',
|
'Kingdom of Swaziland' => 'szld',
|
||||||
'Taiwan' => 'taiw',
|
'Republic of China' => 'taiw',
|
||||||
'Republic of Tajikistan' => 'tajk',
|
'Taiwan' => 'taiw',
|
||||||
'United Republic of Tanzania' => 'tanz',
|
'Republic of Tajikistan' => 'tajk',
|
||||||
'Kingdom of Thailand' => 'thal',
|
'United Republic of Tanzania' => 'tanz',
|
||||||
'Autonomous Region of Tibet' => 'tibe',
|
'Kingdom of Thailand' => 'thal',
|
||||||
'Turkmenistan' => 'tkst',
|
'Autonomous Region of Tibet' => 'tibe',
|
||||||
'Togolese Republic' => 'togo',
|
'Turkmenistan' => 'tkst',
|
||||||
'Tokelau' => 'toke',
|
'Togolese Republic' => 'togo',
|
||||||
'Kingdom of Tonga' => 'tong',
|
'Tokelau' => 'toke',
|
||||||
'Tristan da Cunha' => 'trdc',
|
'Kingdom of Tonga' => 'tong',
|
||||||
'Tromelin' => 'tris',
|
'Tristan da Cunha' => 'trdc',
|
||||||
'Republic of Tunisia' => 'tuns',
|
'Tromelin' => 'tris',
|
||||||
'Republic of Turkey' => 'turk',
|
'Republic of Tunisia' => 'tuns',
|
||||||
'Tuvalu' => 'tuva',
|
'Republic of Turkey' => 'turk',
|
||||||
'United Arab Emirates' => 'uaem',
|
'Tuvalu' => 'tuva',
|
||||||
'Republic of Uganda' => 'ugan',
|
'United Arab Emirates' => 'uaem',
|
||||||
'Ukraine' => 'ukrn',
|
'Republic of Uganda' => 'ugan',
|
||||||
'United Kingdom of Great Britain' => 'unkg',
|
'Ukraine' => 'ukrn',
|
||||||
'United Nations' => 'unna',
|
'United Kingdom of Great Britain' => 'unkg',
|
||||||
'United States of America' => 'unst',
|
'United Nations' => 'unna',
|
||||||
'Oriental Republic of Uruguay' => 'urgy',
|
'United States of America' => 'unst',
|
||||||
'Virgin Islands of the United States' => 'usvs',
|
'Oriental Republic of Uruguay' => 'urgy',
|
||||||
'Republic of Uzbekistan' => 'uzbk',
|
'Virgin Islands of the United States' => 'usvs',
|
||||||
'State of the Vatican City' => 'vacy',
|
'Republic of Uzbekistan' => 'uzbk',
|
||||||
'Republic of Vanuatu' => 'vant',
|
'State of the Vatican City' => 'vacy',
|
||||||
'Bolivarian Republic of Venezuela' => 'venz',
|
'Republic of Vanuatu' => 'vant',
|
||||||
'Republic of Yemen' => 'yemn',
|
'Bolivarian Republic of Venezuela' => 'venz',
|
||||||
'Democratic Republic of Congo' => 'zare',
|
'Republic of Yemen' => 'yemn',
|
||||||
'Republic of Zimbabwe' => 'zbwe' ) ;
|
'Democratic Republic of Congo' => 'zare',
|
||||||
|
'Republic of Zimbabwe' => 'zbwe' ) ;
|
||||||
|
|
||||||
var $iFlagCount = -1;
|
|
||||||
var $iFlagSetMap = array(
|
private $iFlagCount = -1;
|
||||||
FLAGSIZE1 => 'flags_thumb35x35',
|
private $iFlagSetMap = array(
|
||||||
FLAGSIZE2 => 'flags_thumb60x60',
|
FLAGSIZE1 => 'flags_thumb35x35',
|
||||||
FLAGSIZE3 => 'flags_thumb100x100',
|
FLAGSIZE2 => 'flags_thumb60x60',
|
||||||
FLAGSIZE4 => 'flags'
|
FLAGSIZE3 => 'flags_thumb100x100',
|
||||||
);
|
FLAGSIZE4 => 'flags'
|
||||||
|
);
|
||||||
var $iFlagData ;
|
|
||||||
var $iOrdIdx=array();
|
private $iFlagData ;
|
||||||
|
private $iOrdIdx=array();
|
||||||
function FlagImages($aSize=FLAGSIZE1) {
|
|
||||||
switch($aSize) {
|
function FlagImages($aSize=FLAGSIZE1) {
|
||||||
case FLAGSIZE1 :
|
switch($aSize) {
|
||||||
case FLAGSIZE2 :
|
case FLAGSIZE1 :
|
||||||
case FLAGSIZE3 :
|
case FLAGSIZE2 :
|
||||||
case FLAGSIZE4 :
|
case FLAGSIZE3 :
|
||||||
$file = dirname(__FILE__).'/'.$this->iFlagSetMap[$aSize].'.dat';
|
case FLAGSIZE4 :
|
||||||
$fp = fopen($file,'rb');
|
$file = dirname(__FILE__).'/'.$this->iFlagSetMap[$aSize].'.dat';
|
||||||
$rawdata = fread($fp,filesize($file));
|
$fp = fopen($file,'rb');
|
||||||
$this->iFlagData = unserialize($rawdata);
|
$rawdata = fread($fp,filesize($file));
|
||||||
break;
|
$this->iFlagData = unserialize($rawdata);
|
||||||
default:
|
break;
|
||||||
JpGraphError::Raise('Unknown flag size. ('.$aSize.')');
|
default:
|
||||||
die();
|
JpGraphError::RaiseL(5001,$aSize);
|
||||||
}
|
//('Unknown flag size. ('.$aSize.')');
|
||||||
$this->iFlagCount = count($this->iCountryNameMap);
|
}
|
||||||
}
|
$this->iFlagCount = count($this->iCountryNameMap);
|
||||||
|
}
|
||||||
function GetNum() {
|
|
||||||
return $this->iFlagCount;
|
function GetNum() {
|
||||||
}
|
return $this->iFlagCount;
|
||||||
|
}
|
||||||
function GetImgByName($aName,&$outFullName) {
|
|
||||||
$idx = $this->GetIdxByName($aName,$outFullName);
|
function GetImgByName($aName,&$outFullName) {
|
||||||
return $this->GetImgByIdx($idx);
|
$idx = $this->GetIdxByName($aName,$outFullName);
|
||||||
}
|
return $this->GetImgByIdx($idx);
|
||||||
|
}
|
||||||
function GetImgByIdx($aIdx) {
|
|
||||||
if( array_key_exists($aIdx,$this->iFlagData) ) {
|
function GetImgByIdx($aIdx) {
|
||||||
$d = $this->iFlagData[$aIdx][1];
|
if( array_key_exists($aIdx,$this->iFlagData) ) {
|
||||||
return Image::CreateFromString($d);
|
$d = $this->iFlagData[$aIdx][1];
|
||||||
}
|
return Image::CreateFromString($d);
|
||||||
else {
|
}
|
||||||
JpGraphError::Raise("Flag index \" $aIdx\" does not exist.");
|
else {
|
||||||
}
|
JpGraphError::RaiseL(5002,$aIdx);
|
||||||
}
|
//("Flag index \" $aIdx\" does not exist.");
|
||||||
|
}
|
||||||
function GetIdxByOrdinal($aOrd,&$outFullName) {
|
}
|
||||||
$aOrd--;
|
|
||||||
$n = count($this->iOrdIdx);
|
function GetIdxByOrdinal($aOrd,&$outFullName) {
|
||||||
if( $n == 0 ) {
|
$aOrd--;
|
||||||
reset($this->iCountryNameMap);
|
$n = count($this->iOrdIdx);
|
||||||
$this->iOrdIdx=array();
|
if( $n == 0 ) {
|
||||||
$i=0;
|
reset($this->iCountryNameMap);
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
$this->iOrdIdx=array();
|
||||||
$this->iOrdIdx[$i++] = array($val,$key);
|
$i=0;
|
||||||
}
|
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
||||||
$tmp=$this->iOrdIdx[$aOrd];
|
$this->iOrdIdx[$i++] = array($val,$key);
|
||||||
$outFullName = $tmp[1];
|
}
|
||||||
return $tmp[0];
|
$tmp=$this->iOrdIdx[$aOrd];
|
||||||
|
$outFullName = $tmp[1];
|
||||||
}
|
return $tmp[0];
|
||||||
elseif( $aOrd >= 0 && $aOrd < $n ) {
|
|
||||||
$tmp=$this->iOrdIdx[$aOrd];
|
}
|
||||||
$outFullName = $tmp[1];
|
elseif( $aOrd >= 0 && $aOrd < $n ) {
|
||||||
return $tmp[0];
|
$tmp=$this->iOrdIdx[$aOrd];
|
||||||
}
|
$outFullName = $tmp[1];
|
||||||
else {
|
return $tmp[0];
|
||||||
JpGraphError::Raise('Invalid ordinal number specified for flag index.');
|
}
|
||||||
}
|
else {
|
||||||
}
|
JpGraphError::RaiseL(5003,$aOrd);
|
||||||
|
//('Invalid ordinal number specified for flag index.');
|
||||||
function GetIdxByName($aName,&$outFullName) {
|
}
|
||||||
|
}
|
||||||
if( is_integer($aName) ) {
|
|
||||||
$idx = $this->GetIdxByOrdinal($aName,$outFullName);
|
function GetIdxByName($aName,&$outFullName) {
|
||||||
return $idx;
|
|
||||||
}
|
if( is_integer($aName) ) {
|
||||||
|
$idx = $this->GetIdxByOrdinal($aName,$outFullName);
|
||||||
$found=false;
|
return $idx;
|
||||||
$aName = strtolower($aName);
|
}
|
||||||
$nlen = strlen($aName);
|
|
||||||
reset($this->iCountryNameMap);
|
$found=false;
|
||||||
// Start by trying to match exact index name
|
$aName = strtolower($aName);
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
$nlen = strlen($aName);
|
||||||
if( $nlen == strlen($val) && $val == $aName ) {
|
reset($this->iCountryNameMap);
|
||||||
$found=true;
|
// Start by trying to match exact index name
|
||||||
break;
|
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
||||||
}
|
if( $nlen == strlen($val) && $val == $aName ) {
|
||||||
}
|
$found=true;
|
||||||
if( !$found ) {
|
break;
|
||||||
reset($this->iCountryNameMap);
|
}
|
||||||
// If the exact index doesn't work try a (partial) full name
|
}
|
||||||
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
if( !$found ) {
|
||||||
if( strpos(strtolower($key), $aName) !== false ) {
|
reset($this->iCountryNameMap);
|
||||||
$found=true;
|
// If the exact index doesn't work try a (partial) full name
|
||||||
break;
|
while( list($key,$val) = each($this->iCountryNameMap) ) {
|
||||||
}
|
if( strpos(strtolower($key), $aName) !== false ) {
|
||||||
}
|
$found=true;
|
||||||
}
|
break;
|
||||||
if( $found ) {
|
}
|
||||||
$outFullName = $key;
|
}
|
||||||
return $val;
|
}
|
||||||
}
|
if( $found ) {
|
||||||
else {
|
$outFullName = $key;
|
||||||
JpGraphError::Raise("The (partial) country name \"$aName\" does not have a cooresponding flag image. The flag may still exist but under another name, e.g. insted of \"usa\" try \"united states\".");
|
return $val;
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
}
|
JpGraphError::RaiseL(5004,$aName);
|
||||||
|
//("The (partial) country name \"$aName\" does not have a cooresponding flag image. The flag may still exist but under another name, e.g. insted of \"usa\" try \"united states\".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,376 +1,424 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_GRADIENT.PHP
|
// File: JPGRAPH_GRADIENT.PHP
|
||||||
// Description: Create a color gradient
|
// Description: Create a color gradient
|
||||||
// Created: 2003-02-01
|
// Created: 2003-02-01
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_gradient.php 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: jpgraph_gradient.php 630 2006-05-26 00:09:30Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Styles for gradient color fill
|
// Styles for gradient color fill
|
||||||
DEFINE("GRAD_VER",1);
|
DEFINE("GRAD_VER",1);
|
||||||
DEFINE("GRAD_VERT",1);
|
DEFINE("GRAD_VERT",1);
|
||||||
DEFINE("GRAD_HOR",2);
|
DEFINE("GRAD_HOR",2);
|
||||||
DEFINE("GRAD_MIDHOR",3);
|
DEFINE("GRAD_MIDHOR",3);
|
||||||
DEFINE("GRAD_MIDVER",4);
|
DEFINE("GRAD_MIDVER",4);
|
||||||
DEFINE("GRAD_CENTER",5);
|
DEFINE("GRAD_CENTER",5);
|
||||||
DEFINE("GRAD_WIDE_MIDVER",6);
|
DEFINE("GRAD_WIDE_MIDVER",6);
|
||||||
DEFINE("GRAD_WIDE_MIDHOR",7);
|
DEFINE("GRAD_WIDE_MIDHOR",7);
|
||||||
DEFINE("GRAD_LEFT_REFLECTION",8);
|
DEFINE("GRAD_LEFT_REFLECTION",8);
|
||||||
DEFINE("GRAD_RIGHT_REFLECTION",9);
|
DEFINE("GRAD_RIGHT_REFLECTION",9);
|
||||||
DEFINE("GRAD_RAISED_PANEL",10);
|
DEFINE("GRAD_RAISED_PANEL",10);
|
||||||
|
DEFINE("GRAD_DIAGONAL",11);
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS Gradient
|
// CLASS Gradient
|
||||||
// Description: Handles gradient fills. This is to be
|
// Description: Handles gradient fills. This is to be
|
||||||
// considered a "friend" class of Class Image.
|
// considered a "friend" class of Class Image.
|
||||||
//===================================================
|
//===================================================
|
||||||
class Gradient {
|
class Gradient {
|
||||||
var $img=null;
|
private $img=null, $numcolors=100;
|
||||||
var $numcolors=100;
|
//---------------
|
||||||
//---------------
|
// CONSTRUCTOR
|
||||||
// CONSTRUCTOR
|
function Gradient(&$img) {
|
||||||
function Gradient(&$img) {
|
$this->img = $img;
|
||||||
$this->img = $img;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
function SetNumColors($aNum) {
|
||||||
function SetNumColors($aNum) {
|
$this->numcolors=$aNum;
|
||||||
$this->numcolors=$aNum;
|
}
|
||||||
}
|
//---------------
|
||||||
//---------------
|
// PUBLIC METHODS
|
||||||
// PUBLIC METHODS
|
// Produce a gradient filled rectangle with a smooth transition between
|
||||||
// Produce a gradient filled rectangle with a smooth transition between
|
// two colors.
|
||||||
// two colors.
|
// ($xl,$yt) Top left corner
|
||||||
// ($xl,$yt) Top left corner
|
// ($xr,$yb) Bottom right
|
||||||
// ($xr,$yb) Bottom right
|
// $from_color Starting color in gradient
|
||||||
// $from_color Starting color in gradient
|
// $to_color End color in the gradient
|
||||||
// $to_color End color in the gradient
|
// $style Which way is the gradient oriented?
|
||||||
// $style Which way is the gradient oriented?
|
function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) {
|
||||||
function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) {
|
switch( $style ) {
|
||||||
switch( $style ) {
|
case GRAD_VER:
|
||||||
case GRAD_VER:
|
$steps = round(abs($xr-$xl));
|
||||||
$steps = round(abs($xr-$xl));
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
for( $i=0, $x=$xl; $i < $steps; ++$i ) {
|
||||||
for( $i=0, $x=$xl; $i < $steps; ++$i ) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yt,$x,$yb);
|
||||||
$this->img->Line($x,$yt,$x,$yb);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_HOR:
|
||||||
case GRAD_HOR:
|
$steps = round(abs($yb-$yt));
|
||||||
$steps = round(abs($yb-$yt));
|
$delta = $yb>=$yt ? 1 : -1;
|
||||||
$delta = $yb>=$yt ? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
for($i=0,$y=$yt; $i < $steps; ++$i) {
|
||||||
for($i=0,$y=$yt; $i < $steps; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_MIDHOR:
|
||||||
case GRAD_MIDHOR:
|
$steps = round(abs($yb-$yt)/2);
|
||||||
$steps = round(abs($yb-$yt)/2);
|
$delta = $yb >= $yt ? 1 : -1;
|
||||||
$delta = $yb >= $yt ? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
for($y=$yt, $i=0; $i < $steps; ++$i) {
|
||||||
for($y=$yt, $i=0; $i < $steps; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
--$i;
|
||||||
--$i;
|
if( abs($yb-$yt) % 2 == 1 ) --$steps;
|
||||||
if( abs($yb-$yt) % 2 == 1 ) --$steps;
|
for($j=0; $j < $steps; ++$j, --$i) {
|
||||||
for($j=0; $j < $steps; ++$j, --$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_MIDVER:
|
||||||
case GRAD_MIDVER:
|
$steps = round(abs($xr-$xl)/2);
|
||||||
$steps = round(abs($xr-$xl)/2);
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
for($x=$xl, $i=0; $i < $steps; ++$i) {
|
||||||
for($x=$xl, $i=0; $i < $steps; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
--$i;
|
||||||
--$i;
|
if( abs($xr-$xl) % 2 == 1 ) --$steps;
|
||||||
if( abs($xr-$xl) % 2 == 1 ) --$steps;
|
for($j=0; $j < $steps; ++$j, --$i) {
|
||||||
for($j=0; $j < $steps; ++$j, --$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_WIDE_MIDVER:
|
||||||
case GRAD_WIDE_MIDVER:
|
$diff = round(abs($xr-$xl));
|
||||||
$diff = round(abs($xr-$xl));
|
$steps = floor(abs($diff)/3);
|
||||||
$steps = floor(abs($diff)/3);
|
$firststep = $diff - 2*$steps ;
|
||||||
$firststep = $diff - 2*$steps ;
|
$delta = $xr >= $xl ? 1 : -1;
|
||||||
$delta = $xr >= $xl ? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
for($x=$xl, $i=0; $i < $firststep; ++$i) {
|
||||||
for($x=$xl, $i=0; $i < $firststep; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
--$i;
|
||||||
--$i;
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
for($j=0; $j< $steps; ++$j) {
|
||||||
for($j=0; $j< $steps; ++$j) {
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
|
||||||
|
for($j=0; $j < $steps; ++$j, --$i) {
|
||||||
for($j=0; $j < $steps; ++$j, --$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_WIDE_MIDHOR:
|
||||||
case GRAD_WIDE_MIDHOR:
|
$diff = round(abs($yb-$yt));
|
||||||
$diff = round(abs($yb-$yt));
|
$steps = floor(abs($diff)/3);
|
||||||
$steps = floor(abs($diff)/3);
|
$firststep = $diff - 2*$steps ;
|
||||||
$firststep = $diff - 2*$steps ;
|
$delta = $yb >= $yt? 1 : -1;
|
||||||
$delta = $yb >= $yt? 1 : -1;
|
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
for($y=$yt, $i=0; $i < $firststep; ++$i) {
|
||||||
for($y=$yt, $i=0; $i < $firststep; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
--$i;
|
||||||
--$i;
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
for($j=0; $j < $steps; ++$j) {
|
||||||
for($j=0; $j < $steps; ++$j) {
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
for($j=0; $j < $steps; ++$j, --$i) {
|
||||||
for($j=0; $j < $steps; ++$j, --$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($xl,$y,$xr,$y);
|
||||||
$this->img->Line($xl,$y,$xr,$y);
|
$y += $delta;
|
||||||
$y += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_LEFT_REFLECTION:
|
||||||
case GRAD_LEFT_REFLECTION:
|
$steps1 = round(0.3*abs($xr-$xl));
|
||||||
$steps1 = round(0.3*abs($xr-$xl));
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
|
||||||
|
$from_color = $this->img->rgb->Color($from_color);
|
||||||
$from_color = $this->img->rgb->Color($from_color);
|
$adj = 1.4;
|
||||||
$adj = 1.4;
|
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
$from_color2 = array(min(255,$from_color[0]+$m),
|
||||||
$from_color2 = array(min(255,$from_color[0]+$m),
|
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
|
||||||
|
$this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors);
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
||||||
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
$this->img->SetColor($to_color);
|
||||||
$this->img->SetColor($to_color);
|
for($j=0; $j< $steps2; ++$j) {
|
||||||
for($j=0; $j< $steps2; ++$j) {
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_RIGHT_REFLECTION:
|
||||||
case GRAD_RIGHT_REFLECTION:
|
$steps1 = round(0.7*abs($xr-$xl));
|
||||||
$steps1 = round(0.7*abs($xr-$xl));
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
|
||||||
|
$this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors);
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
||||||
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
$this->img->SetColor($to_color);
|
||||||
$this->img->SetColor($to_color);
|
for($j=0; $j< $steps2; ++$j) {
|
||||||
for($j=0; $j< $steps2; ++$j) {
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
|
||||||
|
$from_color = $this->img->rgb->Color($from_color);
|
||||||
$from_color = $this->img->rgb->Color($from_color);
|
$adj = 1.4;
|
||||||
$adj = 1.4;
|
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
$from_color = array(min(255,$from_color[0]+$m),
|
||||||
$from_color = array(min(255,$from_color[0]+$m),
|
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
|
||||||
|
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_CENTER:
|
||||||
case GRAD_CENTER:
|
$steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2);
|
||||||
$steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2);
|
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
$dx = ($xr-$xl)/2;
|
||||||
$dx = ($xr-$xl)/2;
|
$dy = ($yb-$yt)/2;
|
||||||
$dy = ($yb-$yt)/2;
|
$x=$xl;$y=$yt;$x2=$xr;$y2=$yb;
|
||||||
$x=$xl;$y=$yt;$x2=$xr;$y2=$yb;
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) {
|
||||||
for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Rectangle($x,$y,$x2,$y2);
|
||||||
$this->img->Rectangle($x,$y,$x2,$y2);
|
}
|
||||||
}
|
$this->img->Line($x,$y,$x2,$y2);
|
||||||
$this->img->Line($x,$y,$x2,$y2);
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_RAISED_PANEL:
|
||||||
case GRAD_RAISED_PANEL:
|
// right to left
|
||||||
// right to left
|
$steps1 = $xr-$xl;
|
||||||
$steps1 = $xr-$xl;
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
$this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors);
|
||||||
$this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors);
|
$n = count($colors);
|
||||||
$n = count($colors);
|
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
$this->img->current_color = $colors[$i];
|
||||||
$this->img->current_color = $colors[$i];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
|
||||||
|
// left to right
|
||||||
// left to right
|
$xr -= 3;
|
||||||
$xr -= 3;
|
$xl += 3;
|
||||||
$xl += 3;
|
$yb -= 3;
|
||||||
$yb -= 3;
|
$yt += 3;
|
||||||
$yt += 3;
|
$steps2 = $xr-$xl;
|
||||||
$steps2 = $xr-$xl;
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
$delta = $xr>=$xl ? 1 : -1;
|
for($x=$xl, $j=$steps2; $j >= 0; --$j) {
|
||||||
for($x=$xl, $j=$steps2; $j >= 0; --$j) {
|
$this->img->current_color = $colors[$j];
|
||||||
$this->img->current_color = $colors[$j];
|
$this->img->Line($x,$yb,$x,$yt);
|
||||||
$this->img->Line($x,$yb,$x,$yt);
|
$x += $delta;
|
||||||
$x += $delta;
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
|
case GRAD_DIAGONAL:
|
||||||
default:
|
// use the longer dimension to determine the required number of steps.
|
||||||
JpGraphError::Raise("Unknown gradient style (=$style).");
|
// first loop draws from one corner to the mid-diagonal and the second
|
||||||
break;
|
// loop draws from the mid-diagonal to the opposing corner.
|
||||||
}
|
if($xr-$xl > $yb - $yt) {
|
||||||
}
|
// width is greater than height -> use x-dimension for steps
|
||||||
|
$steps = $xr-$xl;
|
||||||
// Fill a special case of a polygon with a flat bottom
|
$delta = $xr>=$xl ? 1 : -1;
|
||||||
// with a gradient. Can be used for filled line plots.
|
$this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors);
|
||||||
// Please note that this is NOT a generic gradient polygon fill
|
$n = count($colors);
|
||||||
// routine. It assumes that the bottom is flat (like a drawing
|
|
||||||
// of a mountain)
|
for($x=$xl, $i=0; $i < $steps && $i < $n; ++$i) {
|
||||||
function FilledFlatPolygon($pts,$from_color,$to_color) {
|
$this->img->current_color = $colors[$i];
|
||||||
if( count($pts) == 0 ) return;
|
$y = $yt+($i/$steps)*($yb-$yt)*$delta;
|
||||||
|
$this->img->Line($x,$yt,$xl,$y);
|
||||||
$maxy=$pts[1];
|
$x += $delta;
|
||||||
$miny=$pts[1];
|
}
|
||||||
$n = count($pts) ;
|
|
||||||
for( $i=0, $idx=0; $i < $n; $i += 2) {
|
for($x=$xl, $i = 0; $i < $steps && $i < $n; ++$i) {
|
||||||
$x = round($pts[$i]);
|
$this->img->current_color = $colors[$steps+$i];
|
||||||
$y = round($pts[$i+1]);
|
$y = $yt+($i/$steps)*($yb-$yt)*$delta;
|
||||||
$miny = min($miny,$y);
|
$this->img->Line($x,$yb,$xr,$y);
|
||||||
$maxy = max($maxy,$y);
|
$x += $delta;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
$colors = array();
|
// height is greater than width -> use y-dimension for steps
|
||||||
$this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors);
|
$steps = $yb-$yt;
|
||||||
for($i=$miny, $idx=0; $i <= $maxy; ++$i ) {
|
$delta = $yb>=$yt ? 1 : -1;
|
||||||
$colmap[$i] = $colors[$idx++];
|
$this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors);
|
||||||
}
|
$n = count($colors);
|
||||||
|
|
||||||
$n = count($pts)/2 ;
|
for($y=$yt, $i=0; $i < $steps && $i < $n; ++$i) {
|
||||||
$idx = 0 ;
|
$this->img->current_color = $colors[$i];
|
||||||
while( $idx < $n-1 ) {
|
$x = $xl+($i/$steps)*($xr-$xl)*$delta;
|
||||||
$p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1]));
|
$this->img->Line($x,$yt,$xl,$y);
|
||||||
$p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1]));
|
$y += $delta;
|
||||||
|
}
|
||||||
// Find the largest rectangle we can fill
|
|
||||||
$y = max($p1[1],$p2[1]) ;
|
for($y=$yt, $i = 0; $i < $steps && $i < $n; ++$i) {
|
||||||
for($yy=$maxy; $yy > $y; --$yy) {
|
$this->img->current_color = $colors[$steps+$i];
|
||||||
$this->img->current_color = $colmap[$yy];
|
$x = $xl+($i/$steps)*($xr-$xl)*$delta;
|
||||||
$this->img->Line($p1[0],$yy,$p2[0]-1,$yy);
|
$this->img->Line($x,$yb,$xr,$y);
|
||||||
}
|
$x += $delta;
|
||||||
|
}
|
||||||
if( $p1[1] == $p2[1] ) continue;
|
|
||||||
|
}
|
||||||
// Fill the rest using lines (slow...)
|
break;
|
||||||
$slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]);
|
|
||||||
$x1 = $p1[0];
|
default:
|
||||||
$x2 = $p2[0]; //-1;
|
JpGraphError::RaiseL(7001,$style);
|
||||||
$start = $y;
|
//("Unknown gradient style (=$style).");
|
||||||
if( $p1[1] > $p2[1] ) {
|
break;
|
||||||
while( $y >= $p2[1] ) {
|
}
|
||||||
$x1=$slope*($start-$y)+$p1[0];
|
}
|
||||||
$this->img->current_color = $colmap[$y];
|
|
||||||
$this->img->Line($x1,$y,$x2,$y);
|
// Fill a special case of a polygon with a flat bottom
|
||||||
--$y;
|
// with a gradient. Can be used for filled line plots.
|
||||||
}
|
// Please note that this is NOT a generic gradient polygon fill
|
||||||
}
|
// routine. It assumes that the bottom is flat (like a drawing
|
||||||
else {
|
// of a mountain)
|
||||||
while( $y >= $p1[1] ) {
|
function FilledFlatPolygon($pts,$from_color,$to_color) {
|
||||||
$x2=$p2[0]+$slope*($start-$y);
|
if( count($pts) == 0 ) return;
|
||||||
$this->img->current_color = $colmap[$y];
|
|
||||||
$this->img->Line($x1,$y,$x2,$y);
|
$maxy=$pts[1];
|
||||||
--$y;
|
$miny=$pts[1];
|
||||||
}
|
$n = count($pts) ;
|
||||||
}
|
for( $i=0, $idx=0; $i < $n; $i += 2) {
|
||||||
}
|
$x = round($pts[$i]);
|
||||||
}
|
$y = round($pts[$i+1]);
|
||||||
|
$miny = min($miny,$y);
|
||||||
//---------------
|
$maxy = max($maxy,$y);
|
||||||
// PRIVATE METHODS
|
}
|
||||||
// Add to the image color map the necessary colors to do the transition
|
|
||||||
// between the two colors using $numcolors intermediate colors
|
$colors = array();
|
||||||
function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) {
|
$this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors);
|
||||||
if( $arr_size==0 ) return;
|
for($i=$miny, $idx=0; $i <= $maxy; ++$i ) {
|
||||||
// If color is given as text get it's corresponding r,g,b values
|
$colmap[$i] = $colors[$idx++];
|
||||||
$from_color = $this->img->rgb->Color($from_color);
|
}
|
||||||
$to_color = $this->img->rgb->Color($to_color);
|
|
||||||
|
$n = count($pts)/2 ;
|
||||||
$rdelta=($to_color[0]-$from_color[0])/$numcols;
|
$idx = 0 ;
|
||||||
$gdelta=($to_color[1]-$from_color[1])/$numcols;
|
while( $idx < $n-1 ) {
|
||||||
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
$p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1]));
|
||||||
$colorsperstep = $numcols/$arr_size;
|
$p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1]));
|
||||||
$prevcolnum = -1;
|
|
||||||
$from_alpha = $from_color[3];
|
// Find the largest rectangle we can fill
|
||||||
$to_alpha = $to_color[3];
|
$y = max($p1[1],$p2[1]) ;
|
||||||
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
for($yy=$maxy; $yy > $y; --$yy) {
|
||||||
for ($i=0; $i < $arr_size; ++$i) {
|
$this->img->current_color = $colmap[$yy];
|
||||||
$colnum = floor($colorsperstep*$i);
|
$this->img->Line($p1[0],$yy,$p2[0]-1,$yy);
|
||||||
if ( $colnum == $prevcolnum )
|
}
|
||||||
$colors[$i] = $colidx;
|
|
||||||
else {
|
if( $p1[1] == $p2[1] ) continue;
|
||||||
$r = floor($from_color[0] + $colnum*$rdelta);
|
|
||||||
$g = floor($from_color[1] + $colnum*$gdelta);
|
// Fill the rest using lines (slow...)
|
||||||
$b = floor($from_color[2] + $colnum*$bdelta);
|
$slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]);
|
||||||
$alpha = $from_alpha + $colnum*$adelta;
|
$x1 = $p1[0];
|
||||||
$colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha);
|
$x2 = $p2[0]; //-1;
|
||||||
$colors[$i] = $colidx;
|
$start = $y;
|
||||||
}
|
if( $p1[1] > $p2[1] ) {
|
||||||
$prevcolnum = $colnum;
|
while( $y >= $p2[1] ) {
|
||||||
}
|
$x1=$slope*($start-$y)+$p1[0];
|
||||||
}
|
$this->img->current_color = $colmap[$y];
|
||||||
} // Class
|
$this->img->Line($x1,$y,$x2,$y);
|
||||||
|
--$y;
|
||||||
?>
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while( $y >= $p1[1] ) {
|
||||||
|
$x2=$p2[0]+$slope*($start-$y);
|
||||||
|
$this->img->current_color = $colmap[$y];
|
||||||
|
$this->img->Line($x1,$y,$x2,$y);
|
||||||
|
--$y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------
|
||||||
|
// PRIVATE METHODS
|
||||||
|
// Add to the image color map the necessary colors to do the transition
|
||||||
|
// between the two colors using $numcolors intermediate colors
|
||||||
|
function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) {
|
||||||
|
if( $arr_size==0 ) return;
|
||||||
|
// If color is given as text get it's corresponding r,g,b values
|
||||||
|
$from_color = $this->img->rgb->Color($from_color);
|
||||||
|
$to_color = $this->img->rgb->Color($to_color);
|
||||||
|
|
||||||
|
$rdelta=($to_color[0]-$from_color[0])/$numcols;
|
||||||
|
$gdelta=($to_color[1]-$from_color[1])/$numcols;
|
||||||
|
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
||||||
|
$colorsperstep = $numcols/$arr_size;
|
||||||
|
$prevcolnum = -1;
|
||||||
|
$from_alpha = $from_color[3];
|
||||||
|
$to_alpha = $to_color[3];
|
||||||
|
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
||||||
|
for ($i=0; $i < $arr_size; ++$i) {
|
||||||
|
$colnum = floor($colorsperstep*$i);
|
||||||
|
if ( $colnum == $prevcolnum )
|
||||||
|
$colors[$i] = $colidx;
|
||||||
|
else {
|
||||||
|
$r = floor($from_color[0] + $colnum*$rdelta);
|
||||||
|
$g = floor($from_color[1] + $colnum*$gdelta);
|
||||||
|
$b = floor($from_color[2] + $colnum*$bdelta);
|
||||||
|
$alpha = $from_alpha + $colnum*$adelta;
|
||||||
|
$colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha);
|
||||||
|
$colors[$i] = $colidx;
|
||||||
|
}
|
||||||
|
$prevcolnum = $colnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // Class
|
||||||
|
|
||||||
|
?>
|
||||||
|
@ -1,180 +1,191 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: JPGRAPH_ICONPLOT.PHP
|
// File: JPGRAPH_ICONPLOT.PHP
|
||||||
// Description: PHP4 Graph Plotting library. Extension module.
|
// Description: PHP4 Graph Plotting library. Extension module.
|
||||||
// Created: 2004-02-18
|
// Created: 2004-02-18
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_iconplot.php 184 2005-08-31 16:17:19Z ljp $
|
// Ver: $Id: jpgraph_iconplot.php 575 2006-03-04 11:04:59Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS IconPlot
|
// CLASS IconPlot
|
||||||
// Description: Make it possible to add a (small) image
|
// Description: Make it possible to add a (small) image
|
||||||
// to the graph
|
// to the graph
|
||||||
//===================================================
|
//===================================================
|
||||||
class IconPlot {
|
class IconPlot {
|
||||||
var $iHorAnchor='left',$iVertAnchor='top';
|
public $iX=0,$iY=0,$iScale=1.0,$iMix=100;
|
||||||
var $iX=0,$iY=0;
|
private $iHorAnchor='left',$iVertAnchor='top';
|
||||||
var $iFile='';
|
private $iFile='';
|
||||||
var $iScale=1.0,$iMix=100;
|
private $iAnchors = array('left','right','top','bottom','center');
|
||||||
var $iAnchors = array('left','right','top','bottom','center');
|
private $iCountryFlag='',$iCountryStdSize=3;
|
||||||
var $iCountryFlag='',$iCountryStdSize=3;
|
private $iScalePosY=null,$iScalePosX=null;
|
||||||
var $iScalePosY=null,$iScalePosX=null;
|
private $iImgString='';
|
||||||
var $iImgString='';
|
|
||||||
|
|
||||||
function IconPlot($aFile="",$aX=0,$aY=0,$aScale=1.0,$aMix=100) {
|
function IconPlot($aFile="",$aX=0,$aY=0,$aScale=1.0,$aMix=100) {
|
||||||
$this->iFile = $aFile;
|
$this->iFile = $aFile;
|
||||||
$this->iX=$aX;
|
$this->iX=$aX;
|
||||||
$this->iY=$aY;
|
$this->iY=$aY;
|
||||||
$this->iScale= $aScale;
|
$this->iScale= $aScale;
|
||||||
if( $aMix < 0 || $aMix > 100 ) {
|
if( $aMix < 0 || $aMix > 100 ) {
|
||||||
JpGraphError::Raise('Mix value for icon must be between 0 and 100.');
|
JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.');
|
||||||
}
|
}
|
||||||
$this->iMix = $aMix ;
|
$this->iMix = $aMix ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreateFromString($aStr) {
|
function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) {
|
||||||
$this->iImgString = $aStr;
|
$this->iCountryFlag = $aFlag;
|
||||||
}
|
$this->iX=$aX;
|
||||||
|
$this->iY=$aY;
|
||||||
function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) {
|
$this->iScale= $aScale;
|
||||||
$this->iCountryFlag = $aFlag;
|
if( $aMix < 0 || $aMix > 100 ) {
|
||||||
$this->iX=$aX;
|
JpGraphError::RaiseL(8001);//'Mix value for icon must be between 0 and 100.');
|
||||||
$this->iY=$aY;
|
}
|
||||||
$this->iScale= $aScale;
|
$this->iMix = $aMix;
|
||||||
if( $aMix < 0 || $aMix > 100 ) {
|
$this->iCountryStdSize = $aStdSize;
|
||||||
JpGraphError::Raise('Mix value for icon must be between 0 and 100.');
|
}
|
||||||
}
|
|
||||||
$this->iMix = $aMix;
|
function SetPos($aX,$aY) {
|
||||||
$this->iCountryStdSize = $aStdSize;
|
$this->iX=$aX;
|
||||||
}
|
$this->iY=$aY;
|
||||||
|
}
|
||||||
function SetPos($aX,$aY) {
|
|
||||||
$this->iX=$aX;
|
function CreateFromString($aStr) {
|
||||||
$this->iY=$aY;
|
$this->iImgString = $aStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetScalePos($aX,$aY) {
|
function SetScalePos($aX,$aY) {
|
||||||
$this->iScalePosX = $aX;
|
$this->iScalePosX = $aX;
|
||||||
$this->iScalePosY = $aY;
|
$this->iScalePosY = $aY;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetScale($aScale) {
|
function SetScale($aScale) {
|
||||||
$this->iScale = $aScale;
|
$this->iScale = $aScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetMix($aMix) {
|
function SetMix($aMix) {
|
||||||
if( $aMix < 0 || $aMix > 100 ) {
|
if( $aMix < 0 || $aMix > 100 ) {
|
||||||
JpGraphError::Raise('Mix value for icon must be between 0 and 100.');
|
JpGraphError::RaiseL(8001);//('Mix value for icon must be between 0 and 100.');
|
||||||
}
|
}
|
||||||
$this->iMix = $aMix ;
|
$this->iMix = $aMix ;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetAnchor($aXAnchor='left',$aYAnchor='center') {
|
function SetAnchor($aXAnchor='left',$aYAnchor='center') {
|
||||||
if( !in_array($aXAnchor,$this->iAnchors) ||
|
if( !in_array($aXAnchor,$this->iAnchors) ||
|
||||||
!in_array($aYAnchor,$this->iAnchors) ) {
|
!in_array($aYAnchor,$this->iAnchors) ) {
|
||||||
JpGraphError::Raise("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'");
|
JpGraphError::RaiseL(8002);//("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'");
|
||||||
}
|
}
|
||||||
$this->iHorAnchor=$aXAnchor;
|
$this->iHorAnchor=$aXAnchor;
|
||||||
$this->iVertAnchor=$aYAnchor;
|
$this->iVertAnchor=$aYAnchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
function PreStrokeAdjust($aGraph) {
|
function PreStrokeAdjust($aGraph) {
|
||||||
// Nothing to do ...
|
// Nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
function DoLegend($aGraph) {
|
function DoLegend($aGraph) {
|
||||||
// Nothing to do ...
|
// Nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
function Max() {
|
function Max() {
|
||||||
return array(false,false);
|
return array(false,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// The next four function are framework function tht gets called
|
// The next four function are framework function tht gets called
|
||||||
// from Gantt and is not menaiungfull in the context of Icons but
|
// from Gantt and is not menaiungfull in the context of Icons but
|
||||||
// they must be implemented to avoid errors.
|
// they must be implemented to avoid errors.
|
||||||
function GetMaxDate() { return false; }
|
function GetMaxDate() { return false; }
|
||||||
function GetMinDate() { return false; }
|
function GetMinDate() { return false; }
|
||||||
function GetLineNbr() { return 0; }
|
function GetLineNbr() { return 0; }
|
||||||
function GetAbsHeight() {return 0; }
|
function GetAbsHeight() {return 0; }
|
||||||
|
|
||||||
|
|
||||||
function Min() {
|
function Min() {
|
||||||
return array(false,false);
|
return array(false,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function StrokeMargin(&$aImg) {
|
function StrokeMargin(&$aImg) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stroke($aImg,$axscale,$ayscale) {
|
function Stroke($aImg,$axscale,$ayscale) {
|
||||||
$this->StrokeWithScale($aImg,$axscale,$ayscale);
|
$this->StrokeWithScale($aImg,$axscale,$ayscale);
|
||||||
}
|
}
|
||||||
|
|
||||||
function StrokeWithScale($aImg,$axscale,$ayscale) {
|
function StrokeWithScale($aImg,$axscale,$ayscale) {
|
||||||
if( $this->iScalePosX === null ||
|
if( $this->iScalePosX === null ||
|
||||||
$this->iScalePosY === null ) {
|
$this->iScalePosY === null ) {
|
||||||
$this->_Stroke($aImg);
|
$this->_Stroke($aImg);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->_Stroke($aImg,
|
$this->_Stroke($aImg,
|
||||||
round($axscale->Translate($this->iScalePosX)),
|
round($axscale->Translate($this->iScalePosX)),
|
||||||
round($ayscale->Translate($this->iScalePosY)));
|
round($ayscale->Translate($this->iScalePosY)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetWidthHeight() {
|
||||||
function _Stroke($aImg,$x=null,$y=null) {
|
$dummy=0;
|
||||||
if( $this->iFile != '' && $this->iCountryFlag != '' ) {
|
return $this->_Stroke($dummy,null,null,true);
|
||||||
JpGraphError::Raise('It is not possible to specify both an image file and a country flag for the same icon.');
|
}
|
||||||
}
|
|
||||||
if( $this->iFile != '' ) {
|
function _Stroke($aImg,$x=null,$y=null,$aReturnWidthHeight=false) {
|
||||||
$gdimg = Graph::LoadBkgImage('',$this->iFile);
|
if( $this->iFile != '' && $this->iCountryFlag != '' ) {
|
||||||
}
|
JpGraphError::RaiseL(8003);//('It is not possible to specify both an image file and a country flag for the same icon.');
|
||||||
elseif( $this->iImgString != '') {
|
}
|
||||||
$gdimg = Image::CreateFromString($this->iImgString);
|
if( $this->iFile != '' ) {
|
||||||
}
|
$gdimg = Graph::LoadBkgImage('',$this->iFile);
|
||||||
else {
|
}
|
||||||
if( ! class_exists('FlagImages') ) {
|
elseif( $this->iImgString != '') {
|
||||||
JpGraphError::Raise('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.');
|
$gdimg = Image::CreateFromString($this->iImgString);
|
||||||
}
|
}
|
||||||
$fobj = new FlagImages($this->iCountryStdSize);
|
|
||||||
$dummy='';
|
else {
|
||||||
$gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy);
|
if( ! class_exists('FlagImages',false) ) {
|
||||||
}
|
JpGraphError::RaiseL(8004);//('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.');
|
||||||
if( $x !== null && $y !== null ) {
|
}
|
||||||
$this->iX = $x; $this->iY = $y;
|
$fobj = new FlagImages($this->iCountryStdSize);
|
||||||
}
|
$dummy='';
|
||||||
if( $this->iX >= 0 && $this->iX <= 1.0 ) {
|
$gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy);
|
||||||
$w = imagesx($aImg->img);
|
}
|
||||||
$this->iX = round($w*$this->iX);
|
|
||||||
}
|
$iconw = imagesx($gdimg);
|
||||||
if( $this->iY >= 0 && $this->iY <= 1.0 ) {
|
$iconh = imagesy($gdimg);
|
||||||
$h = imagesy($aImg->img);
|
|
||||||
$this->iY = round($h*$this->iY);
|
if( $aReturnWidthHeight ) {
|
||||||
}
|
return array(round($iconw*$this->iScale),round($iconh*$this->iScale));
|
||||||
$iconw = imagesx($gdimg);
|
}
|
||||||
$iconh = imagesy($gdimg);
|
|
||||||
|
if( $x !== null && $y !== null ) {
|
||||||
if( $this->iHorAnchor == 'center' )
|
$this->iX = $x; $this->iY = $y;
|
||||||
$this->iX -= round($iconw*$this->iScale/2);
|
}
|
||||||
if( $this->iHorAnchor == 'right' )
|
if( $this->iX >= 0 && $this->iX <= 1.0 ) {
|
||||||
$this->iX -= round($iconw*$this->iScale);
|
$w = imagesx($aImg->img);
|
||||||
if( $this->iVertAnchor == 'center' )
|
$this->iX = round($w*$this->iX);
|
||||||
$this->iY -= round($iconh*$this->iScale/2);
|
}
|
||||||
if( $this->iVertAnchor == 'bottom' )
|
if( $this->iY >= 0 && $this->iY <= 1.0 ) {
|
||||||
$this->iY -= round($iconh*$this->iScale);
|
$h = imagesy($aImg->img);
|
||||||
|
$this->iY = round($h*$this->iY);
|
||||||
$aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0,
|
}
|
||||||
round($iconw*$this->iScale),round($iconh*$this->iScale),
|
|
||||||
$iconw,$iconh,
|
if( $this->iHorAnchor == 'center' )
|
||||||
$this->iMix);
|
$this->iX -= round($iconw*$this->iScale/2);
|
||||||
}
|
if( $this->iHorAnchor == 'right' )
|
||||||
}
|
$this->iX -= round($iconw*$this->iScale);
|
||||||
|
if( $this->iVertAnchor == 'center' )
|
||||||
?>
|
$this->iY -= round($iconh*$this->iScale/2);
|
||||||
|
if( $this->iVertAnchor == 'bottom' )
|
||||||
|
$this->iY -= round($iconh*$this->iScale);
|
||||||
|
|
||||||
|
$aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0,
|
||||||
|
round($iconw*$this->iScale),round($iconh*$this->iScale),
|
||||||
|
$iconw,$iconh,
|
||||||
|
$this->iMix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
@ -1,223 +1,224 @@
|
|||||||
<?php
|
<?php
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// File: JPGRAPH_IMGTRANS.PHP
|
// File: JPGRAPH_IMGTRANS.PHP
|
||||||
// Description: Extension for JpGraph to do some simple img transformations
|
// Description: Extension for JpGraph to do some simple img transformations
|
||||||
// Created: 2003-09-06
|
// Created: 2003-09-06
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_imgtrans.php 21 2005-05-30 20:35:34Z ljp $
|
// Ver: $Id: jpgraph_imgtrans.php 478 2006-02-04 12:17:06Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Class ImgTrans
|
// Class ImgTrans
|
||||||
// Perform some simple image transformations.
|
// Perform some simple image transformations.
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
class ImgTrans {
|
class ImgTrans {
|
||||||
var $gdImg=null;
|
private $gdImg=null;
|
||||||
|
|
||||||
function ImgTrans($aGdImg) {
|
function ImgTrans($aGdImg) {
|
||||||
// Constructor
|
// Constructor
|
||||||
$this->gdImg = $aGdImg;
|
$this->gdImg = $aGdImg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||||
// Skew3D().
|
// Skew3D().
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||||
|
|
||||||
|
|
||||||
// Parameter check
|
// Parameter check
|
||||||
if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) {
|
if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) {
|
||||||
JpGraphError::Raise("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1.");
|
JpGraphError::RaiseL(9001);
|
||||||
}
|
//("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1.");
|
||||||
|
}
|
||||||
$w = imagesx($aGdImg);
|
|
||||||
$h = imagesy($aGdImg);
|
$w = imagesx($aGdImg);
|
||||||
|
$h = imagesy($aGdImg);
|
||||||
// Create new image
|
|
||||||
$ww = $w;
|
// Create new image
|
||||||
if( $aMinSize )
|
$ww = $w;
|
||||||
$hh = ceil($h * $aHorizon / ($aSkewDist+$h));
|
if( $aMinSize )
|
||||||
else
|
$hh = ceil($h * $aHorizon / ($aSkewDist+$h));
|
||||||
$hh = $h;
|
else
|
||||||
|
$hh = $h;
|
||||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
|
||||||
$crgb = new RGB( $newgdh );
|
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||||
$fillColor = $crgb->Allocate($aFillColor);
|
$crgb = new RGB( $newgdh );
|
||||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
$fillColor = $crgb->Allocate($aFillColor);
|
||||||
|
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||||
if( $aBorder ) {
|
|
||||||
$colidx = $crgb->Allocate($aBorder);
|
if( $aBorder ) {
|
||||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
$colidx = $crgb->Allocate($aBorder);
|
||||||
}
|
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||||
|
}
|
||||||
$mid = round($w * $aHorizonPos);
|
|
||||||
|
$mid = round($w * $aHorizonPos);
|
||||||
$last=$h;
|
|
||||||
for($y=0; $y < $h; ++$y) {
|
$last=$h;
|
||||||
|
for($y=0; $y < $h; ++$y) {
|
||||||
$yp = $h-$y-1;
|
|
||||||
$yt = floor($yp * $aHorizon / ($aSkewDist + $yp));
|
$yp = $h-$y-1;
|
||||||
|
$yt = floor($yp * $aHorizon / ($aSkewDist + $yp));
|
||||||
if( !$aQuality ) {
|
|
||||||
if( $last <= $yt ) continue ;
|
if( !$aQuality ) {
|
||||||
$last = $yt;
|
if( $last <= $yt ) continue ;
|
||||||
}
|
$last = $yt;
|
||||||
|
}
|
||||||
for($x=0; $x < $w; ++$x) {
|
|
||||||
$xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp);
|
for($x=0; $x < $w; ++$x) {
|
||||||
if( $aDir == SKEW3D_UP )
|
$xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp);
|
||||||
$rgb = imagecolorat($aGdImg,$x,$h-$y-1);
|
if( $aDir == SKEW3D_UP )
|
||||||
else
|
$rgb = imagecolorat($aGdImg,$x,$h-$y-1);
|
||||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
else
|
||||||
$r = ($rgb >> 16) & 0xFF;
|
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||||
$g = ($rgb >> 8) & 0xFF;
|
$r = ($rgb >> 16) & 0xFF;
|
||||||
$b = $rgb & 0xFF;
|
$g = ($rgb >> 8) & 0xFF;
|
||||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
$b = $rgb & 0xFF;
|
||||||
$xt = round($xt+$mid);
|
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||||
if( $aDir == SKEW3D_UP ) {
|
$xt = round($xt+$mid);
|
||||||
$syt = $yt;
|
if( $aDir == SKEW3D_UP ) {
|
||||||
}
|
$syt = $yt;
|
||||||
else {
|
}
|
||||||
$syt = $hh-$yt-1;
|
else {
|
||||||
}
|
$syt = $hh-$yt-1;
|
||||||
|
}
|
||||||
if( !empty($set[$yt]) ) {
|
|
||||||
$nrgb = imagecolorat($newgdh,$xt,$syt);
|
if( !empty($set[$yt]) ) {
|
||||||
$nr = ($nrgb >> 16) & 0xFF;
|
$nrgb = imagecolorat($newgdh,$xt,$syt);
|
||||||
$ng = ($nrgb >> 8) & 0xFF;
|
$nr = ($nrgb >> 16) & 0xFF;
|
||||||
$nb = $nrgb & 0xFF;
|
$ng = ($nrgb >> 8) & 0xFF;
|
||||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
$nb = $nrgb & 0xFF;
|
||||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||||
}
|
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||||
|
}
|
||||||
imagesetpixel($newgdh,$xt,$syt,$colidx);
|
|
||||||
}
|
imagesetpixel($newgdh,$xt,$syt,$colidx);
|
||||||
|
}
|
||||||
$set[$yt] = true;
|
|
||||||
}
|
$set[$yt] = true;
|
||||||
|
}
|
||||||
return $newgdh;
|
|
||||||
}
|
return $newgdh;
|
||||||
|
}
|
||||||
// --------------------------------------------------------------------
|
|
||||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
// --------------------------------------------------------------------
|
||||||
// Skew3D().
|
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||||
// --------------------------------------------------------------------
|
// Skew3D().
|
||||||
function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
// --------------------------------------------------------------------
|
||||||
|
function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||||
$w = imagesx($aGdImg);
|
|
||||||
$h = imagesy($aGdImg);
|
$w = imagesx($aGdImg);
|
||||||
|
$h = imagesy($aGdImg);
|
||||||
// Create new image
|
|
||||||
$hh = $h;
|
// Create new image
|
||||||
if( $aMinSize )
|
$hh = $h;
|
||||||
$ww = ceil($w * $aHorizon / ($aSkewDist+$w));
|
if( $aMinSize )
|
||||||
else
|
$ww = ceil($w * $aHorizon / ($aSkewDist+$w));
|
||||||
$ww = $w;
|
else
|
||||||
|
$ww = $w;
|
||||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
|
||||||
$crgb = new RGB( $newgdh );
|
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||||
$fillColor = $crgb->Allocate($aFillColor);
|
$crgb = new RGB( $newgdh );
|
||||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
$fillColor = $crgb->Allocate($aFillColor);
|
||||||
|
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||||
if( $aBorder ) {
|
|
||||||
$colidx = $crgb->Allocate($aBorder);
|
if( $aBorder ) {
|
||||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
$colidx = $crgb->Allocate($aBorder);
|
||||||
}
|
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||||
|
}
|
||||||
$mid = round($h * $aHorizonPos);
|
|
||||||
|
$mid = round($h * $aHorizonPos);
|
||||||
$last = -1;
|
|
||||||
for($x=0; $x < $w-1; ++$x) {
|
$last = -1;
|
||||||
$xt = floor($x * $aHorizon / ($aSkewDist + $x));
|
for($x=0; $x < $w-1; ++$x) {
|
||||||
if( !$aQuality ) {
|
$xt = floor($x * $aHorizon / ($aSkewDist + $x));
|
||||||
if( $last >= $xt ) continue ;
|
if( !$aQuality ) {
|
||||||
$last = $xt;
|
if( $last >= $xt ) continue ;
|
||||||
}
|
$last = $xt;
|
||||||
|
}
|
||||||
for($y=0; $y < $h; ++$y) {
|
|
||||||
$yp = $h-$y-1;
|
for($y=0; $y < $h; ++$y) {
|
||||||
$yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x);
|
$yp = $h-$y-1;
|
||||||
|
$yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x);
|
||||||
if( $aDir == SKEW3D_RIGHT )
|
|
||||||
$rgb = imagecolorat($aGdImg,$w-$x-1,$y);
|
if( $aDir == SKEW3D_RIGHT )
|
||||||
else
|
$rgb = imagecolorat($aGdImg,$w-$x-1,$y);
|
||||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
else
|
||||||
$r = ($rgb >> 16) & 0xFF;
|
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||||
$g = ($rgb >> 8) & 0xFF;
|
$r = ($rgb >> 16) & 0xFF;
|
||||||
$b = $rgb & 0xFF;
|
$g = ($rgb >> 8) & 0xFF;
|
||||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
$b = $rgb & 0xFF;
|
||||||
$yt = floor($hh-$yt-$mid-1);
|
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||||
if( $aDir == SKEW3D_RIGHT ) {
|
$yt = floor($hh-$yt-$mid-1);
|
||||||
$sxt = $ww-$xt-1;
|
if( $aDir == SKEW3D_RIGHT ) {
|
||||||
}
|
$sxt = $ww-$xt-1;
|
||||||
else
|
}
|
||||||
$sxt = $xt ;
|
else
|
||||||
|
$sxt = $xt ;
|
||||||
if( !empty($set[$xt]) ) {
|
|
||||||
$nrgb = imagecolorat($newgdh,$sxt,$yt);
|
if( !empty($set[$xt]) ) {
|
||||||
$nr = ($nrgb >> 16) & 0xFF;
|
$nrgb = imagecolorat($newgdh,$sxt,$yt);
|
||||||
$ng = ($nrgb >> 8) & 0xFF;
|
$nr = ($nrgb >> 16) & 0xFF;
|
||||||
$nb = $nrgb & 0xFF;
|
$ng = ($nrgb >> 8) & 0xFF;
|
||||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
$nb = $nrgb & 0xFF;
|
||||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||||
}
|
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||||
imagesetpixel($newgdh,$sxt,$yt,$colidx);
|
}
|
||||||
}
|
imagesetpixel($newgdh,$sxt,$yt,$colidx);
|
||||||
|
}
|
||||||
$set[$xt] = true;
|
|
||||||
}
|
$set[$xt] = true;
|
||||||
|
}
|
||||||
return $newgdh;
|
|
||||||
}
|
return $newgdh;
|
||||||
|
}
|
||||||
// --------------------------------------------------------------------
|
|
||||||
// Skew image for the apperance of a 3D effect
|
// --------------------------------------------------------------------
|
||||||
// This transforms an image into a 3D-skewed version
|
// Skew image for the apperance of a 3D effect
|
||||||
// of the image. The transformation is specified by giving the height
|
// This transforms an image into a 3D-skewed version
|
||||||
// of the artificial horizon and specifying a "skew" factor which
|
// of the image. The transformation is specified by giving the height
|
||||||
// is the distance on the horizon line between the point of
|
// of the artificial horizon and specifying a "skew" factor which
|
||||||
// convergence and perspective line.
|
// is the distance on the horizon line between the point of
|
||||||
//
|
// convergence and perspective line.
|
||||||
// The function returns the GD handle of the transformed image
|
//
|
||||||
// leaving the original image untouched.
|
// The function returns the GD handle of the transformed image
|
||||||
//
|
// leaving the original image untouched.
|
||||||
// Parameters:
|
//
|
||||||
// * $aGdImg, GD handle to the image to be transformed
|
// Parameters:
|
||||||
// * $aHorizon, Distance to the horizon
|
// * $aGdImg, GD handle to the image to be transformed
|
||||||
// * $aSkewDist, Distance from the horizon point of convergence
|
// * $aHorizon, Distance to the horizon
|
||||||
// on the horizon line to the perspective points. A larger
|
// * $aSkewDist, Distance from the horizon point of convergence
|
||||||
// value will fore-shorten the image more
|
// on the horizon line to the perspective points. A larger
|
||||||
// * $aDir, parameter specifies type of convergence. This of this
|
// value will fore-shorten the image more
|
||||||
// as the walls in a room you are looking at. This specifies if the
|
// * $aDir, parameter specifies type of convergence. This of this
|
||||||
// image should be applied on the left,right,top or bottom walls.
|
// as the walls in a room you are looking at. This specifies if the
|
||||||
// * $aMinSize, true=make the new image just as big as needed,
|
// image should be applied on the left,right,top or bottom walls.
|
||||||
// false = keep the image the same size as the original image
|
// * $aMinSize, true=make the new image just as big as needed,
|
||||||
// * $aFillColor, Background fill color in the image
|
// false = keep the image the same size as the original image
|
||||||
// * $aHiQuality, true=performa some interpolation that improves
|
// * $aFillColor, Background fill color in the image
|
||||||
// the image quality but at the expense of performace. Enabling
|
// * $aHiQuality, true=performa some interpolation that improves
|
||||||
// high quality will have a dramatic effect on the time it takes
|
// the image quality but at the expense of performace. Enabling
|
||||||
// to transform an image.
|
// high quality will have a dramatic effect on the time it takes
|
||||||
// * $aBorder, if set to anything besides false this will draw a
|
// to transform an image.
|
||||||
// a border of the speciied color around the image
|
// * $aBorder, if set to anything besides false this will draw a
|
||||||
// --------------------------------------------------------------------
|
// a border of the speciied color around the image
|
||||||
function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
// --------------------------------------------------------------------
|
||||||
return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality,
|
function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||||
$aMinSize,$aFillColor,$aBorder);
|
return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality,
|
||||||
}
|
$aMinSize,$aFillColor,$aBorder);
|
||||||
|
}
|
||||||
function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
|
||||||
if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP )
|
function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||||
return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP )
|
||||||
else
|
return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||||
return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
else
|
||||||
|
return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,262 +1,267 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_LOG.PHP
|
// File: JPGRAPH_LOG.PHP
|
||||||
// Description: Log scale plot extension for JpGraph
|
// Description: Log scale plot extension for JpGraph
|
||||||
// Created: 2001-01-08
|
// Created: 2001-01-08
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_log.php 56 2005-06-06 20:14:44Z ljp $
|
// Ver: $Id: jpgraph_log.php 480 2006-02-04 12:17:57Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
DEFINE('LOGLABELS_PLAIN',0);
|
DEFINE('LOGLABELS_PLAIN',0);
|
||||||
DEFINE('LOGLABELS_MAGNITUDE',1);
|
DEFINE('LOGLABELS_MAGNITUDE',1);
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS LogScale
|
// CLASS LogScale
|
||||||
// Description: Logarithmic scale between world and screen
|
// Description: Logarithmic scale between world and screen
|
||||||
//===================================================
|
//===================================================
|
||||||
class LogScale extends LinearScale {
|
class LogScale extends LinearScale {
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
|
|
||||||
// Log scale is specified using the log of min and max
|
// Log scale is specified using the log of min and max
|
||||||
function LogScale($min,$max,$type="y") {
|
function LogScale($min,$max,$type="y") {
|
||||||
$this->LinearScale($min,$max,$type);
|
$this->LinearScale($min,$max,$type);
|
||||||
$this->ticks = new LogTicks();
|
$this->ticks = new LogTicks();
|
||||||
$this->name = 'log';
|
$this->name = 'log';
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------
|
//----------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
|
|
||||||
// Translate between world and screen
|
// Translate between world and screen
|
||||||
function Translate($a) {
|
function Translate($a) {
|
||||||
if( !is_numeric($a) ) {
|
if( !is_numeric($a) ) {
|
||||||
if( $a != '' && $a != '-' && $a != 'x' )
|
if( $a != '' && $a != '-' && $a != 'x' )
|
||||||
JpGraphError::Raise('Your data contains non-numeric values.');
|
JpGraphError::RaiseL(11001);
|
||||||
return 1;
|
//('Your data contains non-numeric values.');
|
||||||
}
|
return 1;
|
||||||
if( $a < 0 ) {
|
}
|
||||||
JpGraphError::Raise("Negative data values can not be used in a log scale.");
|
if( $a < 0 ) {
|
||||||
exit(1);
|
JpGraphError::RaiseL(11002);
|
||||||
}
|
//("Negative data values can not be used in a log scale.");
|
||||||
if( $a==0 ) $a=1;
|
exit(1);
|
||||||
$a=log10($a);
|
}
|
||||||
return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
if( $a==0 ) $a=1;
|
||||||
}
|
$a=log10($a);
|
||||||
|
return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||||
// Relative translate (don't include offset) usefull when we just want
|
}
|
||||||
// to know the relative position (in pixels) on the axis
|
|
||||||
function RelTranslate($a) {
|
// Relative translate (don't include offset) usefull when we just want
|
||||||
if( !is_numeric($a) ) {
|
// to know the relative position (in pixels) on the axis
|
||||||
if( $a != '' && $a != '-' && $a != 'x' )
|
function RelTranslate($a) {
|
||||||
JpGraphError::Raise('Your data contains non-numeric values.');
|
if( !is_numeric($a) ) {
|
||||||
return 1;
|
if( $a != '' && $a != '-' && $a != 'x' )
|
||||||
}
|
JpGraphError::RaiseL(11001);
|
||||||
if( $a==0 ) $a=1;
|
//('Your data contains non-numeric values.');
|
||||||
$a=log10($a);
|
return 1;
|
||||||
return round(($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
}
|
||||||
}
|
if( $a==0 ) $a=1;
|
||||||
|
$a=log10($a);
|
||||||
// Use bcpow() for increased precision
|
return round(($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||||
function GetMinVal() {
|
}
|
||||||
if( function_exists("bcpow") )
|
|
||||||
return round(bcpow(10,$this->scale[0],15),14);
|
// Use bcpow() for increased precision
|
||||||
else
|
function GetMinVal() {
|
||||||
return round(pow(10,$this->scale[0]),14);
|
if( function_exists("bcpow") )
|
||||||
}
|
return round(bcpow(10,$this->scale[0],15),14);
|
||||||
|
else
|
||||||
function GetMaxVal() {
|
return round(pow(10,$this->scale[0]),14);
|
||||||
if( function_exists("bcpow") )
|
}
|
||||||
return round(bcpow(10,$this->scale[1],15),14);
|
|
||||||
else
|
function GetMaxVal() {
|
||||||
return round(pow(10,$this->scale[1]),14);
|
if( function_exists("bcpow") )
|
||||||
}
|
return round(bcpow(10,$this->scale[1],15),14);
|
||||||
|
else
|
||||||
// Logarithmic autoscaling is much simplier since we just
|
return round(pow(10,$this->scale[1]),14);
|
||||||
// set the min and max to logs of the min and max values.
|
}
|
||||||
// Note that for log autoscale the "maxstep" the fourth argument
|
|
||||||
// isn't used. This is just included to give the method the same
|
// Logarithmic autoscaling is much simplier since we just
|
||||||
// signature as the linear counterpart.
|
// set the min and max to logs of the min and max values.
|
||||||
function AutoScale(&$img,$min,$max,$dummy) {
|
// Note that for log autoscale the "maxstep" the fourth argument
|
||||||
if( $min==0 ) $min=1;
|
// isn't used. This is just included to give the method the same
|
||||||
|
// signature as the linear counterpart.
|
||||||
if( $max <= 0 ) {
|
function AutoScale($img,$min,$max,$maxsteps,$majend=true) {
|
||||||
JpGraphError::Raise('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.');
|
if( $min==0 ) $min=1;
|
||||||
}
|
|
||||||
$smin = floor(log10($min));
|
if( $max <= 0 ) {
|
||||||
$smax = ceil(log10($max));
|
JpGraphError::RaiseL(11004);
|
||||||
$this->Update($img,$smin,$smax);
|
//('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.');
|
||||||
}
|
}
|
||||||
//---------------
|
$smin = floor(log10($min));
|
||||||
// PRIVATE METHODS
|
$smax = ceil(log10($max));
|
||||||
} // Class
|
$this->Update($img,$smin,$smax);
|
||||||
|
}
|
||||||
//===================================================
|
//---------------
|
||||||
// CLASS LogTicks
|
// PRIVATE METHODS
|
||||||
// Description:
|
} // Class
|
||||||
//===================================================
|
|
||||||
class LogTicks extends Ticks{
|
//===================================================
|
||||||
var $label_logtype=LOGLABELS_MAGNITUDE;
|
// CLASS LogTicks
|
||||||
//---------------
|
// Description:
|
||||||
// CONSTRUCTOR
|
//===================================================
|
||||||
function LogTicks() {
|
class LogTicks extends Ticks{
|
||||||
}
|
private $label_logtype=LOGLABELS_MAGNITUDE;
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// CONSTRUCTOR
|
||||||
function IsSpecified() {
|
function LogTicks() {
|
||||||
return true;
|
}
|
||||||
}
|
//---------------
|
||||||
|
// PUBLIC METHODS
|
||||||
function SetLabelLogType($aType) {
|
function IsSpecified() {
|
||||||
$this->label_logtype = $aType;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For log scale it's meaningless to speak about a major step
|
function SetLabelLogType($aType) {
|
||||||
// We just return -1 to make the framework happy (specifically
|
$this->label_logtype = $aType;
|
||||||
// StrokeLabels() )
|
}
|
||||||
function GetMajor() {
|
|
||||||
return -1;
|
// For log scale it's meaningless to speak about a major step
|
||||||
}
|
// We just return -1 to make the framework happy (specifically
|
||||||
|
// StrokeLabels() )
|
||||||
function SetTextLabelStart($aStart) {
|
function GetMajor() {
|
||||||
JpGraphError::Raise('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.');
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetXLabelOffset($dummy) {
|
function SetTextLabelStart($aStart) {
|
||||||
// For log scales we dont care about XLabel offset
|
JpGraphError::RaiseL(11005);
|
||||||
}
|
//('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.');
|
||||||
|
}
|
||||||
// Draw ticks on image "img" using scale "scale". The axis absolute
|
|
||||||
// position in the image is specified in pos, i.e. for an x-axis
|
function SetXLabelOffset($dummy) {
|
||||||
// it specifies the absolute y-coord and for Y-ticks it specified the
|
// For log scales we dont care about XLabel offset
|
||||||
// absolute x-position.
|
}
|
||||||
function Stroke(&$img,&$scale,$pos) {
|
|
||||||
$start = $scale->GetMinVal();
|
// Draw ticks on image "img" using scale "scale". The axis absolute
|
||||||
$limit = $scale->GetMaxVal();
|
// position in the image is specified in pos, i.e. for an x-axis
|
||||||
$nextMajor = 10*$start;
|
// it specifies the absolute y-coord and for Y-ticks it specified the
|
||||||
$step = $nextMajor / 10.0;
|
// absolute x-position.
|
||||||
|
function Stroke($img,$scale,$pos) {
|
||||||
|
$start = $scale->GetMinVal();
|
||||||
$img->SetLineWeight($this->weight);
|
$limit = $scale->GetMaxVal();
|
||||||
|
$nextMajor = 10*$start;
|
||||||
if( $scale->type == "y" ) {
|
$step = $nextMajor / 10.0;
|
||||||
// member direction specified if the ticks should be on
|
|
||||||
// left or right side.
|
|
||||||
$a=$pos + $this->direction*$this->GetMinTickAbsSize();
|
$img->SetLineWeight($this->weight);
|
||||||
$a2=$pos + $this->direction*$this->GetMajTickAbsSize();
|
|
||||||
|
if( $scale->type == "y" ) {
|
||||||
$count=1;
|
// member direction specified if the ticks should be on
|
||||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
// left or right side.
|
||||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
$a=$pos + $this->direction*$this->GetMinTickAbsSize();
|
||||||
if( $this->supress_first )
|
$a2=$pos + $this->direction*$this->GetMajTickAbsSize();
|
||||||
$this->maj_ticks_label[0]="";
|
|
||||||
else {
|
$count=1;
|
||||||
if( $this->label_formfunc != '' ) {
|
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||||
$f = $this->label_formfunc;
|
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
if( $this->supress_first )
|
||||||
}
|
$this->maj_ticks_label[0]="";
|
||||||
elseif( $this->label_logtype == LOGLABELS_PLAIN )
|
else {
|
||||||
$this->maj_ticks_label[0]=$start;
|
if( $this->label_formfunc != '' ) {
|
||||||
else
|
$f = $this->label_formfunc;
|
||||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||||
}
|
}
|
||||||
$i=1;
|
elseif( $this->label_logtype == LOGLABELS_PLAIN )
|
||||||
for($y=$start; $y<=$limit; $y+=$step,++$count ) {
|
$this->maj_ticks_label[0]=$start;
|
||||||
$ys=$scale->Translate($y);
|
else
|
||||||
$this->ticks_pos[]=$ys;
|
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||||
$this->ticklabels_pos[]=$ys;
|
}
|
||||||
if( $count % 10 == 0 ) {
|
$i=1;
|
||||||
if( !$this->supress_tickmarks ) {
|
for($y=$start; $y<=$limit; $y+=$step,++$count ) {
|
||||||
if( $this->majcolor!="" ) {
|
$ys=$scale->Translate($y);
|
||||||
$img->PushColor($this->majcolor);
|
$this->ticks_pos[]=$ys;
|
||||||
$img->Line($pos,$ys,$a2,$ys);
|
$this->ticklabels_pos[]=$ys;
|
||||||
$img->PopColor();
|
if( $count % 10 == 0 ) {
|
||||||
}
|
if( !$this->supress_tickmarks ) {
|
||||||
else
|
if( $this->majcolor!="" ) {
|
||||||
$img->Line($pos,$ys,$a2,$ys);
|
$img->PushColor($this->majcolor);
|
||||||
}
|
$img->Line($pos,$ys,$a2,$ys);
|
||||||
|
$img->PopColor();
|
||||||
$this->maj_ticks_pos[$i]=$ys;
|
}
|
||||||
$this->maj_ticklabels_pos[$i]=$ys;
|
else
|
||||||
|
$img->Line($pos,$ys,$a2,$ys);
|
||||||
if( $this->label_formfunc != '' ) {
|
}
|
||||||
$f = $this->label_formfunc;
|
|
||||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
$this->maj_ticks_pos[$i]=$ys;
|
||||||
}
|
$this->maj_ticklabels_pos[$i]=$ys;
|
||||||
elseif( $this->label_logtype == 0 )
|
|
||||||
$this->maj_ticks_label[$i]=$nextMajor;
|
if( $this->label_formfunc != '' ) {
|
||||||
else
|
$f = $this->label_formfunc;
|
||||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||||
++$i;
|
}
|
||||||
$nextMajor *= 10;
|
elseif( $this->label_logtype == 0 )
|
||||||
$step *= 10;
|
$this->maj_ticks_label[$i]=$nextMajor;
|
||||||
$count=1;
|
else
|
||||||
}
|
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||||
else {
|
++$i;
|
||||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
$nextMajor *= 10;
|
||||||
if( $this->mincolor!="" ) $img->PushColor($this->mincolor);
|
$step *= 10;
|
||||||
$img->Line($pos,$ys,$a,$ys);
|
$count=1;
|
||||||
if( $this->mincolor!="" ) $img->PopColor();
|
}
|
||||||
}
|
else {
|
||||||
}
|
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||||
}
|
if( $this->mincolor!="" ) $img->PushColor($this->mincolor);
|
||||||
}
|
$img->Line($pos,$ys,$a,$ys);
|
||||||
else {
|
if( $this->mincolor!="" ) $img->PopColor();
|
||||||
$a=$pos - $this->direction*$this->GetMinTickAbsSize();
|
}
|
||||||
$a2=$pos - $this->direction*$this->GetMajTickAbsSize();
|
}
|
||||||
$count=1;
|
}
|
||||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
}
|
||||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
else {
|
||||||
if( $this->supress_first )
|
$a=$pos - $this->direction*$this->GetMinTickAbsSize();
|
||||||
$this->maj_ticks_label[0]="";
|
$a2=$pos - $this->direction*$this->GetMajTickAbsSize();
|
||||||
else {
|
$count=1;
|
||||||
if( $this->label_formfunc != '' ) {
|
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||||
$f = $this->label_formfunc;
|
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
if( $this->supress_first )
|
||||||
}
|
$this->maj_ticks_label[0]="";
|
||||||
elseif( $this->label_logtype == 0 )
|
else {
|
||||||
$this->maj_ticks_label[0]=$start;
|
if( $this->label_formfunc != '' ) {
|
||||||
else
|
$f = $this->label_formfunc;
|
||||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||||
}
|
}
|
||||||
$i=1;
|
elseif( $this->label_logtype == 0 )
|
||||||
for($x=$start; $x<=$limit; $x+=$step,++$count ) {
|
$this->maj_ticks_label[0]=$start;
|
||||||
$xs=$scale->Translate($x);
|
else
|
||||||
$this->ticks_pos[]=$xs;
|
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||||
$this->ticklabels_pos[]=$xs;
|
}
|
||||||
if( $count % 10 == 0 ) {
|
$i=1;
|
||||||
if( !$this->supress_tickmarks ) {
|
for($x=$start; $x<=$limit; $x+=$step,++$count ) {
|
||||||
$img->Line($xs,$pos,$xs,$a2);
|
$xs=$scale->Translate($x);
|
||||||
}
|
$this->ticks_pos[]=$xs;
|
||||||
$this->maj_ticks_pos[$i]=$xs;
|
$this->ticklabels_pos[]=$xs;
|
||||||
$this->maj_ticklabels_pos[$i]=$xs;
|
if( $count % 10 == 0 ) {
|
||||||
|
if( !$this->supress_tickmarks ) {
|
||||||
if( $this->label_formfunc != '' ) {
|
$img->Line($xs,$pos,$xs,$a2);
|
||||||
$f = $this->label_formfunc;
|
}
|
||||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
$this->maj_ticks_pos[$i]=$xs;
|
||||||
}
|
$this->maj_ticklabels_pos[$i]=$xs;
|
||||||
elseif( $this->label_logtype == 0 )
|
|
||||||
$this->maj_ticks_label[$i]=$nextMajor;
|
if( $this->label_formfunc != '' ) {
|
||||||
else
|
$f = $this->label_formfunc;
|
||||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||||
++$i;
|
}
|
||||||
$nextMajor *= 10;
|
elseif( $this->label_logtype == 0 )
|
||||||
$step *= 10;
|
$this->maj_ticks_label[$i]=$nextMajor;
|
||||||
$count=1;
|
else
|
||||||
}
|
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||||
else {
|
++$i;
|
||||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
$nextMajor *= 10;
|
||||||
$img->Line($xs,$pos,$xs,$a);
|
$step *= 10;
|
||||||
}
|
$count=1;
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
}
|
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||||
return true;
|
$img->Line($xs,$pos,$xs,$a);
|
||||||
}
|
}
|
||||||
} // Class
|
}
|
||||||
/* EOF */
|
}
|
||||||
?>
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} // Class
|
||||||
|
/* EOF */
|
||||||
|
?>
|
||||||
|
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
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,189 +1,203 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_REGSTAT.PHP
|
// File: JPGRAPH_REGSTAT.PHP
|
||||||
// Description: Regression and statistical analysis helper classes
|
// Description: Regression and statistical analysis helper classes
|
||||||
// Created: 2002-12-01
|
// Created: 2002-12-01
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_regstat.php 327 2005-12-10 08:24:50Z ljp $
|
// Ver: $Id: jpgraph_regstat.php 614 2006-04-19 19:36:32Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// CLASS Spline
|
// CLASS Spline
|
||||||
// Create a new data array from an existing data array but with more points.
|
// Create a new data array from an existing data array but with more points.
|
||||||
// The new points are interpolated using a cubic spline algorithm
|
// The new points are interpolated using a cubic spline algorithm
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
class Spline {
|
class Spline {
|
||||||
// 3:rd degree polynom approximation
|
// 3:rd degree polynom approximation
|
||||||
|
|
||||||
var $xdata,$ydata; // Data vectors
|
private $xdata,$ydata; // Data vectors
|
||||||
var $y2; // 2:nd derivate of ydata
|
private $y2; // 2:nd derivate of ydata
|
||||||
var $n=0;
|
private $n=0;
|
||||||
|
|
||||||
function Spline($xdata,$ydata) {
|
function Spline($xdata,$ydata) {
|
||||||
$this->y2 = array();
|
$this->y2 = array();
|
||||||
$this->xdata = $xdata;
|
$this->xdata = $xdata;
|
||||||
$this->ydata = $ydata;
|
$this->ydata = $ydata;
|
||||||
|
|
||||||
$n = count($ydata);
|
$n = count($ydata);
|
||||||
$this->n = $n;
|
$this->n = $n;
|
||||||
|
if( $this->n !== count($xdata) ) {
|
||||||
// Natural spline 2:derivate == 0 at endpoints
|
JpGraphError::RaiseL(19001);
|
||||||
$this->y2[0] = 0.0;
|
//('Spline: Number of X and Y coordinates must be the same');
|
||||||
$this->y2[$n-1] = 0.0;
|
}
|
||||||
$delta[0] = 0.0;
|
|
||||||
|
// Natural spline 2:derivate == 0 at endpoints
|
||||||
// Calculate 2:nd derivate
|
$this->y2[0] = 0.0;
|
||||||
for($i=1; $i < $n-1; ++$i) {
|
$this->y2[$n-1] = 0.0;
|
||||||
$d = ($xdata[$i+1]-$xdata[$i-1]);
|
$delta[0] = 0.0;
|
||||||
if( $d == 0 ) {
|
|
||||||
JpGraphError::Raise('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.');
|
// Calculate 2:nd derivate
|
||||||
}
|
for($i=1; $i < $n-1; ++$i) {
|
||||||
$s = ($xdata[$i]-$xdata[$i-1])/$d;
|
$d = ($xdata[$i+1]-$xdata[$i-1]);
|
||||||
$p = $s*$this->y2[$i-1]+2.0;
|
if( $d == 0 ) {
|
||||||
$this->y2[$i] = ($s-1.0)/$p;
|
JpGraphError::RaiseL(19002);
|
||||||
$delta[$i] = ($ydata[$i+1]-$ydata[$i])/($xdata[$i+1]-$xdata[$i]) -
|
//('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.');
|
||||||
($ydata[$i]-$ydata[$i-1])/($xdata[$i]-$xdata[$i-1]);
|
}
|
||||||
$delta[$i] = (6.0*$delta[$i]/($xdata[$i+1]-$xdata[$i-1])-$s*$delta[$i-1])/$p;
|
$s = ($xdata[$i]-$xdata[$i-1])/$d;
|
||||||
}
|
$p = $s*$this->y2[$i-1]+2.0;
|
||||||
|
$this->y2[$i] = ($s-1.0)/$p;
|
||||||
// Backward substitution
|
$delta[$i] = ($ydata[$i+1]-$ydata[$i])/($xdata[$i+1]-$xdata[$i]) -
|
||||||
for( $j=$n-2; $j >= 0; --$j ) {
|
($ydata[$i]-$ydata[$i-1])/($xdata[$i]-$xdata[$i-1]);
|
||||||
$this->y2[$j] = $this->y2[$j]*$this->y2[$j+1] + $delta[$j];
|
$delta[$i] = (6.0*$delta[$i]/($xdata[$i+1]-$xdata[$i-1])-$s*$delta[$i-1])/$p;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// Backward substitution
|
||||||
// Return the two new data vectors
|
for( $j=$n-2; $j >= 0; --$j ) {
|
||||||
function Get($num=50) {
|
$this->y2[$j] = $this->y2[$j]*$this->y2[$j+1] + $delta[$j];
|
||||||
$n = $this->n ;
|
}
|
||||||
$step = ($this->xdata[$n-1]-$this->xdata[0]) / ($num-1);
|
}
|
||||||
$xnew=array();
|
|
||||||
$ynew=array();
|
// Return the two new data vectors
|
||||||
$xnew[0] = $this->xdata[0];
|
function Get($num=50) {
|
||||||
$ynew[0] = $this->ydata[0];
|
$n = $this->n ;
|
||||||
for( $j=1; $j < $num; ++$j ) {
|
$step = ($this->xdata[$n-1]-$this->xdata[0]) / ($num-1);
|
||||||
$xnew[$j] = $xnew[0]+$j*$step;
|
$xnew=array();
|
||||||
$ynew[$j] = $this->Interpolate($xnew[$j]);
|
$ynew=array();
|
||||||
}
|
$xnew[0] = $this->xdata[0];
|
||||||
return array($xnew,$ynew);
|
$ynew[0] = $this->ydata[0];
|
||||||
}
|
for( $j=1; $j < $num; ++$j ) {
|
||||||
|
$xnew[$j] = $xnew[0]+$j*$step;
|
||||||
// Return a single interpolated Y-value from an x value
|
$ynew[$j] = $this->Interpolate($xnew[$j]);
|
||||||
function Interpolate($xpoint) {
|
}
|
||||||
|
return array($xnew,$ynew);
|
||||||
$max = $this->n-1;
|
}
|
||||||
$min = 0;
|
|
||||||
|
// Return a single interpolated Y-value from an x value
|
||||||
// Binary search to find interval
|
function Interpolate($xpoint) {
|
||||||
while( $max-$min > 1 ) {
|
|
||||||
$k = ($max+$min) / 2;
|
$max = $this->n-1;
|
||||||
if( $this->xdata[$k] > $xpoint )
|
$min = 0;
|
||||||
$max=$k;
|
|
||||||
else
|
// Binary search to find interval
|
||||||
$min=$k;
|
while( $max-$min > 1 ) {
|
||||||
}
|
$k = ($max+$min) / 2;
|
||||||
|
if( $this->xdata[$k] > $xpoint )
|
||||||
// Each interval is interpolated by a 3:degree polynom function
|
$max=$k;
|
||||||
$h = $this->xdata[$max]-$this->xdata[$min];
|
else
|
||||||
|
$min=$k;
|
||||||
if( $h == 0 ) {
|
}
|
||||||
JpGraphError::Raise('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.');
|
|
||||||
}
|
// Each interval is interpolated by a 3:degree polynom function
|
||||||
|
$h = $this->xdata[$max]-$this->xdata[$min];
|
||||||
|
|
||||||
$a = ($this->xdata[$max]-$xpoint)/$h;
|
if( $h == 0 ) {
|
||||||
$b = ($xpoint-$this->xdata[$min])/$h;
|
JpGraphError::RaiseL(19002);
|
||||||
return $a*$this->ydata[$min]+$b*$this->ydata[$max]+
|
//('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.');
|
||||||
(($a*$a*$a-$a)*$this->y2[$min]+($b*$b*$b-$b)*$this->y2[$max])*($h*$h)/6.0;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
$a = ($this->xdata[$max]-$xpoint)/$h;
|
||||||
//------------------------------------------------------------------------
|
$b = ($xpoint-$this->xdata[$min])/$h;
|
||||||
// CLASS Bezier
|
return $a*$this->ydata[$min]+$b*$this->ydata[$max]+
|
||||||
// Create a new data array from a number of control points
|
(($a*$a*$a-$a)*$this->y2[$min]+($b*$b*$b-$b)*$this->y2[$max])*($h*$h)/6.0;
|
||||||
//------------------------------------------------------------------------
|
}
|
||||||
class Bezier {
|
}
|
||||||
/**
|
|
||||||
* @author Thomas Despoix, openXtrem company
|
//------------------------------------------------------------------------
|
||||||
* @license released under QPL
|
// CLASS Bezier
|
||||||
* @abstract Bezier interoplated point generation,
|
// Create a new data array from a number of control points
|
||||||
* computed from control points data sets, based on Paul Bourke algorithm :
|
//------------------------------------------------------------------------
|
||||||
* http://astronomy.swin.edu.au/~pbourke/curves/bezier/
|
class Bezier {
|
||||||
*/
|
/**
|
||||||
var $datax = array();
|
* @author Thomas Despoix, openXtrem company
|
||||||
var $datay = array();
|
* @license released under QPL
|
||||||
|
* @abstract Bezier interoplated point generation,
|
||||||
function Bezier($datax, $datay, $attraction_factor = 1) {
|
* computed from control points data sets, based on Paul Bourke algorithm :
|
||||||
// Adding control point multiple time will raise their attraction power over the curve
|
* http://astronomy.swin.edu.au/~pbourke/curves/bezier/
|
||||||
foreach($datax as $datumx) {
|
*/
|
||||||
for ($i = 0; $i < $attraction_factor; $i++) {
|
private $datax = array();
|
||||||
$this->datax[] = $datumx;
|
private $datay = array();
|
||||||
}
|
private $n=0;
|
||||||
}
|
|
||||||
|
function Bezier($datax, $datay, $attraction_factor = 1) {
|
||||||
foreach($datay as $datumy) {
|
// Adding control point multiple time will raise their attraction power over the curve
|
||||||
for ($i = 0; $i < $attraction_factor; $i++) {
|
$this->n = count($datax);
|
||||||
$this->datay[] = $datumy;
|
if( $this->n !== count($datay) ) {
|
||||||
}
|
JpGraphError::RaiseL(19003);
|
||||||
}
|
//('Bezier: Number of X and Y coordinates must be the same');
|
||||||
}
|
}
|
||||||
|
$idx=0;
|
||||||
function Get($steps) {
|
foreach($datax as $datumx) {
|
||||||
$datax = array();
|
for ($i = 0; $i < $attraction_factor; $i++) {
|
||||||
$datay = array();
|
$this->datax[$idx++] = $datumx;
|
||||||
for ($i = 0; $i < $steps; $i++) {
|
}
|
||||||
list($datumx, $datumy) = $this->GetPoint((double) $i / (double) $steps);
|
}
|
||||||
$datax[] = $datumx;
|
$idx=0;
|
||||||
$datay[] = $datumy;
|
foreach($datay as $datumy) {
|
||||||
}
|
for ($i = 0; $i < $attraction_factor; $i++) {
|
||||||
|
$this->datay[$idx++] = $datumy;
|
||||||
$datax[] = end($this->datax);
|
}
|
||||||
$datay[] = end($this->datay);
|
}
|
||||||
|
$this->n *= $attraction_factor;
|
||||||
return array($datax, $datay);
|
}
|
||||||
}
|
|
||||||
|
function Get($steps) {
|
||||||
function GetPoint($mu) {
|
$datax = array();
|
||||||
$n = count($this->datax)-1;
|
$datay = array();
|
||||||
$k = 0;
|
for ($i = 0; $i < $steps; $i++) {
|
||||||
$kn = 0;
|
list($datumx, $datumy) = $this->GetPoint((double) $i / (double) $steps);
|
||||||
$nn = 0;
|
$datax[] = $datumx;
|
||||||
$nkn = 0;
|
$datay[] = $datumy;
|
||||||
$blend = 0.0;
|
}
|
||||||
$newx = 0.0;
|
|
||||||
$newy = 0.0;
|
$datax[] = end($this->datax);
|
||||||
|
$datay[] = end($this->datay);
|
||||||
$muk = 1.0;
|
|
||||||
$munk = (double) pow(1-$mu,(double) $n);
|
return array($datax, $datay);
|
||||||
|
}
|
||||||
for ($k = 0; $k <= $n; $k++) {
|
|
||||||
$nn = $n;
|
function GetPoint($mu) {
|
||||||
$kn = $k;
|
$n = $this->n - 1;
|
||||||
$nkn = $n - $k;
|
$k = 0;
|
||||||
$blend = $muk * $munk;
|
$kn = 0;
|
||||||
$muk *= $mu;
|
$nn = 0;
|
||||||
$munk /= (1-$mu);
|
$nkn = 0;
|
||||||
while ($nn >= 1) {
|
$blend = 0.0;
|
||||||
$blend *= $nn;
|
$newx = 0.0;
|
||||||
$nn--;
|
$newy = 0.0;
|
||||||
if ($kn > 1) {
|
|
||||||
$blend /= (double) $kn;
|
$muk = 1.0;
|
||||||
$kn--;
|
$munk = (double) pow(1-$mu,(double) $n);
|
||||||
}
|
|
||||||
if ($nkn > 1) {
|
for ($k = 0; $k <= $n; $k++) {
|
||||||
$blend /= (double) $nkn;
|
$nn = $n;
|
||||||
$nkn--;
|
$kn = $k;
|
||||||
}
|
$nkn = $n - $k;
|
||||||
}
|
$blend = $muk * $munk;
|
||||||
$newx += $this->datax[$k] * $blend;
|
$muk *= $mu;
|
||||||
$newy += $this->datay[$k] * $blend;
|
$munk /= (1-$mu);
|
||||||
}
|
while ($nn >= 1) {
|
||||||
|
$blend *= $nn;
|
||||||
return array($newx, $newy);
|
$nn--;
|
||||||
}
|
if ($kn > 1) {
|
||||||
}
|
$blend /= (double) $kn;
|
||||||
|
$kn--;
|
||||||
// EOF
|
}
|
||||||
?>
|
if ($nkn > 1) {
|
||||||
|
$blend /= (double) $nkn;
|
||||||
|
$nkn--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$newx += $this->datax[$k] * $blend;
|
||||||
|
$newy += $this->datay[$k] * $blend;
|
||||||
|
}
|
||||||
|
|
||||||
|
return array($newx, $newy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EOF
|
||||||
|
?>
|
||||||
|
@ -1,225 +1,225 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_SCATTER.PHP
|
// File: JPGRAPH_SCATTER.PHP
|
||||||
// Description: Scatter (and impuls) plot extension for JpGraph
|
// Description: Scatter (and impuls) plot extension for JpGraph
|
||||||
// Created: 2001-02-11
|
// Created: 2001-02-11
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_scatter.php 53 2005-06-06 18:12:54Z ljp $
|
// Ver: $Id: jpgraph_scatter.php 492 2006-02-04 12:29:02Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
require_once ('jpgraph_plotmark.inc');
|
require_once ('jpgraph_plotmark.inc.php');
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS FieldArrow
|
// CLASS FieldArrow
|
||||||
// Description: Draw an arrow at (x,y) with angle a
|
// Description: Draw an arrow at (x,y) with angle a
|
||||||
//===================================================
|
//===================================================
|
||||||
class FieldArrow {
|
class FieldArrow {
|
||||||
var $iSize=10; // Length in pixels for arrow
|
public $iColor='black';
|
||||||
var $iArrowSize = 2;
|
public $iSize=10; // Length in pixels for arrow
|
||||||
var $iColor='black';
|
public $iArrowSize = 2;
|
||||||
var $isizespec = array(
|
private $isizespec = array(
|
||||||
array(2,1),array(3,2),array(4,3),array(6,4),array(7,4),array(8,5),array(10,6),array(12,7),array(16,8),array(20,10));
|
array(2,1),array(3,2),array(4,3),array(6,4),array(7,4),array(8,5),array(10,6),array(12,7),array(16,8),array(20,10));
|
||||||
function FieldArrow() {
|
function FieldArrow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetSize($aSize,$aArrowSize=2) {
|
function SetSize($aSize,$aArrowSize=2) {
|
||||||
$this->iSize = $aSize;
|
$this->iSize = $aSize;
|
||||||
$this->iArrowSize = $aArrowSize;
|
$this->iArrowSize = $aArrowSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetColor($aColor) {
|
function SetColor($aColor) {
|
||||||
$this->iColor = $aColor;
|
$this->iColor = $aColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stroke($aImg,$x,$y,$a) {
|
function Stroke($aImg,$x,$y,$a) {
|
||||||
// First rotate the center coordinates
|
// First rotate the center coordinates
|
||||||
list($x,$y) = $aImg->Rotate($x,$y);
|
list($x,$y) = $aImg->Rotate($x,$y);
|
||||||
|
|
||||||
$old_origin = $aImg->SetCenter($x,$y);
|
$old_origin = $aImg->SetCenter($x,$y);
|
||||||
$old_a = $aImg->a;
|
$old_a = $aImg->a;
|
||||||
$aImg->SetAngle(-$a+$old_a);
|
$aImg->SetAngle(-$a+$old_a);
|
||||||
|
|
||||||
$dx = round($this->iSize/2);
|
$dx = round($this->iSize/2);
|
||||||
$c = array($x-$dx,$y,$x+$dx,$y);
|
$c = array($x-$dx,$y,$x+$dx,$y);
|
||||||
$x += $dx;
|
$x += $dx;
|
||||||
|
|
||||||
list($dx,$dy) = $this->isizespec[$this->iArrowSize];
|
list($dx,$dy) = $this->isizespec[$this->iArrowSize];
|
||||||
$ca = array($x,$y,$x-$dx,$y-$dy,$x-$dx,$y+$dy,$x,$y);
|
$ca = array($x,$y,$x-$dx,$y-$dy,$x-$dx,$y+$dy,$x,$y);
|
||||||
|
|
||||||
$aImg->SetColor($this->iColor);
|
$aImg->SetColor($this->iColor);
|
||||||
$aImg->Polygon($c);
|
$aImg->Polygon($c);
|
||||||
$aImg->FilledPolygon($ca);
|
$aImg->FilledPolygon($ca);
|
||||||
|
|
||||||
$aImg->SetCenter($old_origin[0],$old_origin[1]);
|
$aImg->SetCenter($old_origin[0],$old_origin[1]);
|
||||||
$aImg->SetAngle($old_a);
|
$aImg->SetAngle($old_a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS FieldPlot
|
// CLASS FieldPlot
|
||||||
// Description: Render a field plot
|
// Description: Render a field plot
|
||||||
//===================================================
|
//===================================================
|
||||||
class FieldPlot extends Plot {
|
class FieldPlot extends Plot {
|
||||||
var $iAngles;
|
private $iAngles;
|
||||||
var $iCallback='';
|
private $iCallback='';
|
||||||
function FieldPlot($datay,$datax,$angles) {
|
function FieldPlot($datay,$datax,$angles) {
|
||||||
if( (count($datax) != count($datay)) )
|
if( (count($datax) != count($datay)) )
|
||||||
JpGraphError::Raise("Fieldplots must have equal number of X and Y points.");
|
JpGraphError::RaiseL(20001);//("Fieldplots must have equal number of X and Y points.");
|
||||||
if( (count($datax) != count($angles)) )
|
if( (count($datax) != count($angles)) )
|
||||||
JpGraphError::Raise("Fieldplots must have an angle specified for each X and Y points.");
|
JpGraphError::RaiseL(20002);//("Fieldplots must have an angle specified for each X and Y points.");
|
||||||
|
|
||||||
$this->iAngles = $angles;
|
$this->iAngles = $angles;
|
||||||
|
|
||||||
$this->Plot($datay,$datax);
|
$this->Plot($datay,$datax);
|
||||||
$this->value->SetAlign('center','center');
|
$this->value->SetAlign('center','center');
|
||||||
$this->value->SetMargin(15);
|
$this->value->SetMargin(15);
|
||||||
|
|
||||||
$this->arrow = new FieldArrow();
|
$this->arrow = new FieldArrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetCallback($aFunc) {
|
function SetCallback($aFunc) {
|
||||||
$this->iCallback = $aFunc;
|
$this->iCallback = $aFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stroke(&$img,&$xscale,&$yscale) {
|
function Stroke($img,$xscale,$yscale) {
|
||||||
|
|
||||||
// Remeber base color and size
|
// Remeber base color and size
|
||||||
$bc = $this->arrow->iColor;
|
$bc = $this->arrow->iColor;
|
||||||
$bs = $this->arrow->iSize;
|
$bs = $this->arrow->iSize;
|
||||||
$bas = $this->arrow->iArrowSize;
|
$bas = $this->arrow->iArrowSize;
|
||||||
|
|
||||||
for( $i=0; $i<$this->numpoints; ++$i ) {
|
for( $i=0; $i<$this->numpoints; ++$i ) {
|
||||||
// Skip null values
|
// Skip null values
|
||||||
if( $this->coords[0][$i]==="" )
|
if( $this->coords[0][$i]==="" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$f = $this->iCallback;
|
$f = $this->iCallback;
|
||||||
if( $f != "" ) {
|
if( $f != "" ) {
|
||||||
list($cc,$cs,$cas) = call_user_func($f,$this->coords[1][$i],$this->coords[0][$i],$this->iAngles[$i]);
|
list($cc,$cs,$cas) = call_user_func($f,$this->coords[1][$i],$this->coords[0][$i],$this->iAngles[$i]);
|
||||||
// Fall back on global data if the callback isn't set
|
// Fall back on global data if the callback isn't set
|
||||||
if( $cc == "" ) $cc = $bc;
|
if( $cc == "" ) $cc = $bc;
|
||||||
if( $cs == "" ) $cs = $bs;
|
if( $cs == "" ) $cs = $bs;
|
||||||
if( $cas == "" ) $cas = $bas;
|
if( $cas == "" ) $cas = $bas;
|
||||||
//echo "f=$f, cc=$cc, cs=$cs, cas=$cas<br>";
|
//echo "f=$f, cc=$cc, cs=$cs, cas=$cas<br>";
|
||||||
$this->arrow->SetColor($cc);
|
$this->arrow->SetColor($cc);
|
||||||
$this->arrow->SetSize($cs,$cas);
|
$this->arrow->SetSize($cs,$cas);
|
||||||
}
|
}
|
||||||
|
|
||||||
$xt = $xscale->Translate($this->coords[1][$i]);
|
$xt = $xscale->Translate($this->coords[1][$i]);
|
||||||
$yt = $yscale->Translate($this->coords[0][$i]);
|
$yt = $yscale->Translate($this->coords[0][$i]);
|
||||||
|
|
||||||
$this->arrow->Stroke($img,$xt,$yt,$this->iAngles[$i]);
|
$this->arrow->Stroke($img,$xt,$yt,$this->iAngles[$i]);
|
||||||
$this->value->Stroke($img,$this->coords[0][$i],$xt,$yt);
|
$this->value->Stroke($img,$this->coords[0][$i],$xt,$yt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Framework function
|
// Framework function
|
||||||
function Legend(&$aGraph) {
|
function Legend($aGraph) {
|
||||||
if( $this->legend != "" ) {
|
if( $this->legend != "" ) {
|
||||||
$aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0,
|
$aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0,
|
||||||
$this->legendcsimtarget,$this->legendcsimalt);
|
$this->legendcsimtarget,$this->legendcsimalt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS ScatterPlot
|
// CLASS ScatterPlot
|
||||||
// Description: Render X and Y plots
|
// Description: Render X and Y plots
|
||||||
//===================================================
|
//===================================================
|
||||||
class ScatterPlot extends Plot {
|
class ScatterPlot extends Plot {
|
||||||
var $impuls = false;
|
private $impuls = false;
|
||||||
var $linkpoints = false, $linkpointweight=1, $linkpointcolor="black";
|
private $linkpoints = false, $linkpointweight=1, $linkpointcolor="black";
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function ScatterPlot($datay,$datax=false) {
|
function ScatterPlot($datay,$datax=false) {
|
||||||
if( (count($datax) != count($datay)) && is_array($datax))
|
if( (count($datax) != count($datay)) && is_array($datax))
|
||||||
JpGraphError::Raise("Scatterplot must have equal number of X and Y points.");
|
JpGraphError::RaiseL(20003);//("Scatterplot must have equal number of X and Y points.");
|
||||||
$this->Plot($datay,$datax);
|
$this->Plot($datay,$datax);
|
||||||
$this->mark = new PlotMark();
|
$this->mark = new PlotMark();
|
||||||
$this->mark->SetType(MARK_SQUARE);
|
$this->mark->SetType(MARK_SQUARE);
|
||||||
$this->mark->SetColor($this->color);
|
$this->mark->SetColor($this->color);
|
||||||
$this->value->SetAlign('center','center');
|
$this->value->SetAlign('center','center');
|
||||||
$this->value->SetMargin(0);
|
$this->value->SetMargin(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------
|
//---------------
|
||||||
// PUBLIC METHODS
|
// PUBLIC METHODS
|
||||||
function SetImpuls($f=true) {
|
function SetImpuls($f=true) {
|
||||||
$this->impuls = $f;
|
$this->impuls = $f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Combine the scatter plot points with a line
|
// Combine the scatter plot points with a line
|
||||||
function SetLinkPoints($aFlag=true,$aColor="black",$aWeight=1) {
|
function SetLinkPoints($aFlag=true,$aColor="black",$aWeight=1) {
|
||||||
$this->linkpoints=$aFlag;
|
$this->linkpoints=$aFlag;
|
||||||
$this->linkpointcolor=$aColor;
|
$this->linkpointcolor=$aColor;
|
||||||
$this->linkpointweight=$aWeight;
|
$this->linkpointweight=$aWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stroke(&$img,&$xscale,&$yscale) {
|
function Stroke($img,$xscale,$yscale) {
|
||||||
|
|
||||||
$ymin=$yscale->scale_abs[0];
|
$ymin=$yscale->scale_abs[0];
|
||||||
if( $yscale->scale[0] < 0 )
|
if( $yscale->scale[0] < 0 )
|
||||||
$yzero=$yscale->Translate(0);
|
$yzero=$yscale->Translate(0);
|
||||||
else
|
else
|
||||||
$yzero=$yscale->scale_abs[0];
|
$yzero=$yscale->scale_abs[0];
|
||||||
|
|
||||||
$this->csimareas = '';
|
$this->csimareas = '';
|
||||||
for( $i=0; $i<$this->numpoints; ++$i ) {
|
for( $i=0; $i<$this->numpoints; ++$i ) {
|
||||||
|
|
||||||
// Skip null values
|
// Skip null values
|
||||||
if( $this->coords[0][$i]==="" || $this->coords[0][$i]==='-' || $this->coords[0][$i]==='x')
|
if( $this->coords[0][$i]==='' || $this->coords[0][$i]==='-' || $this->coords[0][$i]==='x')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( isset($this->coords[1]) )
|
if( isset($this->coords[1]) )
|
||||||
$xt = $xscale->Translate($this->coords[1][$i]);
|
$xt = $xscale->Translate($this->coords[1][$i]);
|
||||||
else
|
else
|
||||||
$xt = $xscale->Translate($i);
|
$xt = $xscale->Translate($i);
|
||||||
$yt = $yscale->Translate($this->coords[0][$i]);
|
$yt = $yscale->Translate($this->coords[0][$i]);
|
||||||
|
|
||||||
|
|
||||||
if( $this->linkpoints && isset($yt_old) ) {
|
if( $this->linkpoints && isset($yt_old) ) {
|
||||||
$img->SetColor($this->linkpointcolor);
|
$img->SetColor($this->linkpointcolor);
|
||||||
$img->SetLineWeight($this->linkpointweight);
|
$img->SetLineWeight($this->linkpointweight);
|
||||||
$img->Line($xt_old,$yt_old,$xt,$yt);
|
$img->Line($xt_old,$yt_old,$xt,$yt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $this->impuls ) {
|
if( $this->impuls ) {
|
||||||
$img->SetColor($this->color);
|
$img->SetColor($this->color);
|
||||||
$img->SetLineWeight($this->weight);
|
$img->SetLineWeight($this->weight);
|
||||||
$img->Line($xt,$yzero,$xt,$yt);
|
$img->Line($xt,$yzero,$xt,$yt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !empty($this->csimtargets[$i]) ) {
|
if( !empty($this->csimtargets[$i]) ) {
|
||||||
$this->mark->SetCSIMTarget($this->csimtargets[$i]);
|
$this->mark->SetCSIMTarget($this->csimtargets[$i]);
|
||||||
$this->mark->SetCSIMAlt($this->csimalts[$i]);
|
$this->mark->SetCSIMAlt($this->csimalts[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( isset($this->coords[1]) ) {
|
if( isset($this->coords[1]) ) {
|
||||||
$this->mark->SetCSIMAltVal($this->coords[0][$i],$this->coords[1][$i]);
|
$this->mark->SetCSIMAltVal($this->coords[0][$i],$this->coords[1][$i]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->mark->SetCSIMAltVal($this->coords[0][$i],$i);
|
$this->mark->SetCSIMAltVal($this->coords[0][$i],$i);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mark->Stroke($img,$xt,$yt);
|
$this->mark->Stroke($img,$xt,$yt);
|
||||||
|
|
||||||
$this->csimareas .= $this->mark->GetCSIMAreas();
|
$this->csimareas .= $this->mark->GetCSIMAreas();
|
||||||
$this->value->Stroke($img,$this->coords[0][$i],$xt,$yt);
|
$this->value->Stroke($img,$this->coords[0][$i],$xt,$yt);
|
||||||
|
|
||||||
$xt_old = $xt;
|
$xt_old = $xt;
|
||||||
$yt_old = $yt;
|
$yt_old = $yt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Framework function
|
// Framework function
|
||||||
function Legend(&$aGraph) {
|
function Legend($aGraph) {
|
||||||
if( $this->legend != "" ) {
|
if( $this->legend != "" ) {
|
||||||
$aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0,
|
$aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0,
|
||||||
$this->legendcsimtarget,$this->legendcsimalt);
|
$this->legendcsimtarget,$this->legendcsimalt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Class
|
} // Class
|
||||||
/* EOF */
|
/* EOF */
|
||||||
?>
|
?>
|
@ -1,182 +1,184 @@
|
|||||||
<?php
|
<?php
|
||||||
/*=======================================================================
|
/*=======================================================================
|
||||||
// File: JPGRAPH_STOCK.PHP
|
// File: JPGRAPH_STOCK.PHP
|
||||||
// Description: Stock plot extension for JpGraph
|
// Description: Stock plot extension for JpGraph
|
||||||
// Created: 2003-01-27
|
// Created: 2003-01-27
|
||||||
// Author: Johan Persson (johanp@aditus.nu)
|
// Author: Johan Persson (johanp@aditus.nu)
|
||||||
// Ver: $Id: jpgraph_stock.php 41 2005-06-06 10:46:10Z ljp $
|
// Ver: $Id: jpgraph_stock.php 494 2006-02-04 12:31:05Z ljp $
|
||||||
//
|
//
|
||||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||||
//========================================================================
|
//========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//===================================================
|
//===================================================
|
||||||
// CLASS StockPlot
|
// CLASS StockPlot
|
||||||
//===================================================
|
//===================================================
|
||||||
class StockPlot extends Plot {
|
class StockPlot extends Plot {
|
||||||
var $iTupleSize = 4;
|
protected $iTupleSize = 4;
|
||||||
var $iWidth=9;
|
private $iWidth=9;
|
||||||
var $iEndLines=1;
|
private $iEndLines=1;
|
||||||
var $iStockColor1='white',$iStockColor2='darkred',$iStockColor3='darkred';
|
private $iStockColor1='white',$iStockColor2='darkred',$iStockColor3='darkred';
|
||||||
//---------------
|
//---------------
|
||||||
// CONSTRUCTOR
|
// CONSTRUCTOR
|
||||||
function StockPlot(&$datay,$datax=false) {
|
function StockPlot($datay,$datax=false) {
|
||||||
if( count($datay) % $this->iTupleSize ) {
|
if( count($datay) % $this->iTupleSize ) {
|
||||||
JpGraphError::Raise('Data values for Stock charts must contain an even multiple of '.$this->iTupleSize.' data points.');
|
JpGraphError::RaiseL(21001,$this->iTupleSize);
|
||||||
}
|
//('Data values for Stock charts must contain an even multiple of '.$this->iTupleSize.' data points.');
|
||||||
$this->Plot($datay,$datax);
|
}
|
||||||
$this->numpoints /= $this->iTupleSize;
|
$this->Plot($datay,$datax);
|
||||||
}
|
$this->numpoints /= $this->iTupleSize;
|
||||||
//---------------
|
}
|
||||||
// PUBLIC METHODS
|
//---------------
|
||||||
|
// PUBLIC METHODS
|
||||||
function SetColor($aColor,$aColor1='white',$aColor2='darkred',$aColor3='darkred') {
|
|
||||||
$this->color = $aColor;
|
function SetColor($aColor,$aColor1='white',$aColor2='darkred',$aColor3='darkred') {
|
||||||
$this->iStockColor1 = $aColor1;
|
$this->color = $aColor;
|
||||||
$this->iStockColor2 = $aColor2;
|
$this->iStockColor1 = $aColor1;
|
||||||
$this->iStockColor3 = $aColor3;
|
$this->iStockColor2 = $aColor2;
|
||||||
}
|
$this->iStockColor3 = $aColor3;
|
||||||
|
}
|
||||||
function SetWidth($aWidth) {
|
|
||||||
// Make sure it's odd
|
function SetWidth($aWidth) {
|
||||||
$this->iWidth = 2*floor($aWidth/2)+1;
|
// Make sure it's odd
|
||||||
}
|
$this->iWidth = 2*floor($aWidth/2)+1;
|
||||||
|
}
|
||||||
function HideEndLines($aHide=true) {
|
|
||||||
$this->iEndLines = !$aHide;
|
function HideEndLines($aHide=true) {
|
||||||
}
|
$this->iEndLines = !$aHide;
|
||||||
|
}
|
||||||
// Gets called before any axis are stroked
|
|
||||||
function PreStrokeAdjust(&$graph) {
|
// Gets called before any axis are stroked
|
||||||
if( $this->center ) {
|
function PreStrokeAdjust($graph) {
|
||||||
$a=0.5; $b=0.5;
|
if( $this->center ) {
|
||||||
$this->numpoints++;
|
$a=0.5; $b=0.5;
|
||||||
} else {
|
$this->numpoints++;
|
||||||
$a=0; $b=0;
|
} else {
|
||||||
}
|
$a=0; $b=0;
|
||||||
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
}
|
||||||
$graph->SetTextScaleOff($b);
|
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
||||||
}
|
$graph->SetTextScaleOff($b);
|
||||||
|
}
|
||||||
// Method description
|
|
||||||
function Stroke($img,$xscale,$yscale) {
|
// Method description
|
||||||
$n=$this->numpoints;
|
function Stroke($img,$xscale,$yscale) {
|
||||||
if( $this->center ) $n--;
|
$n=$this->numpoints;
|
||||||
if( isset($this->coords[1]) ) {
|
if( $this->center ) $n--;
|
||||||
if( count($this->coords[1])!=$n )
|
if( isset($this->coords[1]) ) {
|
||||||
JpGraphError::Raise("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
if( count($this->coords[1])!=$n )
|
||||||
else
|
JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints);
|
||||||
$exist_x = true;
|
//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
||||||
}
|
else
|
||||||
else
|
$exist_x = true;
|
||||||
$exist_x = false;
|
}
|
||||||
|
else
|
||||||
if( $exist_x )
|
$exist_x = false;
|
||||||
$xs=$this->coords[1][0];
|
|
||||||
else
|
if( $exist_x )
|
||||||
$xs=0;
|
$xs=$this->coords[1][0];
|
||||||
|
else
|
||||||
$ts = $this->iTupleSize;
|
$xs=0;
|
||||||
$this->csimareas = '';
|
|
||||||
for( $i=0; $i<$n; ++$i) {
|
$ts = $this->iTupleSize;
|
||||||
|
$this->csimareas = '';
|
||||||
//If value is NULL, then don't draw a bar at all
|
for( $i=0; $i<$n; ++$i) {
|
||||||
if ($this->coords[0][$i] === null) continue;
|
|
||||||
|
//If value is NULL, then don't draw a bar at all
|
||||||
if( $exist_x ) $x=$this->coords[1][$i];
|
if ($this->coords[0][$i] === null) continue;
|
||||||
else $x=$i;
|
|
||||||
$xt = $xscale->Translate($x);
|
if( $exist_x ) $x=$this->coords[1][$i];
|
||||||
|
else $x=$i;
|
||||||
$neg = $this->coords[0][$i*$ts] > $this->coords[0][$i*$ts+1] ;
|
$xt = $xscale->Translate($x);
|
||||||
$yopen = $yscale->Translate($this->coords[0][$i*$ts]);
|
|
||||||
$yclose = $yscale->Translate($this->coords[0][$i*$ts+1]);
|
$neg = $this->coords[0][$i*$ts] > $this->coords[0][$i*$ts+1] ;
|
||||||
$ymin = $yscale->Translate($this->coords[0][$i*$ts+2]);
|
$yopen = $yscale->Translate($this->coords[0][$i*$ts]);
|
||||||
$ymax = $yscale->Translate($this->coords[0][$i*$ts+3]);
|
$yclose = $yscale->Translate($this->coords[0][$i*$ts+1]);
|
||||||
|
$ymin = $yscale->Translate($this->coords[0][$i*$ts+2]);
|
||||||
$dx = floor($this->iWidth/2);
|
$ymax = $yscale->Translate($this->coords[0][$i*$ts+3]);
|
||||||
$xl = $xt - $dx;
|
|
||||||
$xr = $xt + $dx;
|
$dx = floor($this->iWidth/2);
|
||||||
|
$xl = $xt - $dx;
|
||||||
if( $neg )
|
$xr = $xt + $dx;
|
||||||
$img->SetColor($this->iStockColor3);
|
|
||||||
else
|
if( $neg )
|
||||||
$img->SetColor($this->iStockColor1);
|
$img->SetColor($this->iStockColor3);
|
||||||
$img->FilledRectangle($xl,$yopen,$xr,$yclose);
|
else
|
||||||
$img->SetLineWeight($this->weight);
|
$img->SetColor($this->iStockColor1);
|
||||||
if( $neg )
|
$img->FilledRectangle($xl,$yopen,$xr,$yclose);
|
||||||
$img->SetColor($this->iStockColor2);
|
$img->SetLineWeight($this->weight);
|
||||||
else
|
if( $neg )
|
||||||
$img->SetColor($this->color);
|
$img->SetColor($this->iStockColor2);
|
||||||
|
else
|
||||||
$img->Rectangle($xl,$yopen,$xr,$yclose);
|
$img->SetColor($this->color);
|
||||||
|
|
||||||
if( $yopen < $yclose ) {
|
$img->Rectangle($xl,$yopen,$xr,$yclose);
|
||||||
$ytop = $yopen ;
|
|
||||||
$ybottom = $yclose ;
|
if( $yopen < $yclose ) {
|
||||||
}
|
$ytop = $yopen ;
|
||||||
else {
|
$ybottom = $yclose ;
|
||||||
$ytop = $yclose ;
|
}
|
||||||
$ybottom = $yopen ;
|
else {
|
||||||
}
|
$ytop = $yclose ;
|
||||||
$img->SetColor($this->color);
|
$ybottom = $yopen ;
|
||||||
$img->Line($xt,$ytop,$xt,$ymax);
|
}
|
||||||
$img->Line($xt,$ybottom,$xt,$ymin);
|
$img->SetColor($this->color);
|
||||||
|
$img->Line($xt,$ytop,$xt,$ymax);
|
||||||
if( $this->iEndLines ) {
|
$img->Line($xt,$ybottom,$xt,$ymin);
|
||||||
$img->Line($xl,$ymax,$xr,$ymax);
|
|
||||||
$img->Line($xl,$ymin,$xr,$ymin);
|
if( $this->iEndLines ) {
|
||||||
}
|
$img->Line($xl,$ymax,$xr,$ymax);
|
||||||
|
$img->Line($xl,$ymin,$xr,$ymin);
|
||||||
// A chance for subclasses to add things to the bar
|
}
|
||||||
// for data point i
|
|
||||||
$this->ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg);
|
// A chance for subclasses to add things to the bar
|
||||||
|
// for data point i
|
||||||
// Setup image maps
|
$this->ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg);
|
||||||
if( !empty($this->csimtargets[$i]) ) {
|
|
||||||
$this->csimareas.= '<area shape="rect" coords="'.
|
// Setup image maps
|
||||||
round($xl).','.round($ytop).','.
|
if( !empty($this->csimtargets[$i]) ) {
|
||||||
round($xr).','.round($ybottom).'" ';
|
$this->csimareas.= '<area shape="rect" coords="'.
|
||||||
$this->csimareas .= ' href="'.$this->csimtargets[$i].'"';
|
round($xl).','.round($ytop).','.
|
||||||
if( !empty($this->csimalts[$i]) ) {
|
round($xr).','.round($ybottom).'" ';
|
||||||
$sval=$this->csimalts[$i];
|
$this->csimareas .= ' href="'.$this->csimtargets[$i].'"';
|
||||||
$this->csimareas .= " title=\"$sval\" ";
|
if( !empty($this->csimalts[$i]) ) {
|
||||||
}
|
$sval=$this->csimalts[$i];
|
||||||
$this->csimareas.= " alt=\"$sval\" />\n";
|
$this->csimareas .= " title=\"$sval\" ";
|
||||||
}
|
}
|
||||||
}
|
$this->csimareas.= " alt=\"$sval\" />\n";
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
// A hook for subclasses to modify the plot
|
}
|
||||||
function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {}
|
|
||||||
|
// A hook for subclasses to modify the plot
|
||||||
} // Class
|
function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {}
|
||||||
|
|
||||||
//===================================================
|
} // Class
|
||||||
// CLASS BoxPlot
|
|
||||||
//===================================================
|
//===================================================
|
||||||
class BoxPlot extends StockPlot {
|
// CLASS BoxPlot
|
||||||
var $iPColor='black',$iNColor='white';
|
//===================================================
|
||||||
function BoxPlot($datay,$datax=false) {
|
class BoxPlot extends StockPlot {
|
||||||
$this->iTupleSize=5;
|
private $iPColor='black',$iNColor='white';
|
||||||
parent::StockPlot($datay,$datax);
|
function BoxPlot($datay,$datax=false) {
|
||||||
}
|
$this->iTupleSize=5;
|
||||||
|
parent::StockPlot($datay,$datax);
|
||||||
function SetMedianColor($aPos,$aNeg) {
|
}
|
||||||
$this->iPColor = $aPos;
|
|
||||||
$this->iNColor = $aNeg;
|
function SetMedianColor($aPos,$aNeg) {
|
||||||
}
|
$this->iPColor = $aPos;
|
||||||
|
$this->iNColor = $aNeg;
|
||||||
function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {
|
}
|
||||||
if( $neg )
|
|
||||||
$img->SetColor($this->iNColor);
|
function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {
|
||||||
else
|
if( $neg )
|
||||||
$img->SetColor($this->iPColor);
|
$img->SetColor($this->iNColor);
|
||||||
|
else
|
||||||
$y = $yscale->Translate($this->coords[0][$i*5+4]);
|
$img->SetColor($this->iPColor);
|
||||||
$img->Line($xl,$y,$xr,$y);
|
|
||||||
}
|
$y = $yscale->Translate($this->coords[0][$i*5+4]);
|
||||||
}
|
$img->Line($xl,$y,$xr,$y);
|
||||||
|
}
|
||||||
/* EOF */
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user