API Docs for: 0.0.2
Show:

Atlantis.Rectangle Class

Module: Framework
Parent Module: Atlantis

Create a rectangle structure.

Constructor

Atlantis.Rectangle

(
  • x
  • y
  • width
  • height
)

Parameters:

  • x Number

    A value for X coordinate.

  • y Number

    A value for Y coordinate.

  • width Number

    A value for the width of the rectangle.

  • height Number

    A value for the height of the rectangle

Methods

add

(
  • rectangle
)

Add a rectangle to this rectangle.

Parameters:

contains

(
  • X
  • Y
)

Determine if a Rectangle, Point or coordinates are contains in rectangle

Parameters:

  • X Number | Point | Rectangle

    coordinate or an instance of Point or an instance of Rectangle.

  • Y Number

    coordinate.

contains

()

divide

(
  • rectangle
)

Divide a rectangle to this rectangle.

Parameters:

getBottom

() Number

Gets the bottom value.

Returns:

Number:

Bottom coordinate (y + height)

getCenter

() Atlantis.Point

Gets the center of the rectangle.

Returns:

Atlantis.Point:

A point of the center of the rectangle.

getLeft

() Number

Gets the left value.

Returns:

Number:

Left coordinate (x)

getRight

() Number

Gets the right value.

Returns:

Number:

Right value (x + width)

getTop

() Number

Gets the top value.

Returns:

Number:

Top coordinate (y)

multiply

(
  • rectangle
)

Multiply a rectangle to this rectangle.

Parameters:

subtract

(
  • rectangle
)

Subtract a rectangle to this rectangle.

Parameters:

toString

() String

Gets a string from this object.

Returns: