GraphWin
The graphics.py class for a window you can draw in, created as GraphWin(title, width, height).
In more detail
Shapes appear only after you call shape.draw(win). The window has its own methods: getMouse waits for a click, checkMouse checks without waiting, setCoords changes the coordinate system and close shuts it.
Related terms
- graphics.py — A small teaching library by John Zelle, built on tkinter, for drawing shapes, text and entry boxes in a window.
- getMouse() — The GraphWin method that waits until the user clicks in the window and returns the click position as a Point.
- setCoords() — The GraphWin method that sets your own coordinate system, giving the x and y of the lower-left and upper-right corners.
- graphics object — A shape in graphics.py, such as a Point, Line, Circle, Rectangle, Oval, Polygon or Text, which you construct and then draw in a window.
Taught in
- A Graphics Introduction — Hands-on Python: Complete Video Course & Book
- Sample Graphics Programs — Hands-on Python: Complete Video Course & Book
- Reading The graphics.py Documentation — Hands-on Python: Complete Video Course & Book
- Entry Objects — Hands-on Python: Complete Video Course & Book