Docs updated Builds updated
This commit is contained in:
parent
b1b2e417a3
commit
69b3be322e
93 changed files with 6214 additions and 1190 deletions
|
@ -53,12 +53,16 @@
|
|||
|
||||
<li><a href="../classes/CanvasRenderer.html">CanvasRenderer</a></li>
|
||||
|
||||
<li><a href="../classes/Circle.html">Circle</a></li>
|
||||
|
||||
<li><a href="../classes/CustomRenderable.html">CustomRenderable</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
|
||||
|
||||
<li><a href="../classes/DisplayObjectContainer.html">DisplayObjectContainer</a></li>
|
||||
|
||||
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
|
||||
|
||||
<li><a href="../classes/Graphics.html">Graphics</a></li>
|
||||
|
||||
<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
|
||||
|
@ -195,6 +199,31 @@ PIXI.Rectangle.prototype.clone = function()
|
|||
return new PIXI.Rectangle(this.x, this.y, this.width, this.height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method contains
|
||||
* @param x {Number} The X coord of the point to test
|
||||
* @param y {Number} The Y coord of the point to test
|
||||
* @return if the x/y coords are within this polygon
|
||||
*/
|
||||
PIXI.Rectangle.prototype.contains = function(x, y)
|
||||
{
|
||||
if(this.width <= 0 || this.height <= 0)
|
||||
return false;
|
||||
|
||||
var x1 = this.x;
|
||||
if(x > x1 && x < x1 + this.width)
|
||||
{
|
||||
var y1 = this.y;
|
||||
|
||||
if(y > y1 && y < y1 + this.height)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// constructor
|
||||
PIXI.Rectangle.constructor = PIXI.Rectangle;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue