| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
GTK2
GTK2.DrawingArea

# Method GTK2.DrawingArea()->draw_rectangle()

Method draw_rectangle

  `GTK2.DrawingArea draw_rectangle(GTK2.GdkGC gc, int filledp, int x1, int y1, int x2, int y2)`

Description

  img_begin w = GTK2.DrawingArea()->set_size_request(100,100); delay: g = GDK2.GC(w)->set_foreground( GDK2.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 = GTK2.DrawingArea()->set_size_request(100,100); delay: g = GDK2.GC(w); delay: for(int x = 0; x<30; x++) { delay: g->set_foreground(GDK2.Color(random(255),random(255),random(255)) ); delay: w->draw_rectangle(g,1,x*10,0,100-x*10,99); delay: } img_end