Re: XForms: Stupid question about fl_line

Yann Guichoux (guichoux@shom.fr)
Mon, 07 Dec 1998 09:00:07 +0100

# To subscribers of the xforms list from Yann Guichoux <guichoux@shom.fr> :

Alberto Barsella wrote:
>
> # To subscribers of the xforms list from Alberto Barsella <Alberto.Barsella@univ-lille1.fr> :
>
> Hi all,
> in the handler routine of an object I created I use fl_line to
> draw a small, black "diamond" with the following calls:
>
> fl_line(ob->x+xmin+4, ob->y+hahe, ob->x+xmin, ob->y+hahe+4, FL_BLACK);
> fl_line(ob->x+xmin, ob->y+hahe+4, ob->x+xmin-4, ob->y+hahe, FL_BLACK);
> fl_line(ob->x+xmin-4, ob->y+hahe, ob->x+xmin, ob->y+hahe-4, FL_BLACK);
> fl_line(ob->x+xmin, ob->y+hahe-4, ob->x+xmin+4, ob->y+hahe, FL_BLACK);
>
> xmin is the position inside the objet, while 'hahe' means 'half height'
> and is initialized: hahe = ob->h / 2.
>
> The problem is that I don't get a "full" diamond, there's a pixel missing
> at the right corner (the one at xmin+4, hahe), like it was not drawn, or
> it was drawn and then erased.
> Any suggestions besides going back to XDrawLine?
>
> Thankx,
> Alberto

I had the same kind of problem...it was coming from the cap_style
parameter

try this :

XSetLineAttributes(dpy,gc,1,LineSolid,CapProjecting,joinRound)

YG
_________________________________________________
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://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/