#

API Docs for: 1.3.0
Show: Inherited Protected Private Deprecated

# Polygon Class

Defined in: `src/pixi/core/Polygon.js:5`
Module: PIXI

## Constructor

### `Polygon`

(

- `points`

)

Defined in `src/pixi/core/Polygon.js:5`

#### Parameters:

- `points` Array | Array

  This cna be an array of Points or a flat array of numbers that will be interpreted as [x,y, x,y, ...]

- Index
- Methods

## Item Index

### Methods

- clone
- contains

## Methods

### `clone`

()

Defined in `src/pixi/core/Polygon.js:28`

#### Returns:

a copy of the polygon

### `contains`

(

- `x`
- `y`

)

Defined in `src/pixi/core/Polygon.js:42`

#### Parameters:

- `x` Number

  The X coord of the point to test

- `y` Number

  The Y coord of the point to test

#### Returns:

if the x/y coords are within this polygon