Scratch for Java

Drawing::rectangle()

A filled rectangle centred on a point.

Examples

View on GitHub

Syntax

Java

.rectangle(x, y, width, height, color)

Parameters

Name Data Type Description
x double x of its centre
y double y of its centre
width double its width
height double its height
color Color the fill

Return

void

rectangle()

Create Shareable URL

Select Sections