PyGObject-Tutorial icon indicating copy to clipboard operation
PyGObject-Tutorial copied to clipboard

Feature request: section showing how to draw lines and simple shapes

Open uvtc opened this issue 7 years ago • 2 comments

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.

uvtc avatar Sep 06 '17 16:09 uvtc

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.

uvtc avatar Sep 26 '18 03:09 uvtc

Probably GtkDrawingArea and yes it uses pycairo.

TingPing avatar Sep 27 '18 01:09 TingPing