RosettaCodeData/Task/Mouse-position/Processing-Python-mode/mouse-position.processing-py

8 lines
211 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
def setup():
size(640, 480)
def draw():
# mouseX and mouseY provide the current mouse position
ellipse(mouseX, mouseY, 5, 5) # graphic output example
println("x:{} y:{}".format(mouseX, mouseY))