Class Index | File Index

Classes


Class createjs.BoundingBox


Extends .

Defined in: bounding_box.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
A class representing a bounding box.
Field Summary
Field Attributes Field Name and Description
 
The right position of this bounding box.
 
The bottom position of this bounding box.
 
The left position of this bounding box.
 
The top position of this bounding box.
Method Summary
Method Attributes Method Name and Description
 
addMargin(margin)
Adds the specified margin to this box.
<static>  
createjs.BoundingBox.clone(box)
Returns a clone of the specified box.
 
contain(x, y)
 
Returns whether this box contains the specified one.
 
Returns the height of this bounding box.
 
Returns the x position of this bounding box.
 
Returns the y position of this bounding box.
 
Returns the width of this bounding box.
 
Returns whether this box has intersection with the specified one.
 
inflate(box)
Inflates this bounding box.
 
isDirty(width, height)
Returns whether this box has intersections with the specified rectangle (0,0)-(width,height).
 
 
isEqual(box)
Returns whether this box is an empty one.
 
needClip(width, height)
Returns whether this box is a subset of the specified rectangle (0,0)-(width,height).
 
Resets all properties of this object to the initial state.
 
update(x, y)
Updates this bounding box.
Class Detail
createjs.BoundingBox()
A class representing a bounding box.
Field Detail
maxX
The right position of this bounding box.

maxY
The bottom position of this bounding box.

minX
The left position of this bounding box.

minY
The top position of this bounding box.
Method Detail
addMargin(margin)
Adds the specified margin to this box.
Parameters:
{number} margin

<static> {createjs.BoundingBox} createjs.BoundingBox.clone(box)
Returns a clone of the specified box.
Parameters:
{createjs.BoundingBox} box
Returns:
{createjs.BoundingBox}

contain(x, y)
Parameters:
x
y

{boolean} containBox(box)
Returns whether this box contains the specified one.
Parameters:
{createjs.BoundingBox} box
Returns:
{boolean}

{number} getHeight()
Returns the height of this bounding box.
Returns:
{number}

{number} getLeft()
Returns the x position of this bounding box.
Returns:
{number}

{number} getTop()
Returns the y position of this bounding box.
Returns:
{number}

{number} getWidth()
Returns the width of this bounding box.
Returns:
{number}

{boolean} hasIntersection(box)
Returns whether this box has intersection with the specified one.
Parameters:
{createjs.BoundingBox} box
Returns:
{boolean}

inflate(box)
Inflates this bounding box.
Parameters:
{createjs.BoundingBox} box

{boolean} isDirty(width, height)
Returns whether this box has intersections with the specified rectangle (0,0)-(width,height). This method is used by a renderer to determine if it needs to redraw its objects.
Parameters:
{number} width
{number} height
Returns:
{boolean}

isEmpty()

{boolean} isEqual(box)
Returns whether this box is an empty one.
Parameters:
{createjs.BoundingBox} box
Returns:
{boolean}

{boolean} needClip(width, height)
Returns whether this box is a subset of the specified rectangle (0,0)-(width,height). This method is used by a renderer to calculate its clipping rectangle.
Parameters:
{number} width
{number} height
Returns:
{boolean}

reset()
Resets all properties of this object to the initial state.

update(x, y)
Updates this bounding box.
Parameters:
{number} x
{number} y

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 04 2016 17:11:27 GMT+0900 (JST)