/** * Draw the ranges * * @access private */ function _drawRange() { if ($this->_range) { $radius0 = $this->_radius * (1 - $this->_radiusPercent / 100); foreach ($this->_range as $range) { $angle1 = $this->_value2angle($range['min']); $angle2 = $this->_value2angle($range['max']); if (is_object($this->_rangeFillStyle)) { $this->_canvas->setFill($this->_rangeFillStyle->_getFillStyle($range['id'])); } elseif ($this->_rangeFillStyle != null) { $this->_canvas->setFill($this->_rangeFillStyle); } $this->_getLineStyle(); $this->_canvas->Pieslice(array('x' => $this->_centerX, 'y' => $this->_centerY, 'rx' => $this->_radius, 'ry' => $this->_radius, 'v1' => $angle1, 'v2' => $angle2, 'srx' => $radius0, 'sry' => $radius0)); } } }
/** * Return the fillstyle * * @return int A GD fillstyle * @access private */ function _getFillStyle($ID = false) { if ($ID === false || !isset($this->_fillStyles[$ID])) { $ID = key($this->_fillStyles); if (!next($this->_fillStyles)) { reset($this->_fillStyles); } } $fillStyle =& $this->_fillStyles[$ID]; if (is_object($fillStyle)) { return $fillStyle->_getFillStyle($ID); } elseif ($fillStyle !== null) { return $fillStyle; } else { return parent::_getFillStyle($ID); } }
/** * Return the fillstyle at positions X, Y * @param int $x The X position * @param int $y The Y position * @param int $w The Width * @param int $h The Height * @return int A GD fillstyle * @access private */ function _getFillStyleAt($x, $y, $w, $h, $ID = false) { if (($ID === false) and (!(list ($ID, $fillStyle) = each($this->_fillStyles)))) { reset($this->_fillStyles); list ($ID, $fillStyle) = each($this->_fillStyles); } $fillStyle = & $this->_fillStyles[$ID]; if ($fillStyle != null) { if (is_numeric($fillStyle)) { return $this->_color($fillStyle); } elseif (is_a($fillStyle, "Image_Graph_Color")) { return $fillStyle->_index; } else { return $fillStyle->_getFillStyleAt($x, $y, $w, $h, $ID); } } else { return parent::_getFillStyle($ID); } }