home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!clark!spool.mu.edu!torn!nott!emr1!jagrant
- From: jagrant@emr1.emr.ca (John Grant)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: how do I draw complex polygons (i.e. do-nuts) in Windows?
- Message-ID: <1993Jan27.040348.17621@emr1.emr.ca>
- Date: 27 Jan 93 04:03:48 GMT
- Article-I.D.: emr1.1993Jan27.040348.17621
- Organization: Energy, Mines, and Resources, Ottawa
- Lines: 34
-
- I've been trying to understand the ...region... Windows functions, but
- I'm not having much luck in applying them to my requirement to draw
- complex polygons. Specifically, I want to draw a lake containing an
- island (or two) as a single filled polygon.
-
- In UNIRAS (graphics library on VAX/Sun), it was simple. All I had
- to do was fill up an array with the polygon (x,y), inserting a special
- (-999.999,-999.999) point in the array for each breakpoint (i.e.
- when toggling between land and water).
-
- x y
- -------------
- x y these are the (x,y) for the lakeshore
- x y
- ...
- -999.999 -999.999 break to island #1
- x y these are the (x,y) for island #1
- x y
- ...
- -999.999 -999.999 break to island #2
- x y these are (x,y) for island #2
- x y
-
- UNIRAS would then take this array and draw and fill the lake
- (excluding the islands) in a single function call.
-
- Can anyone show me some code to do the Windows equivalent?
- I'm sure it has something to do with the ...region... functions,
- but I can't seem to make the right connection. Perhaps I want
- to create several regions and perform some Boolean logic on them?
- --
- John A. Grant jagrant@emr1.emr.ca
- Airborne Geophysics
- Geological Survey of Canada, Ottawa
-