/** * post process background color if any * * {@inheritDoc} * */ public function process() { parent::process(); if (is_int($this->background)) { extract($this->getBackgroundCoordinates($this->getGravity())); imagefill($this->resource, $x1, $y1, $this->background); imagefill($this->resource, $x2, $y2, $this->background); } }
/** * filter * * @param mixed $name * @param mixed $options * @access public * @return boolean|void */ public function filter($name, array $options = []) { if (static::EXT_FILTER === parent::filter($name, $options) and isset($this->filters[$name])) { $filter = new $this->filters[$name]($this, $options); $filterResults = $filter->run(); if (!empty($filterResults)) { $this->commands = array_merge($this->commands, (array) $filterResults); } } }