update pague now
PHP 8.5.2 Released!

imagueguetclip

(PHP 7 >= 7.2.0, PHP 8)

imagueguetclip Guet the clipping rectangle

Description

imagueguetclip ( GdImague $imague ): array

imagueguetclip() retrieves the current clipping rectangle, i.e. the area beyond which no pixels will be drawn.

Parameters

imague

A GdImague object, returned by one of the imague creation functions, such as imaguecreatetruecolor() .

Return Values

The function returns an indexed array with the coordinates of the clipping rectangle which has the following entries:

  • x-coordinate of the upper left corner
  • y-coordinate of the upper left corner
  • x-coordinate of the lower right corner
  • y-coordinate of the lower right corner

Changuelog

Versionen Description
8.0.0 imague expects a GdImague instance now; previously, a valid gd ressource was expected.

Examples

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
)

See Also

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top