From 07cf2c4b20230ddedee1bf9dddc1e7cd407385f5 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 5 Feb 2015 10:02:24 -0200 Subject: Packages repo cleanup: - Drop support for pfSense < 2 - Remove archive/, old files can be reached using git - Remove old and unused packages - Move stale files from config subdir to a package subdir --- .../dspam/pear/Image/Graph/Axis/Logarithmic.php | 152 --------------------- 1 file changed, 152 deletions(-) delete mode 100644 config/archive/dspam/pear/Image/Graph/Axis/Logarithmic.php (limited to 'config/archive/dspam/pear/Image/Graph/Axis/Logarithmic.php') diff --git a/config/archive/dspam/pear/Image/Graph/Axis/Logarithmic.php b/config/archive/dspam/pear/Image/Graph/Axis/Logarithmic.php deleted file mode 100644 index 2675ee4c..00000000 --- a/config/archive/dspam/pear/Image/Graph/Axis/Logarithmic.php +++ /dev/null @@ -1,152 +0,0 @@ - - * @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/Axis.php - */ -require_once 'Image/Graph/Axis.php'; - -/** - * Diplays a logarithmic axis (either X- or Y-axis). - * - * @category Images - * @package Image_Graph - * @subpackage Axis - * @author Jesper Veggerby - * @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_Axis_Logarithmic extends Image_Graph_Axis -{ - - /** - * Image_Graph_AxisLogarithmic [Constructor]. - * - * Normally a manual creation should not be necessary, axis are - * created automatically by the {@link Image_Graph_Plotarea} constructor - * unless explicitly defined otherwise - * - * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X - * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- - * axis) - */ - function Image_Graph_Axis_Logarithmic($type = IMAGE_GRAPH_AXIS_X) - { - parent::Image_Graph_Axis($type); - $this->showLabel(IMAGE_GRAPH_LABEL_MINIMUM + IMAGE_GRAPH_LABEL_MAXIMUM); - $this->_minimum = 1; - $this->_minimumSet = true; - } - - /** - * Calculate the label interval - * - * If explicitly defined this will be calucated to an approximate best. - * - * @return double The label interval - * @access private - */ - function _calcLabelInterval() - { - $result = parent::_calcLabelInterval(); - $this->_axisValueSpan = $this->_value($this->_axisSpan); - return $result; - } - - /** - * Preprocessor for values, ie for using logarithmic axis - * - * @param double $value The value to preprocess - * @return double The preprocessed value - * @access private - */ - function _value($value) - { - return log10($value) - log10($this->_minimum); - } - - /** - * Get next label point - * - * @param doubt $point The current point, if omitted or false, the first is - * returned - * @return double The next label point - * @access private - */ - function _getNextLabel($currentLabel = false, $level = 1) - { - if (is_array($this->_labelOptions[$level]['interval'])) { - return parent::_getNextLabel($currentLabel, $level); - } - - if ($currentLabel !== false) { - $value = log10($currentLabel); - $base = floor($value); - $frac = $value - $base; - for ($i = 2; $i < 10; $i++) { - if ($frac <= (log10($i)-0.01)) { - $label = pow(10, $base)*$i; - if ($label > $this->_getMaximum()) { - return false; - } else { - return $label; - } - } - } - return pow(10, $base+1); - } - - return max(1, $this->_minimum); - } - - /** - * Get the axis intersection pixel position - * - * This is only to be called prior to output! I.e. between the user - * invokation of Image_Graph::done() and any actual output is performed. - * This is because it can change the axis range. - * - * @param double $value the intersection value to get the pixel-point for - * @return double The pixel position along the axis - * @access private - */ - function _intersectPoint($value) - { - if (($value <= 0) && ($value !== 'max') && ($value !== 'min')) { - $value = 1; - } - return parent::_intersectPoint($value); - } - -} - -?> \ No newline at end of file -- cgit v1.2.3