API Docs for: 2.2.1
Show:

Ellipse Class

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

Constructor

Ellipse

(
  • x
  • y
  • width
  • height
)

Parameters:

  • x Float

    The X coordinate of the center of the ellipse

  • y Float

    The Y coordinate of the center of the ellipse

  • width Float

    The half width of this ellipse

  • height Float

    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
)
Bool

Checks whether the x and y coordinates passed to this function are contained within this ellipse

Parameters:

  • x Float

    The X coordinate of the point to test

  • y Float

    The Y coordinate of the point to test

Returns:

Bool:

Whether the x/y coords are within this ellipse

getBounds

() Rectangle

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

Returns:

Rectangle:

the framing rectangle

Properties

height

Float

Default: 0

width

Float

Default: 0

x

Float

Default: 0

y

Float

Default: 0