PIXI.Ellipse

class Ellipse

The Ellipse object is used to help draw graphics and can also be used to specify a hit area for displayObjects.

Constructor


new PIXI.Ellipse(x: number, y: number, halfWidth: number, halfHeight: number) → {}
Parameters:
Name Type Default Description
x number 0

The X coordinate of the center of this ellipse

y number 0

The Y coordinate of the center of this ellipse

halfWidth number 0

The half width of this ellipse

halfHeight number 0

The half height of this ellipse

Summary


Properties from Ellipse

number
height = 0
SHAPES.ELIP
type = PIXI.SHAPES.ELIP
number
width = 0
number
x = 0
number
y = 0

Public Properties


height Ellipse.ts:19
height: number = 0
type Ellipse.ts:22
type: SHAPES.ELIP = PIXI.SHAPES.ELIP

The type of the object, mainly used to avoid instanceof checks

See: PIXI.SHAPES
width Ellipse.ts:16
width: number = 0
x Ellipse.ts:10
x: number = 0
y Ellipse.ts:13
y: number = 0

Public Methods


clone Ellipse.ts:45
clone() → {PIXI.Ellipse}

Creates a clone of this Ellipse instance

Returns:
Type Description
PIXI.Ellipse

A copy of the ellipse

contains Ellipse.ts:54
contains(x: number, y: number) → {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:
Type Description
boolean

Whether the x/y coords are within this ellipse

getBounds Ellipse.ts:77
getBounds() → {PIXI.Rectangle}

Returns the framing rectangle of the ellipse as a Rectangle object

Returns:
Type Description
PIXI.Rectangle

The framing rectangle


Powered by webdoc!