API Docs for: 1.5.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 upper-left corner of the framing rectangle of this ellipse

  • y Number

    The Y coordinate of the upper-left corner of the framing rectangle of this ellipse

  • width Number

    The overall width of this ellipse

  • height Number

    The overall 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 passed to this function 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