Scratch for Java

Drawing::polygon()

Draws a filled polygon with at least three points. Concave polygons are supported; crossing outlines are not.

Examples

View on GitHub

Syntax

Java

.polygon(x, y, color)

Parameters

Name Data Type Description
x double[] x coordinates
y double[] y coordinates (same length as x)
color Color fill colour

Return

void

polygon()

Create Shareable URL

Select Sections