Constructor
new Rectangle(bbox, rotationopt)
Creates a new Rectangle from a BoundingBox and an optional rotation.
Name | Type | Attributes | Description |
---|---|---|---|
bbox | BoundingBox | The BoundingBox of the rectangle. | |
rotation | number | | <optional> | The rotation of the rectangle, if any. |
- Source
Classes
Members
area
Returns the area of the rectangle.
- Source
bbox
Returns the size of the rectangle.
- Source
bottom
Returns the bottom of the rectangle as a Point2D.
- Source
bottom_left
Returns the bottom left corner of the rectangle as a Point2D.
- Source
bottom_right
Returns the bottom right corner of the rectangle as a Point2D.
- Source
center
Returns the center of the rectangle as a Point2D.
- Source
left
Returns the left of the rectangle as a Point2D.
- Source
position
Returns the position of the rectangle.
- Source
right
Returns the right of the rectangle as a Point2D.
- Source
rotation
Returns the rotation of the rectangle.
- Source
top
Returns the top of the rectangle as a Point2D.
- Source
top_left
Returns the top left corner of the rectangle as a Point2D.
- Source
top_right
Returns the top right corner of the rectangle as a Point2D.
- Source
vector_object_builder
Gets a VectorObjectBuilder with the rectangle's points.
- Source