* @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 * @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 ); } } ?>