[comp.windows.x] What's XDrawLines doing to me, anyway?

nowlin@gramian.harvard.edu (Bill Nowlin) (02/10/90)

Standard idiot bug question, I'm sure, but anyway:

X11R3, sun3, sun4:

Is there a problem (feature?) in XDrawLines that causes it to only
draw a few of the data points and then happily return, claiming it has
drawn them all?  I'm talking on the order of a thousand.

I can use XDrawSegments successfully, but it's slow and I need a
contiguous line.  I've gotten XDrawLines to work using the xnews release
of X11 from Sun, but not the MIT release.

Thanks oh so much.

Bill Nowlin
Harvard Robotics Lab
H.U.
nowlin@gramian.harvard.edu

klee@wsl.dec.com (Ken Lee) (02/10/90)

In article <1544@husc6.harvard.edu>, nowlin@gramian.harvard.edu (Bill
Nowlin) writes:
> Is there a problem (feature?) in XDrawLines that causes it to only
> draw a few of the data points and then happily return, claiming it has
> drawn them all?  I'm talking on the order of a thousand.

X is asynchronous.  There is no guarantee that the drawing will be done
when a draw function returns.  Further, unless you track expose events,
there is no guarantee that the drawing will appear on your screen.  If
you're careful, neither of these issues should be problems.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee

keith@EXPO.LCS.MIT.EDU (Keith Packard) (02/10/90)

> X11R3, sun3, sun4:

> Is there a problem (feature?) in XDrawLines that causes it to only
> draw a few of the data points and then happily return, claiming it has
> drawn them all?  I'm talking on the order of a thousand.

There was a bug in R3 servers for wide lines which would terminate the
DrawLines request at the first pair of coincedent points.  If you were
drawing zero width lines, then I don't know  off-hand what would cause the
troubles you were seeing.

In any case, R4 servers draw lines much faster than R3 servers, especially wide
lines or zero width lines in color (which are now substantially faster than
monochrome).

Keith Packard
MIT X Consortium