Navigation
These archived docs are for Phaser 2.2.2 Phaser 3 docs can be found on newdocs.phaser.io.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

PIXI. Ellipse

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 code: pixi/geom/Ellipse.js, line 5

Public Properties

height : number

Default Value
  • 0
Source code: 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 code: pixi/geom/Ellipse.js, line 46

width : number

Default Value
  • 0
Source code: pixi/geom/Ellipse.js, line 31

x : number

Default Value
  • 0
Source code: pixi/geom/Ellipse.js, line 17

y : number

Default Value
  • 0
Source code: pixi/geom/Ellipse.js, line 24

Public Methods

clone() → {PIXI.Ellipse}

Creates a clone of this Ellipse instance

Returns

a copy of the ellipse

Source code: 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 code: 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 code: pixi/geom/Ellipse.js, line 88