API Docs for: 2.0.0
Show:

Ellipse Class

Module: PIXI

The Ellipse object can be used to specify a hit area for displayObjects

Constructor

Ellipse

(
  • x
  • y
  • width
  • height
)

Parameters:

  • 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

Item Index

Properties

Methods

clone

() Ellipse

Creates a clone of this Ellipse instance

Returns:

Ellipse:

a copy of the ellipse

contains

(
  • x
  • y
)
Boolean

Checks whether the x and y coordinates given are contained within this ellipse

Parameters:

  • 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

getBounds

() Rectangle

Returns the framing rectangle of the ellipse as a PIXI.Rectangle object

Returns:

Rectangle:

the framing rectangle

Properties

height

Number

Default: 0

width

Number

Default: 0

x

Number

Default: 0

y

Number

Default: 0