crop method
crop
Creates a cropped version of the current rectangle by removing specified margins.
def crop(self, crop_left, crop_top, crop_right, crop_bottom):
...
| Parameter | Type | Description |
|---|---|---|
| crop_left | int |
The number of pixels to remove from the left side. |
| crop_top | int |
The number of pixels to remove from the top side. |
| crop_right | int |
The number of pixels to remove from the right side. |
| crop_bottom | int |
The number of pixels to remove from the bottom side. |
Returns: A new cropped rectangle.
See Also
- class
Rectangle