home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5433 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.6 KB

  1. Path: sparky!uunet!ogicse!clark!spool.mu.edu!torn!nott!emr1!jagrant
  2. From: jagrant@emr1.emr.ca (John Grant)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: how do I draw complex polygons (i.e. do-nuts) in Windows?
  5. Message-ID: <1993Jan27.040348.17621@emr1.emr.ca>
  6. Date: 27 Jan 93 04:03:48 GMT
  7. Article-I.D.: emr1.1993Jan27.040348.17621
  8. Organization: Energy, Mines, and Resources, Ottawa
  9. Lines: 34
  10.  
  11. I've been trying to understand the ...region... Windows functions, but
  12. I'm not having much luck in applying them to my requirement to draw
  13. complex polygons.  Specifically, I want to draw a lake containing an
  14. island (or two) as a single filled polygon.
  15.  
  16. In UNIRAS (graphics library on VAX/Sun), it was simple.  All I had
  17. to do was fill up an array with the polygon (x,y), inserting a special
  18. (-999.999,-999.999) point in the array for each breakpoint (i.e.
  19. when toggling between land and water).
  20.  
  21. x    y
  22. -------------
  23. x    y        these are the (x,y) for the lakeshore
  24. x    y
  25. ...
  26. -999.999 -999.999    break to island #1
  27. x    y        these are the (x,y) for island #1
  28. x    y
  29. ...
  30. -999.999 -999.999    break to island #2
  31. x    y        these are (x,y) for island #2
  32. x    y
  33.  
  34. UNIRAS would then take this array and draw and fill the lake
  35. (excluding the islands) in a single function call.
  36.  
  37. Can anyone show me some code to do the Windows equivalent?
  38. I'm sure it has something to do with the ...region... functions,
  39. but I can't seem to make the right connection.  Perhaps I want
  40. to create several regions and perform some Boolean logic on them?
  41. -- 
  42. John A. Grant                        jagrant@emr1.emr.ca
  43. Airborne Geophysics
  44. Geological Survey of Canada, Ottawa
  45.