Scratch for Java

Drawing::clip()

Limits subsequent drawing to a centred rectangle. This replaces the previous clip; it is always cleared when the sprite finishes drawing. For a rotated sprite, the clip is the screen-aligned bounding box of this rectangle.

Examples

View on GitHub

Syntax

Java

.clip(x, y, width, height)

Parameters

Name Data Type Description
x double centre x
y double centre y
width double clip width
height double clip height

Return

void

clip()

Create Shareable URL

Select Sections