PHP Class Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\Cropper

Inheritance: implements Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\CropperInterface
Exibir arquivo Open project: sulu/sulu

Public Methods

Method Description
crop ( Imagine\Image\ImageInterface $image, $x, $y, $width, $height )
isValid ( Imagine\Image\ImageInterface $image, $x, $y, $width, $height, array $format )

Private Methods

Method Description
isInsideImage ( Imagine\Image\ImageInterface $image, $x, $y, $width, $height ) : boolean Returns true iff the cropping does not exceed the image borders.
isNotSmallerThanFormat ( $width, $height, array $format ) : boolean Returns true iff the crop is greater or equal to the size of a given format.

Method Details

crop() public method

public crop ( Imagine\Image\ImageInterface $image, $x, $y, $width, $height )
$image Imagine\Image\ImageInterface

isValid() public method

public isValid ( Imagine\Image\ImageInterface $image, $x, $y, $width, $height, array $format )
$image Imagine\Image\ImageInterface
$format array