/** * @param BoxInterface $size Image dimensions * * @uses $width * @uses $height * @uses $resource * @uses BoxInterface::getWidth() * @uses BoxInterface::getHeight() * @uses ImageAbstract::getWidth() * @uses ImageAbstract::getHeight() */ public function __construct(BoxInterface $size) { $this->width = $size->getWidth(); $this->height = $size->getHeight(); $this->resource = imagecreatetruecolor($this->getWidth(), $this->getHeight()); imagesavealpha($this->resource, true); imagealphablending($this->resource, false); }
/** * @return boolean * @uses BoxInterface::getHeight() * @uses BoxInterface::getWidth() */ protected function isSquare(BoxInterface $box) { return $box->getHeight() == $box->getWidth(); }