Name

size()

Examples
size(200, 100)
background(153)
line(0, 0, width, height)
def setup(): 
    size(320, 240)

def draw(): 
    background(153)
    line(0, 0, width, height)
size(150, 200, P3D) # Specify P3D renderer
background(153)
# With P3D, we can use z (depth) values...
line(0, 0, 0, width, height, -100)
line(width, 0, 0, width, height, -100)
line(0, height, 0, width, height, -100)
#...and 3D-specific functions, like box()
translate(width/2, height/2)
rotateX(PI/6)
rotateY(PI/6)
box(35)
Description
Syntax
size(w,h)
size(w,h,renderer)
Parameters
w
h
renderer
Related width
height
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License