commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / vendor / phenx / php-svg-lib / src / Svg / Tag / Ellipse.php
1 <?php
2 /**
3 * @package php-svg-lib
4 * @link http://github.com/PhenX/php-svg-lib
5 * @author Fabien Ménager <fabien.menager@gmail.com>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7 */
8
9 namespace Svg\Tag;
10
11 class Ellipse extends Shape
12 {
13 protected $cx = 0;
14 protected $cy = 0;
15 protected $rx = 0;
16 protected $ry = 0;
17
18 public function start($attribs)
19 {
20 parent::start($attribs);
21
22 if (isset($attribs['cx'])) {
23 $this->cx = $attribs['cx'];
24 }
25 if (isset($attribs['cy'])) {
26 $this->cy = $attribs['cy'];
27 }
28 if (isset($attribs['rx'])) {
29 $this->rx = $attribs['rx'];
30 }
31 if (isset($attribs['ry'])) {
32 $this->ry = $attribs['ry'];
33 }
34
35 $this->document->getSurface()->ellipse($this->cx, $this->cy, $this->rx, $this->ry, 0, 0, 360, false);
36 }
37 }