Name

clip()

Examples
size(200, 200)
noFill()
imageMode(CORNER)

background(204)
clip(25, 25, 125, 125)
line(0, 0, width, height)
line(0, height, width, 0)
Description Limits the rendering to the boundaries of a rectangle defined by the parameters. The boundaries are drawn based on the state of the imageMode() fuction, either CORNER, CORNERS, or CENTER.
Syntax
clip(x1, y1, x2, y2)
Parameters
x1int: x coordinate of first corner of bounding box
y1int: y coordinate of first corner of bounding box
x2int: x coordinate of second corner of bounding box
y2int: y coordinate of second corner of bounding box

Updated on Mon Sep 21 15:53:24 2020.

If you see any errors or have comments, please let us know.