On 03.05.2008, at 19:39, Lukasz wrote:
> void plot_box::draw() {
> if(!scr) {
> scr = fl_create_offscreen(w(),h());
> fl_begin_offscreen(scr);
This line changes your drawing destination to the offscreen buffer
>
> fl_color(FL_BLACK);
> fl_rectf(x(),y(),w(),h());
> fl_end_offscreen();
Although this call stops drawing to the offscreen (depending on the
implementation), this does *not* restore the previous drawing context.
To do that, try adding this line:
window()->make_current();
Or likely better and safer to create the offscreen buffer earlier
(during creation?)
>
> }
> fl_copy_offscreen(x(),y(),w(),h(),scr,0,0);
> }
Matthias
----
http://robowerk.com/
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk