Rectangle

Properties


Methods

update

update(
   x: (int|None) = None, y: (int|None) = None, w: (int|None) = None, h: (int|None) = None,
   label: (Label|None) = None, text: (str|None) = None
)

Description

Update this rectangle with new coordinates or new label.

Examples

rect.update(x=10, label=label_car)

Arguments

  • x (int, optional) : New x coordinate of this Rectangle. Defaults to None.

  • y (int, optional) : New y coordinate of this Rectangle. Defaults to None.

  • w (int, optional) : New width of this Rectangle. Defaults to None.

  • h (int, optional) : New height of this Rectangle. Defaults to None.

  • label (Label, optional) : New label of this Rectangle. Defaults to None.

  • text (str, optional) : New ocr text of this Rectangle. Defaults to None.


delete

delete()

Description

Delete this rectangle from the platform.

⚠️ DANGER ZONE: Be very careful here!

Examples

rect.delete()