Name

draw()

Examples
yPos = 0.0

def setup():  # setup() runs once
    size(200, 200)
    frameRate(30)

def draw():  # draw() loops forever, until stopped
    background(204)
    yPos = yPos - 1.0
    if yPos < 0:
        yPos = height
    line(0, yPos, width, yPos)
def setup():
    size(200, 200)
# Although empty here, draw() is needed so
# the sketch can process user input events
# (mouse presses in this case).

def draw():
    pass

def mousePressed():
    line(mouseX, 10, mouseX, 90)
Description
Syntax
Related setup()
loop()
noLoop()
redraw()
frameRate()
background()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License