Scratch for Java

Canvas::drawImage()

Browser availability: desktop-only.

This API requires the desktop runtime. Browser declarations may report the limitation without performing the operation.

An image (a file or a built-in sprite name), centred on a point.

Syntax

Java

.drawImage(path, x, y, width, height)

Parameters

Name Data Type Description
path String the image
x double x of its centre
y double y of its centre
width double its width
height double its height

Return

void

drawImage()

Create Shareable URL

Select Sections