pixi.geom.Rectangle

type
class
metadata
:native
"PIXI.Rectangle"

Constructor

new(x : Float, y : Float, width : Float, height : Float)
parameters
x {Float} The X coord of the upper-left corner of the rectangle
y {Float} The Y coord of the upper-left corner of the rectangle
width {Float} The overall width of this rectangle
height {Float} The overall height of this rectangle
the Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its width and its height.

Instance Variables

height : Float

width : Float

x : Float

y : Float

Instance Methods

clone() : Rectangle

returns
{Rectangle} a copy of the rectangle
Creates a clone of this Rectangle instance

contains(x : Float, y : Float) : Bool

parameters
x {Float} The X coordinate of the point to test
y {Float} The Y coordinate of the point to test
returns
{Bool} Whether the x/y coords are within this Rectangle
Checks whether the x and y coordinates passed to this function are contained within this Rectangle