home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!uwm.edu!point.cs.uwm.edu!amit
- From: amit@point.cs.uwm.edu (Amit Srivastava)
- Newsgroups: comp.windows.x
- Subject: comp.graphics
- Date: 14 Dec 1992 18:55:17 GMT
- Organization: University of Wisconsin, Milwaukee
- Lines: 31
- Distribution: world
- Message-ID: <1gilalINNi5v@uwm.edu>
- NNTP-Posting-Host: 129.89.2.5
- Keywords: FillRules, XfillRule, enclosed regions
-
-
- Hello,
-
- Following are some of the problems I am facing:
-
- 1) I developed a recursive routine to perform a flood fill of an
- enclosed region, however, it fails for a very large region due to
- out of stack space. I need a fill
- routine written in X, that will provide me following capabilities:
-
- a) check if a (X,Y) point lies in an enclosed region
- b) if it does, then fill the region
-
- My implementation uses a clipmask as a bitmap and I am working on
- writing a routine to see if point X,Y lies in the enclosed region...
- I am using following X calls in my recursive floodfill routine:
-
- XCreateImage ( to create XImage structure from the clipmask,
- this needs to be done only once.)
-
- XGetPixel (from clipimage to see if pixel is set)
- XPutPixel (to put the pixel value in the clipimage
- XDrawPixel (to draw the pixel on the drawable)
-
- I need an efficient routine to define enclosed region and check if
- the point falls within the enclosed region...
-
- Any help would be appreciated:
- -amit.
-
-
-