new Ellipse(x, y, width, height)
The Ellipse object can be used to specify a hit area for displayObjects
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | The X coordinate of the center of the ellipse |
y |
Number | The Y coordinate of the center of the ellipse |
width |
Number | The half width of this ellipse |
height |
Number | The half height of this ellipse |
- Source - pixi/geom/Ellipse.js, line 5
Members
-
height :Number
-
- Default Value:
- 0
- Source - pixi/geom/Ellipse.js, line 38
-
type :Number
-
The type of the object, should be one of the Graphics type consts, PIXI.Graphics.ELIP in this case
- Default Value:
- 0
- Source - pixi/geom/Ellipse.js, line 46
-
width :Number
-
- Default Value:
- 0
- Source - pixi/geom/Ellipse.js, line 31
-
x :Number
-
- Default Value:
- 0
- Source - pixi/geom/Ellipse.js, line 17
-
y :Number
-
- Default Value:
- 0
- Source - pixi/geom/Ellipse.js, line 24
Methods
-
clone() → {PIXI.Ellipse}
-
Creates a clone of this Ellipse instance
Returns:
a copy of the ellipse
- Source - pixi/geom/Ellipse.js, line 54
-
contains(x, y) → {Boolean}
-
Checks whether the x and y coordinates given are contained within this ellipse
Parameters:
Name Type Description x
Number The X coordinate of the point to test
y
Number The Y coordinate of the point to test
Returns:
Boolean -Whether the x/y coords are within this ellipse
- Source - pixi/geom/Ellipse.js, line 65
-
getBounds() → {PIXI.Rectangle}
-
Returns the framing rectangle of the ellipse as a PIXI.Rectangle object
Returns:
the framing rectangle
- Source - pixi/geom/Ellipse.js, line 88