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