Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
GTK
GTK.DrawingArea

Method GTK.DrawingArea()->draw_rectangle()


Method draw_rectangle

GTK.DrawingArea draw_rectangle(GDK.GC gc, int filledp, int x1, int y1, int x2, int y2)

Description

img_begin w = GTK.DrawingArea()->set_usize(100,100); delay: g = GDK.GC(w)->set_foreground( GDK.Color(255,0,0) ); delay: for(int x = 0; x<10; x++) w->draw_rectangle(g,0,x*10,0,100-x*10,99); img_end img_begin w = GTK.DrawingArea()->set_usize(100,100); delay: g = GDK.GC(w); delay: for(int x = 0; x<30; x++) { delay: g->set_foreground(GDK.Color(random(255),random(255),random(255)) ); delay: w->draw_rectangle(g,1,x*10,0,100-x*10,99); delay: } img_end