🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2390

how do I draw complex polygons (i.e. do-nuts) in Windows?

#2390
From: John Grant
Date: Wed, 27 Jan 1993 04:03
34 lines
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
Technical Details
Message-ID: <1993Jan27.040348.17621@emr1.emr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!clark!spool.mu.edu!torn!nott!emr1!jagrant

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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