The script shows how to draw simple shapes on a GTK+3 drawing area using Python3.
- Define a drawing area using
Gtk.DrawingArea(). - Setting color using
set_source_rgb(). - Drawing circles with
arc(). - Moving the drawing tip with
move_to(). - Drawing lines with
line_to(). - Drawing rectangles with
rectangle(). - Drawing the outline of a shape and filling the content of the shape with
stoke()andfill()respectively. - Setting the line width with
set_line_width(). - Setting line dash with
set_dash().


No comments:
Post a Comment