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

  1. Path: sparky!uunet!caen!uwm.edu!point.cs.uwm.edu!amit
  2. From: amit@point.cs.uwm.edu (Amit Srivastava)
  3. Newsgroups: comp.windows.x
  4. Subject: comp.graphics
  5. Date: 14 Dec 1992 18:55:17 GMT
  6. Organization: University of Wisconsin, Milwaukee
  7. Lines: 31
  8. Distribution: world
  9. Message-ID: <1gilalINNi5v@uwm.edu>
  10. NNTP-Posting-Host: 129.89.2.5
  11. Keywords: FillRules, XfillRule, enclosed regions
  12.  
  13.  
  14. Hello,
  15.  
  16. Following are some of the problems I am facing:
  17.  
  18. 1) I developed a recursive routine to perform a flood fill of an 
  19. enclosed region, however, it fails for a very large region due to 
  20. out of stack space.  I need a fill    
  21. routine written in X, that will provide me following capabilities:
  22.  
  23. a) check if a (X,Y) point lies in an enclosed region
  24. b) if it does, then fill the region
  25.  
  26. My implementation uses a clipmask as a bitmap and I am working on 
  27. writing a routine to see if point X,Y lies in the enclosed region... 
  28. I am using following X calls in my recursive floodfill routine:
  29.  
  30. XCreateImage ( to create XImage structure from the clipmask, 
  31.     this needs to be done only once.)
  32.  
  33. XGetPixel    (from clipimage to see if pixel is set)
  34. XPutPixel    (to put the pixel value in the clipimage
  35. XDrawPixel   (to draw the pixel on the drawable)
  36.  
  37. I need an efficient routine to define enclosed region and check if 
  38. the point falls within the enclosed region...
  39.  
  40.         Any help would be appreciated:
  41.             -amit.    
  42.  
  43.  
  44.