I've tried to use cap_style with XDrawLine and got some
strange result. These where made with line_width = 5. I
got the same result with
- xorg/nv driver
- xorg/nvidia driver
- vncserver

+: point given as start and stop point to XDrawLine
but not drawn
*: point given as start and stop point to XDrawLine
and drawn
X: drawn by XDrawLine

I got the expected result with

CapProjecting

XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XX*XXXXXXXXX*XX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX

CapRound

XXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XX*XXXXXXXXX*XX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXX

But with CapNoLast and CapButt, I get the same result:

XXXXXXXXXX
XXXXXXXXXX
*XXXXXXXXX+
XXXXXXXXXX
XXXXXXXXXX

When I expected for CapNoLast

XXXXXXXXX
XXXXXXXXX
*XXXXXXXXX+
XXXXXXXXX
XXXXXXXXX

and for CapBut

XXXXXXXXXXX
XXXXXXXXXXX
*XXXXXXXXX+
XXXXXXXXXXX
XXXXXXXXXXX

The result does not depend on the direction. I get
similarly surprising result with vertical and oblique lines.

Have I missed something? What? (Especially considering that
I get the same result when drawing from a to b and from b to
a).

--
Jean-Marc