/** * Creates a new overlay * * @param ImageResource $aOverlay The overlay to apply * @param number $aOpacity The opacity between 0 and 100 * @param number $startX start X pixel of the overlay * @param number $startY start Y pixel of the overlay * @param boolean $fill Fill the overlay using the height of the original image, or use the size of the overlay */ public function __construct(ImageResource $overlay, $opacity = 50, $startX = 0, $startY = 0, $fill = true) { $this->startX = Args::int($startX, 'startX')->required()->min(0)->value(); $this->startY = Args::int($startY, 'startY')->required()->min(0)->value(); $this->opacity = Args::int($opacity, 'opacity')->required()->min(1)->max(100)->value(); $this->fill = Args::bool($fill, 'fill')->required()->value(); $this->overlay = $overlay; }
/** * @param number $height the height of the shadow * @param string $includeOriginal include the original image in the shadow, or just create only shadow * @param string $backgroundColor the background color * @param number $startOpacity the start opacity * @param number $divLineHeight the div line height between the image and the shadow */ public function __construct($height, $includeOriginal = true, $backgroundColor = 'ffffff', $startOpacity = 30, $divLineHeight = 0) { $this->height = Args::int($height, 'height')->required()->min(1)->value(); $this->startOpacity = Args::int($startOpacity, 'Start Opacity')->required()->min(0)->max(100)->value(); $this->includeOriginal = Args::bool($includeOriginal, 'includeOriginal')->required()->value(); $this->backgroundColor = $backgroundColor instanceof Color ? $backgroundColor : new Color($backgroundColor); $this->divLineHeight = Args::int($divLineHeight, 'divLineHeight')->required()->min(0)->value(); }
/** * Creates a new ImageFilterFlip * * @param boolean $aHorizontal Flip horizontal * @param boolean $aVertical Flip vertical * */ public function __construct($horizontal = true, $vertical = false) { $this->horizontal = Args::bool($horizontal)->required()->value(); $this->vertical = Args::bool($vertical)->required()->value(); }
/** * Creates a new CenteredPixelStrategy * * @param $aNewWidth int * @param $aNewHeight int * @param $aRespectSmallerImage boolean */ public function __construct($newWidth, $newHeight, $respectSmallerImage = true) { $this->newWidth = Args::int($newWidth, 'newWidth')->required()->min(0)->value(); $this->newHeight = Args::int($newHeight, 'newHeight')->required()->min(0)->value(); $this->respectSmallerImage = Args::bool($respectSmallerImage, 'respect smaller image')->required()->value(); }