vpi.RectangleI

class vpi.RectangleI(x: int, y: int, width: int, height: int) vpi.RectangleI

Create a rectangle.

A rectangle is defined by its start position (x, y) and size (width, height). One example of usage is in creating a view on an image, a rectangle defines the view region inside the image.

Parameters
  • x (int) – The x-coordinate position of the rectangle.

  • y (int) – The y-coordinate position of the rectangle.

  • width (int) – The width of the rectangle.

  • height (int) – The height of the rectangle.

Returns

The rectangle.

Return type

vpi.RectangleI

Attributes

dtype

Data type of the rectangle fields.

height

Rectangle height size.

width

Rectangle width size.

x

Rectangle x-coordinate start position.

y

Rectangle y-coordinate start position.