PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
phenx
/
php-svg-lib
/
src
/
Svg
/
Tag
<?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; use Svg\Style; class Line extends Shape { protected $x1 = 0; protected $y1 = 0; protected $x2 = 0; protected $y2 = 0; public function start($attributes) { $height = $this->document->getHeight(); $width = $this->document->getWidth(); if (isset($attributes['x1'])) { $this->x1 = $this->convertSize($attributes['x1'], $width); } if (isset($attributes['y1'])) { $this->y1 = $this->convertSize($attributes['y1'], $height); } if (isset($attributes['x2'])) { $this->x2 = $this->convertSize($attributes['x2'], $width); } if (isset($attributes['y2'])) { $this->y2 = $this->convertSize($attributes['y2'], $height); } $surface = $this->document->getSurface(); $surface->moveTo($this->x1, $this->y1); $surface->lineTo($this->x2, $this->y2); } }
[-] Polyline.php
[edit]
[-] Ellipse.php
[edit]
[+]
..
[-] StyleTag.php
[edit]
[-] AbstractTag.php
[edit]
[-] Rect.php
[edit]
[-] Path.php
[edit]
[-] Shape.php
[edit]
[-] RadialGradient.php
[edit]
[-] Polygon.php
[edit]
[-] Stop.php
[edit]
[-] UseTag.php
[edit]
[-] Image.php
[edit]
[-] Anchor.php
[edit]
[-] Text.php
[edit]
[-] LinearGradient.php
[edit]
[-] ClipPath.php
[edit]
[-] Line.php
[edit]
[-] Circle.php
[edit]
[-] Group.php
[edit]