Optional
x: string | numberThe X coordinate of the upper-left corner of the rectangle
Optional
y: string | numberThe Y coordinate of the upper-left corner of the rectangle
Optional
width: string | numberThe overall width of the rectangle
Optional
height: string | numberThe overall height of the rectangle
0
Readonly
typeThe type of the object, mainly used to avoid instanceof
checks
PIXI.SHAPES.RECT
PIXI.SHAPES
0
0
0
Returns the bottom edge of the rectangle.
Returns the left edge of the rectangle.
Returns the right edge of the rectangle.
Returns the top edge of the rectangle.
Static
EMPTYEnlarges this rectangle to include the passed rectangle.
The rectangle to include.
Returns itself.
Fits this rectangle around the passed one.
The rectangle to fit.
Returns itself.
Determines whether the other
Rectangle transformed by transform
intersects with this
Rectangle object.
Returns true only if the area of the intersection is >0, this means that Rectangles
sharing a side are not overlapping. Another side effect is that an arealess rectangle
(width or height equal to zero) can't intersect any other rectangle.
A value of true
if the transformed other
Rectangle intersects with this
; otherwise false
.
Pads the rectangle making it grow in all directions. If paddingY is omitted, both paddingX and paddingY will be set to paddingX.
Optional
paddingX: numberThe horizontal padding amount.
Optional
paddingY: numberThe vertical padding amount.
Returns itself.
Generated using TypeDoc
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.
Memberof
PIXI