PyGObject-Tutorial
PyGObject-Tutorial copied to clipboard
Feature request: section showing how to draw lines and simple shapes
An example showing how to draw lines and simple shapes was one of the first things I looked for in this tutorial but was disappointed not to find.
I suggest a window with a few input fields to specify x,y pairs of points/vertices, and then maybe a button to draw a triangle using those points as the corners of the triangle.
Oooh. I added this issue about a year ago, and just now ran across it again. Perhaps it would be helpful to add: I don't know what widget one would use to draw points, lines, and shapes, but if it's not something covered by PyGObject (maybe something via a Python binding to Cairo?) then it would probably still be useful to include something pointing the reader in the right direction.
Probably GtkDrawingArea and yes it uses pycairo.