crop method
Leave feedback
On this page
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: Rectangle: A new cropped rectangle.
- class
Rectangle
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.