Newsgroups: comp.windows.x
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!dont-send-mail-to-path-lines
From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse)
Subject: Re:  how to XDrawLines > MaxRequestSize
Message-ID: <9106151005.AA25803@lightning.McRCIM.McGill.EDU>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Date: 15 Jun 91 10:05:53 GMT
Lines: 26

>>> I hadn't realized that there was a limit to the size of the lists
>>> that the X poly requests like XDrawLines can handle until [...]

>>> A couple of pointed questions:
>>> - If it's so simple, why can't the Xlib do it for you?
>> Because it's *not* so simple.  Read the protocol spec for the
>> PolyLine request.  In particular, pay close attention to joins and
>> the semantics of overlapping lines.  [...]

> Good point, correction accepted.  I believe that my for loop will
> satisfy the protocol when the GC function is GXCopy because multiple
> drawing of pixels does not matter in this common case.

That's neither sufficient nor, strictly, necessary.  It's true that
overlap doesn't matter for graphics functions that don't depend on the
destination (which means GXclear, GXcopy, GXcopyInverted, and GXset;
GXcopy isn't the only one), but you also need to pay attention to the
difference between line caps and line joins.  Sometimes this doesn't
matter; in particular if the cap is CapRound and the join is JoinRound
it doesn't.  But if, say, the cap is CapButt and the join is JoinMiter,
it definitely does.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
