Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: pete@iris49.UUCP (Pete Ware) Newsgroups: comp.windows.x Subject: Re: BadLength for XDrawLines Message-ID: <9102182000.AA09355@iris49.biosym.com> Date: 18 Feb 91 20:00:09 GMT References: <11474@uhccux.uhcc.Hawaii.Edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 25 No, it's not _really_ a bug in X. The problem is that there is a maximum request length that is implicitly used by all the output functions. The protocol document (X Window System, 2nd edition, page 382) guarantees this value is at least 4096 4 byte units (i.e. 16KBytes). It is established at connection time and each server is free to implement any value larger than 4096. There is no function or macro to get this from the display structure. What this means is that one is allowed to send less than 2000 rectangles per request XDrawRectangles() (each XRectangle structure is 8 bytes plus some overhead for the packet). There are similar implicit sizes for XDrawPoints, XDrawLines, XDrawArcs, etc. To forestall further questions, in general, Xlib cannot breakup such requests into multiple calls because the requests may depend on previous values. For example: XDrawPoints coord mode XDrawLines joins, intersections, coord mode XDrawRectangles no reason XDrawArcs intersections --pete Pete Ware / Biosym / San Diego CA / (619) 546-5532 uucp: scripps.edu!bioc1!pete Internet: bioc1!pete@scripps.edu