API Docs for: 2.0.0
Show:

Circle Class

Module: PIXI

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

Constructor

Circle

(
  • x
  • y
  • radius
)

Parameters:

  • x Number

    The X coordinate of the center of this circle

  • y Number

    The Y coordinate of the center of this circle

  • radius Number

    The radius of the circle

Item Index

Properties

Methods

clone

() Circle

Creates a clone of this Circle instance

Returns:

Circle:

a copy of the Circle

contains

(
  • x
  • y
)
Boolean

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

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

getBounds

() Rectangle

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

Returns:

Rectangle:

the framing rectangle

Properties

radius

Number

Default: 0

x

Number

Default: 0

y

Number

Default: 0