Scratch for Java

Shape::translate()

Translate the shape by the specified distances in the x and y directions.

Syntax

Java

.translate(dx, dy)

Parameters

Name Data Type Description
dx double the distance to translate in the x direction
dy double the distance to translate in the y direction

Return

Shape

translate()