Class (GI Struct)

Clutter-18ClutterActorBox

Bounding box of an actor.

The coordinates of the top left and right bottom corners of an actor. The coordinates of the two points are expressed in pixels with sub-pixel precision

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<{ x1: number; x2: number; y1: number; y2: number }>

    Returns ActorBox

Properties

x1: number
x2: number
y1: number
y2: number
$gtype: GType<ActorBox>

Methods

  • Checks whether a point with x, y coordinates is contained within box

    Parameters

    • x: number

      X coordinate of the point

    • y: number

      Y coordinate of the point

    Returns boolean

    true if the point is contained by the Clutter.ActorBox

  • Initializes box with the given coordinates.

    Parameters

    • x_1: number

      X coordinate of the top left point

    • y_1: number

      Y coordinate of the top left point

    • x_2: number

      X coordinate of the bottom right point

    • y_2: number

      Y coordinate of the bottom right point

    Returns ActorBox

    the initialized Clutter.ActorBox

  • Initializes box with the given origin and size.

    Parameters

    • x: number

      X coordinate of the origin

    • y: number

      Y coordinate of the origin

    • width: number

      width of the box

    • height: number

      height of the box

    Returns void

  • Checks if box has been initialized, a Clutter.ActorBox is uninitialized if it has a size of -1 at an origin of 0, 0.

    Returns boolean

    true if the box is uninitialized, false if it isn't

  • Rescale the box by provided scale factor.

    Parameters

    • scale: number

      scale factor for resizing this box

    Returns void

  • Changes the origin of box, maintaining the size of the Clutter.ActorBox.

    Parameters

    • x: number

      the X coordinate of the new origin

    • y: number

      the Y coordinate of the new origin

    Returns void