* @package cleversvg * @subpackage elements */ class csCircle extends csBaseShape { protected $xml_node_name = 'circle'; /** * Class constructor * */ public function __construct($cx=null, $cy=null, $radius=null, $attrs=array()) { $this->setCx($cx); $this->setCy($cy); $this->setRadius($radius); $this->attributes = array_merge($attrs, $this->attributes); } /** * The x-axis coordinate of the center of the circle. * * @param int $cx */ public function setCx($cx) { $this->setAttribute('cx', $cx); } /** * The y-axis coordinate of the center of the circle. * * @param int $cy */ public function setCy($cy) { $this->setAttribute('cy', $cy); } /** * setCx alias * */ public function setX($x) { return $this->setCx($x); } /** * setCy alias * */ public function setY($y) { return $this->setCy($y); } /** * Sets the radius of the circle * * @param int $radius */ public function setRadius($radius) { $this->setAttribute('r', $radius); } }