PIXI.RoundedRectangle
class RoundedRectangle
The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height and its radius.
Constructor
new PIXI.RoundedRectangle(x: number, y: number, width: number, height: number, radius: number) → {}
Name | Type | Default | Description |
---|---|---|---|
x | number | 0 |
The X coordinate of the upper-left corner of the rounded rectangle |
y | number | 0 |
The Y coordinate of the upper-left corner of the rounded rectangle |
width | number | 0 |
The overall width of this rounded rectangle |
height | number | 0 |
The overall height of this rounded rectangle |
radius | number | 20 |
Controls the radius of the rounded corners |
Summary
Properties from RoundedRectangle
number |
|
number |
|
SHAPES.RREC |
|
number |
|
number |
|
number |
|
Methods from RoundedRectangle
Public Properties
height: number = 0
radius: number = 20
type: SHAPES.RREC = PIXI.SHAPES.RREC
The type of the object, mainly used to avoid instanceof
checks
width: number = 0
x: number = 0
y: number = 0
Public Methods
clone() → {PIXI.RoundedRectangle}
Creates a clone of this Rounded Rectangle.
Type | Description |
---|---|
PIXI.RoundedRectangle |
|
contains(x: number, y: number) → {boolean}
Checks whether the x and y coordinates given are contained within this Rounded Rectangle
Name | Type | Description |
---|---|---|
x | number |
The X coordinate of the point to test. |
y | number |
The Y coordinate of the point to test. |
Type | Description |
---|---|
boolean |
|