Gjsify LogoGjsify Logo

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

record

Hierarchy

  • ActorBox

Index

Constructors

  • new ActorBox(x1: number, y1: number, x2: number, y2: number): ActorBox
  • Allocates a new #ClutterActorBox using the passed coordinates for the top left and bottom right points.

    This function is the logical equivalent of:

    |[ clutter_actor_box_init (clutter_actor_box_alloc (), x_1, y_1, x_2, y_2);


    @constructor
    @param x1 X coordinate of the top left point
    @param y1 Y coordinate of the top left point
    @param x2 X coordinate of the bottom right point
    @param y2 Y coordinate of the bottom right point

    Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns ActorBox

Properties

x1: number

X coordinate of the top left corner

field
x2: number

X coordinate of the bottom right corner

field
y1: number

Y coordinate of the top left corner

field
y2: number

Y coordinate of the bottom right corner

field
name: string

Methods

  • clampToPixel(): void
  • contains(x: number, y: number): boolean
  • Checks whether a point with x, y coordinates is contained withing box

    Parameters

    • x: number

      X coordinate of the point

    • y: number

      Y coordinate of the point

    Returns boolean

  • free(): void
  • Frees a #ClutterActorBox allocated using clutter_actor_box_new() or clutter_actor_box_copy()

    Returns void

  • fromVertices(verts: Vertex[]): void
  • Calculates the bounding box represented by the four vertices; for details of the vertex array see clutter_actor_get_abs_allocation_vertices().

    Parameters

    • verts: Vertex[]

      array of four #ClutterVertex

    Returns void

  • getArea(): number
  • getHeight(): number
  • getOrigin(): [number, number]
  • getSize(): [number, number]
  • getWidth(): number
  • getX(): number
  • getY(): number
  • init(x1: number, y1: number, x2: number, y2: number): ActorBox
  • Initializes box with the given coordinates.

    Parameters

    • x1: number

      X coordinate of the top left point

    • y1: number

      Y coordinate of the top left point

    • x2: number

      X coordinate of the bottom right point

    • y2: number

      Y coordinate of the bottom right point

    Returns ActorBox

  • initRect(x: number, y: number, width: number, height: number): void
  • 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

  • Interpolates between initial and final #ClutterActorBoxes using progress

    Parameters

    • final: ActorBox

      the final #ClutterActorBox

    • progress: number

      the interpolation progress

    Returns ActorBox

  • setOrigin(x: number, y: number): void
  • Changes the origin of box, maintaining the size of the #ClutterActorBox.

    Parameters

    • x: number

      the X coordinate of the new origin

    • y: number

      the Y coordinate of the new origin

    Returns void

  • setSize(width: number, height: number): void
  • Sets the size of box, maintaining the origin of the #ClutterActorBox.

    Parameters

    • width: number

      the new width

    • height: number

      the new height

    Returns void

  • new(x1: number, y1: number, x2: number, y2: number): ActorBox
  • Allocates a new #ClutterActorBox using the passed coordinates for the top left and bottom right points.

    This function is the logical equivalent of:

    |[ clutter_actor_box_init (clutter_actor_box_alloc (), x_1, y_1, x_2, y_2);


    @constructor
    @param x1 X coordinate of the top left point
    @param y1 Y coordinate of the top left point
    @param x2 X coordinate of the bottom right point
    @param y2 Y coordinate of the bottom right point

    Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns ActorBox

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method