GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Python/Polyline.py at master · CHAOYUHONG/Python Expand file tree/ Copy pathPolyline.pyMore file actions 28 lines (20 loc) · 596 Bytes / Copy pathPolyline.pyFile metadata and controls28 lines (20 loc) · 596 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # Polyline drawing in codeskulptor import simplegui import math polyline = [] def click(pos): global polyline polyline.append(pos) def clear(): global polyline polyline = [] def draw(canvas): if len(polyline) == 1: canvas.draw_point(polyline[0] , "White") for i in range(1 ,len(polyline)): canvas.draw_line(polyline[i-1] ,polyline[i] ,2 ,"White" ) frame = simplegui.create_frame("Echo click", 300, 200) frame.set_mouseclick_handler(click) frame.set_draw_handler(draw) frame.add_button("Clear", clear) frame.start() |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |