Rectangle

class omni.ui.scene.Rectangle

Bases: AbstractShape

Methods

__init__(self[, width, height])

Construct a rectangle with predefined size.

get_gesture_payload(*args, **kwargs)

Overloaded function.

Attributes

axis

The axis the rectangle is perpendicular to.

color

The color of the line.

gesture_payload

Contains all the information about the intersection.

height

The size of the rectangle.

intersection_thickness

The thickness of the line for the intersection.

thickness

The thickness of the line.

width

The size of the rectangle.

wireframe

When true, it's a line.

__init__(self: omni.ui_scene._scene.Rectangle, width: float = 1.0, height: float = 1.0, **kwargs) None

Construct a rectangle with predefined size.

### Arguments:

`width :`

The size of the rectangle

`height :`

The size of the rectangle

`kwargsdict`

See below

### Keyword Arguments:

`width`

The size of the rectangle.

`height`

The size of the rectangle.

`thickness`

The thickness of the line.

`intersection_thickness`

The thickness of the line for the intersection.

`color`

The color of the line.

`axis`

The axis the rectangle is perpendicular to.

`wireframe`

When true, it’s a line. When false it’s a mesh.

`gesture`

All the gestures assigned to this shape.

`gestures`

All the gestures assigned to this shape.

`visible`

This property holds whether the item is visible.

get_gesture_payload(*args, **kwargs)

Overloaded function.

  1. get_gesture_payload(self: omni.ui_scene._scene.Rectangle) -> omni.ui_scene._scene.RectangleGesturePayload

Contains all the information about the intersection.

  1. get_gesture_payload(self: omni.ui_scene._scene.Rectangle, arg0: omni.ui_scene._scene.GestureState) -> omni.ui_scene._scene.RectangleGesturePayload

Contains all the information about the intersection at the specific state.

property axis

The axis the rectangle is perpendicular to.

property color

The color of the line.

property gesture_payload

Contains all the information about the intersection.

property height

The size of the rectangle.

property intersection_thickness

The thickness of the line for the intersection.

property thickness

The thickness of the line.

property width

The size of the rectangle.

property wireframe

When true, it’s a line. When false it’s a mesh.