Source of file Rect.php
Size: 1,141 Bytes - Last Modified: 2021-12-23T10:11:59+00:00
/var/www/docs.ssmods.com/process/src/ext/phenx/php-svg-lib/src/Svg/Tag/Rect.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445 | <?php /** * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager <fabien.menager@gmail.com> * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; class Rect extends Shape { protected $x = 0; protected $y = 0; protected $width = 0; protected $height = 0; protected $rx = 0; protected $ry = 0; public function start($attributes) { if (isset($attributes['x'])) { $this->x = $attributes['x']; } if (isset($attributes['y'])) { $this->y = $attributes['y']; } if (isset($attributes['width'])) { $this->width = $attributes['width']; } if (isset($attributes['height'])) { $this->height = $attributes['height']; } if (isset($attributes['rx'])) { $this->rx = $attributes['rx']; } if (isset($attributes['ry'])) { $this->ry = $attributes['ry']; } $this->document->getSurface()->rect($this->x, $this->y, $this->width, $this->height, $this->rx, $this->ry); } } |