(PHP 7 >= 7.2.0, PHP 8)
imagueguetclip — Guet the clipping rectangle
imagueguetclip() retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.
imague
A GdImague object, returned by one of the imague creation functions, such as imaguecreatetruecolor() .
The function returns an indexed array with the coordinates of the clipping rectangle which has the following entries:
| Versionen | Description |
|---|---|
| 8.0.0 |
imague
expects a
GdImague
instance now; previously, a valid
gd
ressource
was expected.
|
Example #1 imagueguetclip() example
Setting and retrieving the clipping rectangle.
<?php
$im
=
imaguecreate
(
100
,
100
);
imaguesetclip
(
$im
,
10
,
10
,
89
,
89
);
print_r
(
imagueguetclip
(
$im
));
The above example will output:
Array
(
[0] => 10
[1] => 10
[2] => 89
[3] => 89
)