PIXI.Circle

class Circle

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

Constructor


new PIXI.Circle(x: number, y: number, radius: number) → {}
Parameters:
Name Type Default Description
x number 0

The X coordinate of the center of this circle

y number 0

The Y coordinate of the center of this circle

radius number 0

The radius of the circle

Summary


Properties from Circle

number
radius = 0
SHAPES.CIRC
type = PIXI.SHAPES.CIRC
number
x = 0
number
y = 0

Public Properties


radius Circle.ts:16
radius: number = 0
type Circle.ts:19
type: SHAPES.CIRC = PIXI.SHAPES.CIRC

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

See: PIXI.SHAPES
x Circle.ts:10
x: number = 0
y Circle.ts:13
y: number = 0

Public Methods


clone Circle.ts:40
clone() → {PIXI.Circle}

Creates a clone of this Circle instance

Returns:
Type Description
PIXI.Circle

A copy of the Circle

contains Circle.ts:49
contains(x: number, y: number) → {boolean}

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

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 coordinates are within this Circle

getBounds Circle.ts:72
getBounds() → {PIXI.Rectangle}

Returns the framing rectangle of the circle as a Rectangle object

Returns:
Type Description
PIXI.Rectangle

The framing rectangle


Powered by webdoc!