public function perform(Zend_Image_Adapter_AdapterAbstract $adapter) { if (!$this->flop() && !$this->flip()) { require_once 'Zend/Image/Exception.php'; throw new Zend_Image_Exception('No axis specified to mirror'); } return parent::perform($adapter); }
/** * Parse the inital options for the line * * @param array $options An array with the options of the line */ public function __construct($options = array()) { $this->_pointStart = new Zend_Image_Point(); $this->_pointEnd = new Zend_Image_Point(); return parent::__construct($options); }
public function perform(Zend_Image_Adapter_AdapterAbstract $adapter) { $newX = $this->getXAmount(); $newY = $this->getYAmount(); if (null === $newX && null === $newY) { throw new Zend_Image_Action_Exception('No dimensions for resizing were specified, ' . 'at least one dimension should be specified.'); } $constrain = $this->hasConstrainedProportions(); if (null === $newX) { if ($constrain) { $newX = 0; } else { $newX = $adapter->getWidth(); } } elseif (self::TYPE_RELATIVE == $this->getXType()) { $newX *= $adapter->getWidth() / 100; } if (null === $newY) { if ($constrain) { $newY = 0; } else { $newY = $adapter->getHeight(); } } elseif (self::TYPE_RELATIVE == $this->getYType()) { $newY *= $adapter->getHeight() / 100; } $this->_yAmountCalculated = $newY; $this->_xAmountCalculated = $newX; return parent::perform($adapter); }
/** * Parse the inital options for the ellipse * * @param array $options An array with the options of the ellipse */ public function __construct($options = array()) { $this->_location = new Zend_Image_Point(); return parent::__construct($options); }