Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pyprocessing import *
- size(900,600)
- background(1, 1, 1)
- strokeWeight(6)
- x1 = 0
- y1 = 0
- x2 = 0
- y2 = 0
- x = [0,0,0]
- y = [0,0,0]
- def draw():
- if mouse.pressed:
- x1 = mouse.x
- y1 = mouse.y
- if mouse.pressed:
- x2 = pmouse.x
- y2 = pmouse.y
- stroke(x1,y1,1)
- line(x1, y1, x2, y2)
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement