home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / windows / x / 20210 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.9 KB

  1. Path: sparky!uunet!mcsun!uknet!lsl!snail
  2. From: snail@lsl.co.uk
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Success! Eureka!  Cancel that last post...
  5. Message-ID: <1992Dec15.115851.2837@lsl.co.uk>
  6. Date: 15 Dec 92 10:58:51 GMT
  7. References: <1jm6zb#0fJwbK4lwpNj8ZzxLR1HQvRg=esr@snark.thyrsus.com>
  8. Organization: Laser-Scan Ltd., Cambridge
  9. Lines: 33
  10.  
  11. In article <1jm6zb#0fJwbK4lwpNj8ZzxLR1HQvRg=esr@snark.thyrsus.com>, esr@snark.thyrsus.com (Eric S. Raymond) writes:
  12. > In <1jl47Z#4zGwVx9MyJTb4OKv6T0lY9bl=esr@snark.thyrsus.com> I wrote:
  13. > There's good news and bad news.
  14. > The good news is that I got an attack of the stubborns, pulled an all-nighter,
  15. > and finally *solved this problem*!  My xlife now displays multi-state patterns
  16. > at any cell size.  Yeee-ha!
  17. > The bad news is that the way I found to make this work was to use a series of
  18. > XFillRectangle() calls in place of a single XFillRectangles().  I now believe
  19. > that there is a bug or undocumented limit in the generic XFillRectangles code
  20. > itself that was causing this problem.  'Ware hackers!
  21.  
  22. No problem, I don't think its a bug. Its designed in. To quote from O'Reilly
  23. Volume Two, page 189 on XFillRectangles....
  24.  
  25. "There is a limit to the number of rectangles that can be filled in a single
  26. call, that varies according to the server. To determine how many rectangles you 
  27. can fill in a single call, you find out your server's maximum request size
  28. using XMaxRequestSize. Subtract 3 and divide by 2, and this is the maximum
  29. number of rectangles you can fill in a single call to XFillRectangles."
  30.  
  31. Note that all of the rectangles will look the same: same colour etc.
  32. The smallest allowed request size is 4096 * 4 bytes, so you will be able to
  33. blat at least 16384 - 3 / 2 rectangles = 16381 / 2 = 8190 rectangles at a time
  34. at the worst.
  35. -- 
  36. snail@lsl.co.uk      
  37.  
  38. muso/unix joke: "which debugger do you use?"
  39.                 "I use dbx..."
  40.                 "Oh really, we use Dolby C..."
  41. Motorola inside.
  42.