protected function before($attribs) { $surface = $this->document->getSurface(); $surface->save(); $style = new Style(); $style->inherit($this); $style->fromAttributes($attribs); $this->setStyle($style); $surface->setStyle($style); $this->applyTransform($attribs); }
/** * Make a style object from the tag and its attributes * * @param array $attributes * * @return Style */ protected function makeStyle($attributes) { $style = new Style(); $style->inherit($this); $style->fromStyleSheets($this, $attributes); $style->fromAttributes($attributes); return $style; }