Scratch for Java

Diese Seite ist noch nicht übersetzt. Sie wird in ihrer Originalsprache angezeigt.

Canvas::drawImageRegion()

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, centred on a point: one tile of a tileset, one glyph of a bitmap font.

Syntax

Java

.drawImageRegion(path, sx, sy, sw, sh, x, y, width, height)

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
x double x of the centre
y double y of the centre
width double the width to draw it at
height double the height to draw it at

Return

void

drawImageRegion()

Teilbare URL erstellen

Abschnitte auswählen