--- libphp-jpgraph-1.5.2.orig/src/jpgraph_pie3d.php
+++ libphp-jpgraph-1.5.2/src/jpgraph_pie3d.php
@@ -88,7 +88,7 @@
function ExplodeSlice($e) {
- JpGraphError::Raise("JpGraph Error: Exploding slices are not (yet) implemented for 3d pies graphs.");
+ //JpGraphError::Raise("JpGraph Error: Exploding slices are not (yet) implemented for 3d pies graphs.");
//$this->explode_slice=$e;
}
--- libphp-jpgraph-1.5.2.orig/src/jpgraph_dir.php
+++ libphp-jpgraph-1.5.2/src/jpgraph_dir.php
@@ -16,7 +16,7 @@
//------------------------------------------------------------------
// The full absolute name of directory to be used as a cache. This directory MUST
// be readable and writable for PHP. Must end with '/'
-DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
+DEFINE("CACHE_DIR","/var/cache/jpgraph/");
// The URL relative name where the cache can be found, i.e
// under what HTTP directory can the cache be found. Normally
@@ -25,6 +25,6 @@
DEFINE("APACHE_CACHE_DIR","/jpgraph_cache/");
// Directory for TTF fonts. Must end with '/'
-DEFINE("TTF_DIR","/usr/local/fonts/ttf/");
+DEFINE("TTF_DIR","/usr/share/fonts/truetype/msttcorefonts/");
?>
--- libphp-jpgraph-1.5.2.orig/src/jpgraph.php
+++ libphp-jpgraph-1.5.2/src/jpgraph.php
@@ -30,7 +30,8 @@
// regenerate the image. Note that even if reading the cache is
// disabled the cached will still be updated with the newly generated
// image. Set also "USE_CACHE" below.
-DEFINE("READ_CACHE",true);
+//DEFINE("READ_CACHE",true);
+DEFINE("READ_CACHE",false);
// Should the cache be used at all? By setting this to false no
// files will be generated in the cache directory.
@@ -38,7 +39,8 @@
// false will still create the image in the cache directory
// just not use it. By setting USE_CACHE=false no files will even
// be generated in the cache directory.
-DEFINE("USE_CACHE",true);
+//DEFINE("USE_CACHE",true);
+DEFINE("USE_CACHE",false);
// If the color palette is full should JpGraph try to allocate
// the closest match? If you plan on using background image or
@@ -251,11 +253,11 @@
// Check what version of the GD library is being used
//
if(function_exists('imagecopyresampled') ) {
- $gd2 = true;
+ $GLOBALS['gd2'] = true;
$copyfunc = "imagecopyresampled";
} elseif(function_exists('imagecopyresized')) {
$copyfunc = "imagecopyresized";
- $gd2 = false;
+ $GLOBALS['gd2'] = false;
}
else {
JpGraphError::Raise("JpGraph Error: Your PHP installation does not
@@ -426,6 +428,11 @@
//---------------
// PUBLIC METHODS
+ // OW : fake method to have reporting working
+ //function SetMargin($x1, $x2, $x3, $x4) {
+ // return true;
+ //}
+
// Should the grid be in front or back of the plot?
function SetGridDepth($aDepth) {
$this->grid_depth=$aDepth;
@@ -490,6 +497,8 @@
// Specify a background image
function SetBackgroundImage($aFileName,$aBgType=BKIMG_FILLPLOT,$aImgFormat="png") {
+/* CB Not any more bugging
+
if( $GLOBALS["gd2"] && !USE_TRUECOLOR ) {
JpGraphError::Raise("JpGraph Error:You are using GD 2.x and are
trying to use a background images on a non truecolor image.
@@ -500,6 +509,7 @@
using any truetype fonts with truecolor images will result in very
poor quality fonts.");
}
+*/
$this->background_image = $aFileName;
$this->background_image_type=$aBgType;
@@ -1064,6 +1074,10 @@
$this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1);
}
}
+ // Set Margin by Christian Bayle
+ function SetMargin($lm,$rm,$tm,$bm) {
+ $this->img->SetMargin($lm,$rm,$tm,$bm);
+ }
} // Class
@@ -1078,13 +1092,13 @@
function TTF() {
// Base file names for available fonts
$this->font_fam=array(
- FF_COURIER => TTF_DIR."courier",
- FF_VERDANA => TTF_DIR."verdana",
- FF_TIMES => TTF_DIR."times",
- FF_HANDWRT => TTF_DIR."handwriting",
- FF_COMIC => TTF_DIR."comic",
- FF_ARIAL => TTF_DIR."arial",
- FF_BOOK => TTF_DIR."bookant");
+ FF_COURIER => TTF_DIR."Courier_New",
+ FF_VERDANA => TTF_DIR."Verdana",
+ FF_TIMES => TTF_DIR."Times",
+ FF_HANDWRT => TTF_DIR."Handwriting",
+ FF_COMIC => TTF_DIR."Comic",
+ FF_ARIAL => TTF_DIR."Arial",
+ FF_BOOK => TTF_DIR."Bookant");
}
//---------------
@@ -1096,11 +1110,11 @@
switch( $style ) {
case FS_NORMAL:
break;
- case FS_BOLD: $f .= "bd";
+ case FS_BOLD: $f .= "_Bold";
break;
- case FS_ITALIC: $f .= "i";
+ case FS_ITALIC: $f .= "_Italic";
break;
- case FS_BOLDIT: $f .= "bi";
+ case FS_BOLDIT: $f .= "_Bold_Italic";
break;
default:
JpGraphError::Raise("JpGraph Error: Unknown TTF Style.");
@@ -3490,7 +3504,16 @@
}
function FilledCircle($xc,$yc,$r) {
- imagefilledellipse($this->img,$xc,$yc,2*$r,2*$r,$this->current_color);
+ if( $GLOBALS['gd2'] ) {
+ imagefilledellipse($this->img,$xc,$yc,2*$r,2*$r,$this->current_color);
+ }
+ else {
+ for( $i=1; $i < 2*$r; $i += 2 ) {
+ $this->Arc($xc,$yc,$i,$i,0,360);
+ $this->Arc($xc,$yc,$i+1,$i,0,360);
+ $this->Arc($xc,$yc,$i+1,$i+1,0,360);
+ }
+ }
}
// Linear Color InterPolation
--- libphp-jpgraph-1.5.2.orig/src/jpgraph_gantt.php
+++ libphp-jpgraph-1.5.2/src/jpgraph_gantt.php
@@ -1157,9 +1157,9 @@
$this->iCaptionMargin=$aMarg;
}
- function GetLineNbr() {
- return 0;
- }
+// function GetLineNbr() {
+// return 0;
+// }
function GetAbsHeight($aImg) {
return 0;
@@ -1189,7 +1189,7 @@
$this->iProgress = $aProg;
}
- function SetPattern($aPattern,$aColor="blue",$aDensity=98) {
+ function SetPattern($aPattern,$aColor="blue",$aDensity=100) {
$this->iPattern = $aPattern;
$this->iColor = $aColor;
$this->iDensity = $aDensity;
--- libphp-jpgraph-1.5.2.orig/src/Examples/linegraceex.php
+++ libphp-jpgraph-1.5.2/src/Examples/linegraceex.php
@@ -1,6 +1,6 @@
SetColor("white");
--- libphp-jpgraph-1.5.2.orig/src/Examples/example16.1.php
+++ libphp-jpgraph-1.5.2/src/Examples/example16.1.php
@@ -1,8 +1,8 @@
Sun, 10 Jun 2007 23:10:25 +0200
+
+libphp-jpgraph (1.5.2-11ubuntu1) gutsy; urgency=low
+
+ * Merge from debian unstable, remaining changes:
+ - Changed all php4 deps to php5 deps
+
+ -- Stephan Hermann Fri, 25 May 2007 08:55:54 +0000
+
+libphp-jpgraph (1.5.2-11) unstable; urgency=low
+
+ * Added support for php5(-gd), reviewed all example that seems to work
+ (Closes: #424795) affected by php4-removal
+
+ -- Christian Bayle Wed, 23 May 2007 01:24:50 +0200
+
+libphp-jpgraph (1.5.2-10.1ubuntu2) feisty; urgency=low
+
+ * debian/control:
+ - Fixed one wrong php5 dep
+
+ -- Stephan Hermann Wed, 11 Apr 2007 15:23:56 +0200
+
+libphp-jpgraph (1.5.2-10.1ubuntu1) feisty; urgency=low
+
+ * debian/control:
+ - Changed all php4 deps to php5 deps
+ - Added Ubuntu MOTU Maintainer, moved old one to XSBC-Original-Maintainer
+
+ -- Stephan Hermann Tue, 10 Apr 2007 14:34:57 +0200
+
+libphp-jpgraph (1.5.2-10.1) unstable; urgency=low
+
+ * Non-Maintainer upload with maintainer consent.
+
+ * Apply patch to make $gd2 global really global (Closes: #354637).
+
+ * Bring out-of-sync debhelper version in sync to level 5.
+ * Install upstream Changelog.
+ * Update FSF address in debian/copyright.
+ * Checked for policy version 3.7.2.
+
+ -- Thijs Kinkhorst Wed, 5 Jul 2006 16:51:18 +0200
+
+libphp-jpgraph (1.5.2-10) unstable; urgency=low
+
+ * msttcorefonts dir changed (in package msttcorefonts)
+ from /usr/share/fonts/truetype/ to /usr/share/fonts/truetype/msttcorefonts/
+ (Closes: #275281)
+
+ -- Christian Bayle Thu, 7 Oct 2004 21:24:42 +0200
+
+libphp-jpgraph (1.5.2-9) unstable; urgency=low
+
+ * Applied a patch proposed by Guillaume Smet that add a fake
+ SetMargin method and a doing nothing ExplodeSlice method, to make this
+ make work better with gforge package.
+ * Finnaly commented the fake SetMargin
+
+ -- Christian Bayle Mon, 13 Sep 2004 22:34:42 +0200
+
+libphp-jpgraph (1.5.2-8) unstable; urgency=low
+
+ * Changed dependancy on php4-gd2 with php4-gd (Closes: #257999)
+ * I explain in copyright file why I don't upgrade to new QPLed + non
+ commercial use clause upstream version, this is not DFSG compliant (Closes: #258104)
+
+ -- Christian Bayle Wed, 1 Sep 2004 22:58:59 +0200
+
+libphp-jpgraph (1.5.2-7) unstable; urgency=low
+
+ * Added alternate depend on libapache2-mod-php4 to support apache2
+ (closes bug#255315)
+
+ -- Christian Bayle Fri, 25 Jun 2004 09:52:29 +0200
+
+libphp-jpgraph (1.5.2-6) stable; urgency=low
+
+ * Woody backport
+
+ -- Christian Bayle Thu, 15 Apr 2004 11:22:26 +0200
+
+libphp-jpgraph (1.5.2-5) unstable; urgency=low
+
+ * Changed dependancy on php4-gd for php4-gd2
+ * Changed density in jpgraph_gantt.php as suggested by Joseph Miller (joff)
+
+ -- Christian Bayle Thu, 15 Apr 2004 11:20:58 +0200
+
+libphp-jpgraph (1.5.2-4) stable; urgency=low
+
+ * Woody backport
+
+ -- Christian Bayle Sat, 27 Mar 2004 17:45:25 +0100
+
+libphp-jpgraph (1.5.2-3) unstable; urgency=low
+
+ * New First upload (closes #173601) ITP
+ * This package was released by Luis Bustamante
+ * Luis who allowed me to upload the package will maintain the package
+ when he will have more time to work on it.
+ * For some licensing reason it was probably rejected
+ * This is the packaging of and older GPLed release
+ * I changed cache and ttf path in ./src/jpgraph_dir.php
+ * I disabled caching in ./src/jpgraph.php
+ * I corrected imagefilledelipse broken function
+ * I corrected path in examples
+ * I corrected font names
+ * I added gantt->SetMargin function needed by gforge package
+
+ -- Christian Bayle Thu, 19 Feb 2004 23:50:14 +0100
+
--- libphp-jpgraph-1.5.2.orig/debian/copyright
+++ libphp-jpgraph-1.5.2/debian/copyright
@@ -0,0 +1,36 @@
+This package was debianized by Luis Bustamante on
+Thu, 19 Dec 2002 13:48:02 -0500.
+For licensing reasons only GPLed 1.5.2 is now packaged by Christian Bayle
+
+
+To be clear for those that would ask why I don't upload the new 1.16 QPLed
+version. You can read on the home page:
+
+"JpGraph is released under a dual license. QPL 1.0 (Qt Free Licensee) For
+non-commercial, open-source and educational use and JpGraph Professional
+License for commercial use."
+This is not compliant with DFSG #6
+"The license must not restrict anyone from making use of the program in a
+specific field of endeavor. For example, it may not restrict the program from
+being used in a business, or from being used for genetic research."
+
+It was downloaded from:
+http://www.aditus.nu/jpgraph/downloads/jpgraph-1.5.2.tar.gz
+
+Upstream Author: Johan Persson
+
+Copyright:
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License with
+ the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL*;
+ if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA
--- libphp-jpgraph-1.5.2.orig/debian/rules
+++ libphp-jpgraph-1.5.2/debian/rules
@@ -0,0 +1,34 @@
+#!/usr/bin/make -f
+# rules for libphp-jpgraph package
+# by Luis Bustamante (luferbu@fluidsignal.com)
+
+build:
+
+clean:
+ dh_testdir
+ dh_testroot
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+binary: binary-indep
+
+binary-arch: install
+
+binary-indep: install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installexamples -plibphp-jpgraph-examples src/Examples/*
+ chmod 644 $(CURDIR)/debian/libphp-jpgraph-examples/usr/share/doc/libphp-jpgraph-examples/examples/*
+ dh_installchangelogs src/Changelog
+ dh_compress
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
--- libphp-jpgraph-1.5.2.orig/debian/install
+++ libphp-jpgraph-1.5.2/debian/install
@@ -0,0 +1 @@
+src/*.php /usr/share/jpgraph
--- libphp-jpgraph-1.5.2.orig/debian/libphp-jpgraph.docs
+++ libphp-jpgraph-1.5.2/debian/libphp-jpgraph.docs
@@ -0,0 +1 @@
+README
--- libphp-jpgraph-1.5.2.orig/debian/control
+++ libphp-jpgraph-1.5.2/debian/control
@@ -0,0 +1,31 @@
+Source: libphp-jpgraph
+Section: web
+Priority: optional
+Maintainer: Ubuntu MOTU Developers
+XSBC-Original-Maintainer: Christian Bayle
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: libphp-jpgraph
+Architecture: all
+Depends: php5 | php5-cgi | libapache-mod-php5, php5-gd
+Suggests: msttcorefonts (>=1.1.11)
+Description: Object oriented graph library for php5
+ JpGraph is an object oriented class library for php5. JpGraph makes
+ it easy to draw both "quick and dirty" graphs with a minimum of code
+ and complex professional graphs which requires a very fine grain
+ control. JpGraph is equally well suited for both scientific and
+ business type of graphs.
+
+Package: libphp-jpgraph-examples
+Architecture: all
+Depends: libphp-jpgraph
+Description: Object oriented graph library for php5 (examples)
+ JpGraph is an object oriented class library for php5. JpGraph makes
+ it easy to draw both "quick and dirty" graphs with a minimum of code
+ and complex professional graphs which requires a very fine grain
+ control. JpGraph is equally well suited for both scientific and
+ business type of graphs.
+ .
+ This package contains examples for using JpGraph library.
+