# Player_Media::crop_square()

The square, in source pixels, that is shown for a focal point and zoom.

Follows how the browser draws it: the image fills a square (`object-fit: cover`) at `object-position` x% y%, then it is scaled by
the zoom around the same point. The editor preview uses the same formula, so what the player sees is what is saved.

```php
crop_square( int $width, int $height, float $x, float $y, float $zoom ): array
```

## Parameters

- `$width` (int) Source width in pixels.
- `$height` (int) Source height in pixels.
- `$x` (float) Focal point, 0 to 1.
- `$y` (float) Focal point, 0 to 1.
- `$zoom` (float) Zoom, 1 to MAX_ZOOM.

## Return

`array{left: int, top: int, side: int}` 

## Changelog

| Version | Description |
| --- | --- |
| 1.6.3 | Introduced |
