* @package cleversvg * @subpackage gradients */ class csRadialGradient extends csBaseGradient { protected $stops = array(), $xml_node_name = 'radialGradient'; /** * Class constructor * */ public function __construct($cx=null, $cy=null, $fx=null, $fy=null, $r=null, $attrs=array()) { $this->setCx($cx); $this->setCy($cy); $this->setFx($fx); $this->setFy($fy); $this->setRadius($r); $this->attributes = array_merge($attrs, $this->attributes); } /** * The start x-axis coordinate of the gradient center point (can be a * percentage) * * @param mixed */ public function setCx($cx) { $this->setAttribute('cx', $cx); } /** * The start y-axis coordinate of the gradient center point (can be a * percentage) * * @param mixed */ public function setCy($cy) { $this->setAttribute('cy', $cy); } /** * The end x-axis coordinate of the finish gradient point (can be a * percentage) * * @param mixed */ public function setFx($fx) { $this->setAttribute('fx', $fx); } /** * The end y-axis coordinate of the finish gradient point (can be a * percentage) * * @param mixed */ public function setFy($fy) { $this->setAttribute('fy', $fy); } /** * Sets the radius of the radial gradient (can be a percentage) * * @param int $radius */ public function setRadius($radius) { $this->setAttribute('r', $radius); } }