__init__ constructor
Leave feedback
On this page
Initializes a rectangle from corner coordinates and dimensions.
def __init__(self, x, y, width, height):
...
| Parameter | Type | Description |
|---|---|---|
| x | int |
Top-left horizontal offset in pixels. |
| y | int |
Top-left vertical offset in pixels. |
| width | int |
Area width in pixels. |
| height | int |
Area height in pixels. |
from groupdocs.redaction.options.drawing import Rectangle
# Create a rectangle at (40, 40) with width 120 and height 40
rect = Rectangle(40, 40, 120, 40)
Initializes a rectangle from a top-left point and region size.
def __init__(self, location, size):
...
| Parameter | Type | Description |
|---|---|---|
| location | Point |
Top-left corner of the area. |
| size | Size |
Width and height of the area. |
- 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.