Python Playground: Drawing with the Whiteboard Widget
Getting Started with the Whiteboard The whiteboard widget gives you a canvas to draw on. Creating one is super simple: from story import create story = create() board = story.whiteboard(width=500, height=300) await story.run() Run You can customize the size to fit your needs - just adjust the width and height parameters. Drawing Basics: Shapes and Colors Rectangles: Your Building Blocks Want to draw a rectangle? Here鈥檚 how: board = story.whiteboard(width=500, height=300) # Draw a red rectangle at (x=10, y=10) with width=100 and height=50 board....