Re: XForms: aligning positioner to xyplot

Steve Lamont (
Wed, 24 Dec 97 16:49:08 PST

To subscribers of the xforms list from (Steve Lamont) :

> Hi all. I'm a new xforms user, and I'm having trouble getting an
> overlay positioner aligned properly to an xyplot, so that I can use
> the positioner to read out the plot data. I first tried to align the
> two in fdesign, but found that after building my program, the
> positioner and xyplot were aligned differently than in fdesign, even
> in the latter's test mode. ...

There does appear to be a small offset built into the positioner which
makes it difficult to do what you want. I experimented a little and
came up with the following hack:

void positioner_cb( FL_OBJECT *ob, long data )


FL_Coord p;
FL_Coord q;
int mask;
float x;
float y;

fl_get_form_mouse( ob->form, &p, &q, &mask );

fl_xyplot_s2w( ( ( FD_your_dui *) ob->form->fdui )->xyplot, p, q, &x, &y );



This allows you to overlay an XY plot with a positioner and accurately
read out values.

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: