API Docs for: 2.2.1
Show:

Circle Class

Defined in: pixi/geom/Circle.hx:6

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

Constructor

Circle

(
  • x
  • y
  • radius
)

Parameters:

  • x Float

    The X coordinate of the center of this circle

  • y Float

    The Y coordinate of the center of this circle

  • radius Float

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

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

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

getBounds

() Rectangle

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

Returns:

Rectangle:

the framing rectangle

Properties

radius

Float

Default: 0

x

Float

Default: 0

y

Float

Default: 0