API Documentation for: 0.6.1
Show:

Rectangle Class

Defined in: Rectangle:34
Module: EaselJS

Represents a rectangle as defined by the points (x, y) and (x+width, y+height).

Constructor

Rectangle

(
  • [x=0]
  • [y=0]
  • [width=0]
  • [height=0]
)

Defined in Rectangle:34

Parameters:

  • [x=0] Number optional

    X position.

  • [y=0] Number optional

    Y position.

  • [width=0] Number optional

    The width of the Rectangle.

  • [height=0] Number optional

    The height of the Rectangle.

Example:

 var rect = new createjs.Rectangle(0, 0, 100, 100);

Item Index

Properties

Methods

clone

() Rectangle

Defined in clone:95

Returns a clone of the Rectangle instance.

Returns:

Rectangle: a clone of the Rectangle instance.

initialize

() protected

Defined in initialize:82

Initialization method.

toString

() String

Defined in toString:104

Returns a string representation of this object.

Returns:

String: a string representation of the instance.

Properties

height

Number

Defined in height:74

Height.

width

Number

Defined in width:67

Width.

x

Number

Defined in x:53

X position.

y

Number

Defined in y:60

Y position.