| 1 | <?php |
||
| 17 | class ClipRect implements \JsonSerializable |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Width. |
||
| 21 | * |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $width; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Height. |
||
| 28 | * |
||
| 29 | * @var int |
||
| 30 | */ |
||
| 31 | private $height; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Top. |
||
| 35 | * |
||
| 36 | * @var int |
||
| 37 | */ |
||
| 38 | private $top; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Left. |
||
| 42 | * |
||
| 43 | * @var int |
||
| 44 | */ |
||
| 45 | private $left; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Internal constructor. |
||
| 49 | * |
||
| 50 | * @param int $width |
||
| 51 | * @param int $height |
||
| 52 | * @param int $top (default: 0) |
||
| 53 | * @param int $left (default: 0) |
||
| 54 | */ |
||
| 55 | public function __construct($width, $height, $top = 0, $left = 0) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Format data for JSON serialization. |
||
| 65 | * |
||
| 66 | * @return array |
||
| 67 | */ |
||
| 68 | public function jsonSerialize() |
||
| 77 | } |
||
| 78 |