Options
All
  • Public
  • Public/Protected
  • All
Menu

A class to define a shape via user defined coordinates.

memberof

PIXI

Hierarchy

  • Polygon

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    Returns Polygon

  • Parameters

    • Rest ...points: number[] | IPoint[]

    Returns Polygon

Properties

closeStroke

closeStroke: boolean

points

points: number[]

Readonly type

type: POLY

Methods

clone

  • Creates a clone of this polygon

    Returns Polygon

    a copy of the polygon

contains

  • contains(x: number, y: number): boolean
  • Checks whether the x and y coordinates passed to this function are contained within this polygon

    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 polygon

toString

  • toString(): string
  • Returns string

Generated using TypeDoc