PIXI.Circle
class Circle
The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects.
Constructor
new PIXI.Circle(x: number, y: number, radius: number) → {}
| Name | Type | Default | Description |
|---|---|---|---|
| x | number | 0 |
The X coordinate of the center of this circle |
| y | number | 0 |
The Y coordinate of the center of this circle |
| radius | number | 0 |
The radius of the circle |
Summary
Properties from Circle
| number |
|
| SHAPES.CIRC |
|
| number |
|
| number |
|
Methods from Circle
Public Properties
radius: number = 0
type: SHAPES.CIRC = PIXI.SHAPES.CIRC
The type of the object, mainly used to avoid instanceof checks
x: number = 0
y: number = 0
Public Methods
clone() → {PIXI.Circle}
Creates a clone of this Circle instance
| Type | Description |
|---|---|
| PIXI.Circle |
A copy of the Circle |
contains(x: number, y: number) → {boolean}
Checks whether the x and y coordinates given are contained within this circle
| 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 |
Whether the x/y coordinates are within this Circle |
getBounds() → {PIXI.Rectangle}
Returns the framing rectangle of the circle as a Rectangle object
| Type | Description |
|---|---|
| PIXI.Rectangle |
The framing rectangle |