[pygtk] How to give foreground color t othe Drawing Area.

ganesh gajre ganeshgajre at gmail.com
Mon Mar 10 21:28:26 WST 2008


I have make use of gtk.Drawing area for graphics use.


                 self.area =3D gtk.DrawingArea()

                  self.area.set_size_request(self.width, self.height)

                  self.pangolayout =3D self.area.create_pango_layout("")

How can i color this drawing area.

Also i make use of gtk Drawable object.
 Like
 draw_line();
 draw_arc();


         self.area.window.draw_line(self.gc,self.ox,self.yr,self.xr,self.yr)
        self.area.window.draw_line(self.gc,self.xr,self.yr,self.fx1,yc)
        self.area.window.draw_line(self.gc,self.fx1,yc,self.ix,self.iy)
        self.area.window.draw_line(self.gc,self.ox,self.yr,xc,yc)
        self.area.window.draw_line(self.gc,xc,yc,self.ix,self.iy)



want to give color to each and every line.
and also  make it SOLID.
How should it be done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20080310/8f85e2d5/at=
tachment.htm


More information about the pygtk mailing list