1 | <?php |
||
10 | class Crop extends BaseManipulator |
||
11 | { |
||
12 | /** |
||
13 | * Perform crop image manipulation. |
||
14 | * @param Image $image The source image. |
||
15 | * @return Image The manipulated image. |
||
16 | */ |
||
17 | public function run(Image $image) |
||
34 | |||
35 | /** |
||
36 | * Resolve coordinates. |
||
37 | * @param Image $image The source image. |
||
38 | * @return int[] The resolved coordinates. |
||
39 | */ |
||
40 | public function getCoordinates(Image $image) |
||
65 | |||
66 | /** |
||
67 | * Limit coordinates to image boundaries. |
||
68 | * @param Image $image The source image. |
||
69 | * @param int[] $coordinates The coordinates. |
||
70 | * @return int[] The limited coordinates. |
||
71 | */ |
||
72 | public function limitToImageBoundaries(Image $image, array $coordinates) |
||
84 | } |
||
85 |