Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!decuac!bacchus.pa.dec.com!decwrl!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: XFillRectangles X Protocol error in R3 Message-ID: <1990Aug28.175614.4903@wrl.dec.com> Date: 28 Aug 90 17:56:14 GMT References: <9008272045.AA06156@pi3.local> Sender: news@wrl.dec.com (News) Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 28 In article <9008272045.AA06156@pi3.local>, blakec@pi3.local (Carl D. Blake) writes: |> I have been using XFillRectangles to draw up to approximately 20,000 |> rectangles and have been getting the following X Protocol error: |> |> X Protocol error: BadLength poly request too large or internal Xlib length error |> Major opcode of failed request: 70 (X_PolyFillRectangle) |> Minor opcode of failed request: 0 According to the X protocol, servers must accept protocol requests of at least 16K bytes. PolyFillRectangle is 8 bytes per rectangle plus 12 bytes of header, so you can send about 2000 rectangles with any implementation. Some implementations have higher limits. Some Xlib implementations, especially those based on the X11R4 sample Xlib, break up the PolyFillRectangle requests to pieces within the 16K limit; with these Xlib's, XFillRectangles calls can send many more rectangles without worrying about the limit. The same problem exists for other variable-length protocol requests. Again, some Xlib's try to break up the long requests, but this is too complicated for some requests, like FillPoly. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee