home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1300 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  990 b 

  1. Path: sparky!uunet!olivea!decwrl!csus.edu!netcom.com!whedon
  2. From: whedon@netcom.com (Bill Whedon)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: PtInRegion
  5. Keywords: PtInRegion
  6. Message-ID: <r74m3xl.whedon@netcom.com>
  7. Date: 12 Aug 92 22:28:15 GMT
  8. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  9. Lines: 20
  10.  
  11. This is in response to infra@heart.ubc.ca or something like that.  My note
  12. came back garbled:
  13.  
  14.  Re: How do regions work?
  15.  
  16. Based on the fact that PtInRegion works only in device coordinate world,
  17. I would surmise that your second guess (floodfill) is close to the mark.
  18. You should probably implement it in assembler for speed, unless your
  19. software (a) checks few points, or (b) runs on 80486+ only. :-)
  20.  
  21. There are mathematical methods for determining whether a point lies
  22. within a convex polygon, but those involving concave or complex polys
  23. are quite a lot more difficult.  See "Algorithms in C" for some
  24. discussion of this.
  25.  
  26. Cheers,
  27. Bill Whedon
  28.  
  29.  
  30.  
  31.