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(x_1: number, y_1: number, x_2: number, y_2: 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 x_1 X coordinate of the top left point
    @param y_1 Y coordinate of the top left point
    @param x_2 X coordinate of the bottom right point
    @param y_2 Y coordinate of the bottom right point

    Parameters

    • x_1: number
    • y_1: number
    • x_2: number
    • y_2: 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

  • clamp_to_pixel(): 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
  • from_vertices(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

  • get_area(): number
  • get_height(): number
  • get_origin(): [number, number]
  • get_size(): [number, number]
  • get_width(): number
  • get_x(): number
  • get_y(): number
  • init(x_1: number, y_1: number, x_2: number, y_2: number): 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

  • init_rect(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

  • set_origin(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

  • set_size(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(x_1: number, y_1: number, x_2: number, y_2: 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 x_1 X coordinate of the top left point
    @param y_1 Y coordinate of the top left point
    @param x_2 X coordinate of the bottom right point
    @param y_2 Y coordinate of the bottom right point

    Parameters

    • x_1: number
    • y_1: number
    • x_2: number
    • y_2: 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