Skip to main content

Polygon

Polygon

A representation of a Polygon shape.


Constructor

public Polygon

new Polygon(points)

Constructor for Polygon.

Parameters

  •  points: Vector[] – List of vertices.

Properties

No publicly accessible properties on Polygon

protected points: Vector[]

Description needed


Methods

public draw

draw(ctx) => void

Draws the Polygon on the canvas.

Parameters

  •  ctx: CanvasRenderingContext2D – Provides the 2D rendering context for the drawing surface of an element.

Static Methods

No static methods for Polygon