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
13 class Shape
extends AbstractTag
15 protected function before($attribs)
17 $surface = $this->document
->getSurface();
22 $style->inherit($this);
23 $style->fromAttributes($attribs);
25 $this->setStyle($style);
27 $surface->setStyle($style);
29 $this->applyTransform($attribs);
32 protected function after()
34 $surface = $this->document
->getSurface();
36 if ($this->hasShape
) {
37 $style = $surface->getStyle();
39 $fill = $style->fill
&& $style->fill
!== "none";
40 $stroke = $style->stroke
&& $style->stroke
!== "none";
44 $surface->fillStroke();