protected function before($attribs) { parent::before($attribs); $surface = $this->document->getSurface(); $surface->save(); $this->applyTransform($attribs); }
protected function before($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']; } parent::before($attributes); $document = $this->getDocument(); $link = $attributes["xlink:href"]; $this->reference = $document->getDef($link); $surface = $document->getSurface(); $surface->save(); $surface->translate($this->x, $this->y); }