Scratch for Java

Canvas::drawImageQuad()

Browser availability: desktop-only.

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

A region of an image on any quad: turned, mirrored, sheared.

Syntax

Java

.drawImageQuad(path, sx, sy, sw, sh, corners)

Parameters

Name Data Type Description
path String the image
sx int the region's left edge in image pixels
sy int its top edge
sw int its width
sh int its height
corners double[] where the region's top-left, top-right, bottom-right and bottom-left corners go: `x0, y0, \u2026, x3, y3`

Return

void

drawImageQuad()

Create Shareable URL

Select Sections