PHP Интерфейс Sulu\Bundle\MediaBundle\Media\ImageConverter\Cropper\CropperInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
crop ( Imagine\Image\ImageInterface $image, integer $x, integer $y, integer $width, $height ) : Imagine\Image\ImageInterface Crops an image according to the given parameters. The crop has to be valid.
isValid ( Imagine\Image\ImageInterface $image, integer $x, integer $y, integer $width, integer $height, array $format ) : boolean Returns true iff a crop defined by the crop parameters is valid on a given image with respect to a given format.

Описание методов

crop() публичный Метод

Crops an image according to the given parameters. The crop has to be valid.
public crop ( Imagine\Image\ImageInterface $image, integer $x, integer $y, integer $width, $height ) : Imagine\Image\ImageInterface
$image Imagine\Image\ImageInterface The image to crop
$x integer The x value of the point from where the crop area starts
$y integer The y value of the point from where the crop area starts
$width integer The width of the crop area
Результат Imagine\Image\ImageInterface

isValid() публичный Метод

Returns true iff a crop defined by the crop parameters is valid on a given image with respect to a given format.
public isValid ( Imagine\Image\ImageInterface $image, integer $x, integer $y, integer $width, integer $height, array $format ) : boolean
$image Imagine\Image\ImageInterface The image to crop
$x integer The x value of the point from where the crop area starts
$y integer The y value of the point from where the crop area starts
$width integer The width of the crop area
$height integer The height of the crop area
$format array The format definition
Результат boolean