aboutsummaryrefslogtreecommitdiffstats
path: root/config/archive/dspam/pear/Image/Graph/Line
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2011-01-25 05:20:28 -0500
committerChris Buechler <cmb@pfsense.org>2011-01-25 05:21:06 -0500
commit7af18d10dc23084ae8390241c2e9951d530248f7 (patch)
treebba85a3958c7c11a8ce0bc8d6b0addad3a24c2f1 /config/archive/dspam/pear/Image/Graph/Line
parentdc3d5f22067dd659e4e8bd407e0745f78769fc85 (diff)
downloadpfsense-packages-7af18d10dc23084ae8390241c2e9951d530248f7.tar.gz
pfsense-packages-7af18d10dc23084ae8390241c2e9951d530248f7.tar.bz2
pfsense-packages-7af18d10dc23084ae8390241c2e9951d530248f7.zip
archive some more dead packages
Diffstat (limited to 'config/archive/dspam/pear/Image/Graph/Line')
-rw-r--r--config/archive/dspam/pear/Image/Graph/Line/Array.php129
-rw-r--r--config/archive/dspam/pear/Image/Graph/Line/Dashed.php76
-rw-r--r--config/archive/dspam/pear/Image/Graph/Line/Dotted.php67
-rw-r--r--config/archive/dspam/pear/Image/Graph/Line/Formatted.php90
-rw-r--r--config/archive/dspam/pear/Image/Graph/Line/Solid.php105
5 files changed, 467 insertions, 0 deletions
diff --git a/config/archive/dspam/pear/Image/Graph/Line/Array.php b/config/archive/dspam/pear/Image/Graph/Line/Array.php
new file mode 100644
index 00000000..5d542141
--- /dev/null
+++ b/config/archive/dspam/pear/Image/Graph/Line/Array.php
@@ -0,0 +1,129 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Image_Graph - PEAR PHP OO Graph Rendering Utility.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version. This library 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 Lesser
+ * General Public License for more details. You should have received a copy of
+ * the GNU Lesser General Public License along with this library; if not, write
+ * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Image_Graph
+ */
+
+/**
+ * Include file Image/Graph/Common.php
+ */
+require_once 'Image/Graph/Common.php';
+
+/**
+ * A sequential array of linestyles.
+ *
+ * This is used for multiple objects within the same element with different line
+ * styles. This is done by adding multiple line styles to a LineArrray
+ * structure. The linearray will then when requested return the 'next' linestyle
+ * in sequential order. It is possible to specify ID tags to each linestyle,
+ * which is used to make sure some data uses a specific linestyle (i.e. in a
+ * multiple-/stackedbarchart you name the {@link Image_Graph_Dataset}s and uses
+ * this name as ID tag when adding the dataset's associated linestyle to the
+ * linearray.
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Image_Graph
+ */
+class Image_Graph_Line_Array extends Image_Graph_Common
+{
+
+ /**
+ * The fill array
+ * @var array
+ * @access private
+ */
+ var $_lineStyles = array ();
+
+ /**
+ * Add a line style to the array
+ *
+ * @param Image_Graph_Line $style The style to add
+ */
+ function add(& $style, $id = false)
+ {
+ if (is_a($style, 'Image_Graph_Element')) {
+ parent::add($style);
+ }
+ if ($id === false) {
+ $this->_lineStyles[] =& $style;
+ } else {
+ $this->_lineStyles[$id] =& $style;
+ }
+ reset($this->_lineStyles);
+
+ }
+
+ /**
+ * Add a color to the array
+ *
+ * @param int $color The color
+ * @param string $id The id or name of the color
+ */
+ function addColor($color, $id = false)
+ {
+ if ($id !== false) {
+ $this->_lineStyles[$id] = $color;
+ } else {
+ $this->_lineStyles[] = $color;
+ }
+ reset($this->_lineStyles);
+ }
+
+ /**
+ * Return the linestyle
+ *
+ * @return int A GD Linestyle
+ * @access private
+ */
+ function _getLineStyle($ID = false)
+ {
+ if (($ID === false) || (!isset($this->_lineStyles[$ID]))) {
+ $ID = key($this->_lineStyles);
+ if (!next($this->_lineStyles)) {
+ reset($this->_lineStyles);
+ }
+ }
+ $lineStyle =& $this->_lineStyles[$ID];
+
+ if (is_object($lineStyle)) {
+ return $lineStyle->_getLineStyle($ID);
+ } elseif ($lineStyle !== null) {
+ return $lineStyle;
+ } else {
+ return parent::_getLineStyle($ID);
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/config/archive/dspam/pear/Image/Graph/Line/Dashed.php b/config/archive/dspam/pear/Image/Graph/Line/Dashed.php
new file mode 100644
index 00000000..448fb218
--- /dev/null
+++ b/config/archive/dspam/pear/Image/Graph/Line/Dashed.php
@@ -0,0 +1,76 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Image_Graph - PEAR PHP OO Graph Rendering Utility.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version. This library 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 Lesser
+ * General Public License for more details. You should have received a copy of
+ * the GNU Lesser General Public License along with this library; if not, write
+ * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Image_Graph
+ */
+
+/**
+ * Include file Image/Graph/Line/Formatted.php
+ */
+require_once 'Image/Graph/Line/Formatted.php';
+
+/**
+ * Dashed line style.
+ *
+ * This style displays as a short line with a shorter space afterwards, i.e
+ * 4px color1, 2px color2, 4px color1, etc.
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Image_Graph
+ */
+class Image_Graph_Line_Dashed extends Image_Graph_Line_Formatted
+{
+
+ /**
+ * Image_Graph_DashedLine [Constructor]
+ *
+ * @param mixed $color1 The color for the 'dashes'
+ * @param mixed $color2 The color for the 'spaces'
+ */
+ function Image_Graph_Line_Dashed($color1, $color2)
+ {
+ parent::Image_Graph_Line_Formatted(
+ array(
+ $color1,
+ $color1,
+ $color1,
+ $color1,
+ $color2,
+ $color2
+ )
+ );
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/config/archive/dspam/pear/Image/Graph/Line/Dotted.php b/config/archive/dspam/pear/Image/Graph/Line/Dotted.php
new file mode 100644
index 00000000..8574f8da
--- /dev/null
+++ b/config/archive/dspam/pear/Image/Graph/Line/Dotted.php
@@ -0,0 +1,67 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Image_Graph - PEAR PHP OO Graph Rendering Utility.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version. This library 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 Lesser
+ * General Public License for more details. You should have received a copy of
+ * the GNU Lesser General Public License along with this library; if not, write
+ * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Image_Graph
+ */
+
+/**
+ * Include file Image/Graph/Line/Formatted.php
+ */
+require_once 'Image/Graph/Line/Formatted.php';
+
+/**
+ * Dotted line style.
+ *
+ * This style displays as a short line with a shorter space afterwards, i.e
+ * 1px color1, 1px color2, 1px color1, etc.
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Image_Graph
+ */
+class Image_Graph_Line_Dotted extends Image_Graph_Line_Formatted
+{
+
+ /**
+ * DottedLine [Constructor]
+ *
+ * @param mixed $color1 The color representing the dots
+ * @param mixed $color2 The color representing the spaces
+ */
+ function Image_Graph_Line_Dotted($color1, $color2)
+ {
+ parent::Image_Graph_Line_Formatted(array ($color1, $color2));
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/config/archive/dspam/pear/Image/Graph/Line/Formatted.php b/config/archive/dspam/pear/Image/Graph/Line/Formatted.php
new file mode 100644
index 00000000..e6d0181b
--- /dev/null
+++ b/config/archive/dspam/pear/Image/Graph/Line/Formatted.php
@@ -0,0 +1,90 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Image_Graph - PEAR PHP OO Graph Rendering Utility.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version. This library 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 Lesser
+ * General Public License for more details. You should have received a copy of
+ * the GNU Lesser General Public License along with this library; if not, write
+ * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Image_Graph
+ */
+
+/**
+ * Include file Image/Graph/Line/Solid.php
+ */
+require_once 'Image/Graph/Line/Solid.php';
+
+/**
+ * Formatted user defined line style.
+ *
+ * Use this to create a user defined line style. Specify an array of colors that are to
+ * be used for displaying the line.
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Image_Graph
+ */
+class Image_Graph_Line_Formatted extends Image_Graph_Line_Solid
+{
+
+ /**
+ * The style of the line
+ *
+ * @var array
+ * @access private
+ */
+ var $_style;
+
+ /**
+ * Image_Graph_FormattedLine [Constructor]
+ *
+ * @param array $style The style of the line
+ */
+ function Image_Graph_Line_Formatted($style)
+ {
+ parent::Image_Graph_Line_Solid(reset($style));
+ $this->_style = $style;
+ }
+
+ /**
+ * Gets the line style of the element
+ *
+ * @return int A GD linestyle representing the line style
+ * @see Image_Graph_Line
+ * @access private
+ */
+ function _getLineStyle()
+ {
+ return array(
+ 'color' => $this->_style,
+ 'thickness' => $this->_thickness
+ );
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/config/archive/dspam/pear/Image/Graph/Line/Solid.php b/config/archive/dspam/pear/Image/Graph/Line/Solid.php
new file mode 100644
index 00000000..e77e62f1
--- /dev/null
+++ b/config/archive/dspam/pear/Image/Graph/Line/Solid.php
@@ -0,0 +1,105 @@
+<?php
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Image_Graph - PEAR PHP OO Graph Rendering Utility.
+ *
+ * PHP versions 4 and 5
+ *
+ * LICENSE: This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version. This library 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 Lesser
+ * General Public License for more details. You should have received a copy of
+ * the GNU Lesser General Public License along with this library; if not, write
+ * to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id$
+ * @link http://pear.php.net/package/Image_Graph
+ */
+
+/**
+ * Include file Image/Graph/Common.php
+ */
+require_once 'Image/Graph/Common.php';
+
+/**
+ * Simple colored line style.
+ *
+ * Use a color for line style.
+ *
+ * @category Images
+ * @package Image_Graph
+ * @subpackage Line
+ * @author Jesper Veggerby <pear.nosey@veggerby.dk>
+ * @copyright Copyright (C) 2003, 2004 Jesper Veggerby Hansen
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Image_Graph
+ */
+class Image_Graph_Line_Solid extends Image_Graph_Common
+{
+
+ /**
+ * The thickness of the line (requires GD 2)
+ * @var int
+ * @access private
+ */
+ var $_thickness = 1;
+
+ /**
+ * The color of the line
+ * @var mixed
+ * @access private
+ */
+ var $_color;
+
+ /**
+ * Image_Graph_SolidLine [Constructor]
+ *
+ * @param mixed $color The color of the line
+ */
+ function Image_Graph_Line_Solid($color)
+ {
+ parent::Image_Graph_Common();
+ $this->_color = $color;
+ }
+
+ /**
+ * Set the thickness of the linestyle
+ *
+ * @param int $thickness The line width in pixels
+ */
+ function setThickness($thickness)
+ {
+ $this->_thickness = $thickness;
+ }
+
+ /**
+ * Gets the line style of the element
+ *
+ * @return int A GD linestyle representing the line style
+ * @see Image_Graph_Line
+ * @access private
+ */
+ function _getLineStyle()
+ {
+ return array(
+ 'color' => $this->_color,
+ 'thickness' => $this->_thickness
+ );
+ }
+
+}
+
+?> \ No newline at end of file