Point
The graphics.py object for a single position, made with Point(x, y), used to place and size other shapes.
In more detail
getX() and getY() read its coordinates. Drawing a Point shows a single pixel, so points are mostly used as corners and centres of other shapes, and getMouse returns one.
Related terms
- 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.
- coordinates — A pair of numbers, x across and y down or up, that gives a position in a window.
- getMouse() — The GraphWin method that waits until the user clicks in the window and returns the click position as a Point.
Taught in
- What Python Is, And Where It Came From — Hands-on Python: Complete Video Course & Book
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- Floats, Division And Mixed Types — Hands-on Python: Complete Video Course & Book
- A Graphics Introduction — Hands-on Python: Complete Video Course & Book
- Dunder Methods, And Making Objects Pythonic — Hands-on Python: Complete Video Course & Book