Re: XForms: fl_set_clipping anomaly

T.C. Zhao (zhao@bloch.phys.uwm.edu)
Fri, 19 Dec 1997 22:54:53 -0600

To subscribers of the xforms list from "T.C. Zhao" <zhao@bloch.phys.uwm.edu> :

On Dec 4, 11:06am, Jeroen Bleyenbergh wrote:

> There seem to be an anomaly in the xforms clipping routine.
> After using the command fl_set_clipping only the first
> object that is drawn is clipped, other drawing commands
> do not clip. For example:
>
> static void draw_newobject(FL_OBJECT *ob) {
> fl_set_clipping(ob->x,ob->y,ob->w,ob->h);
> fl_drw_box(FL_RSHADOW_BOX,
> ob->x+10,ob->y+ob->h/2+10,ob->w+20,ob->h/2,FL_BLUE,3);
> // this box is clipped
> fl_drw_box(FL_RSHADOW_BOX,
> ob->x+50,ob->y+2*ob->h/3+10,ob->w+20,ob->h/2,FL_YELLOW,3);
> // this box is NOT clipped
> fl_unset_clipping();
> fl_rect(ob->x,ob->y,ob->w,ob->h,FL_BLACK);
> }
>
> is this meant to work this way and should I give a set_clipping command
> before each drawing command (than whats the use of the fl_unset_clipping)
> or is this a bug

This is a bug. RSHADOW_BOX sets its own internal clippings, but
fails to restore the original clipping set outside fl_drw_box.
This will be fixed.

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/