Thread View: comp.os.ms-windows.programmer.misc
2 messages
2 total messages
Started by John Grant
Wed, 27 Jan 1993 04:03
how do I draw complex polygons (i.e. do-nuts) in Windows?
Author: John Grant
Date: Wed, 27 Jan 1993 04:03
Date: Wed, 27 Jan 1993 04:03
34 lines
1638 bytes
1638 bytes
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
Re: how do I draw complex polygons (i.e. do-nuts) in Windows?
Author: Tom W. Brown
Date: Thu, 28 Jan 1993 19:18
Date: Thu, 28 Jan 1993 19:18
22 lines
1510 bytes
1510 bytes
In article <1993Jan27.040348.17621@emr1.emr.ca>, jagrant@emr1.emr.ca (John Grant) writes: |> 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. I haven't tried it, but perhaps the CreatePolyPolygonRgn() function is what you want; from the manual: The CreatePolyPolygonRgn function creates a region consisting of a series of closed polygons. The polygons may be disjoint, or they may overlap. Now, I wonder if there is a CreatePolyPolyPolygonRgn() for a series of series of closed polygons :-) ---------------------------------------------------------------------------- Tom Brown | "She turned me into a newt... PE Nelson Systems | ... I got better" twbrown@pe-nelson.com | Monty Python and the Holy Grail ----------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads