Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!ukc!harrier.ukc.ac.uk!sah From: sah@ukc.ac.uk (S.A.Hill) Newsgroups: comp.sys.amiga.tech Subject: Re: Clicking on Irregular Shapes Message-ID: <1654@harrier.ukc.ac.uk> Date: 21 Jun 89 12:33:24 GMT References: <42700015@m.cs.uiuc.edu> Reply-To: sah@ukc.ac.uk (Steve Hill) Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 20 In article <42700015@m.cs.uiuc.edu> schwager@m.cs.uiuc.edu writes: > >Hope someone can help with this C question: > >Given an irregularly shaped object on a Screen, how can one tell if >the mouse button has been pressed inside of it? I don't want a box all > .... > >-Mike Schwager schwager@a.cs.uiuc.edu >-- {uunet,convex,pur-ee}!uiucdcs!schwager schwager%uiuc@csnet-relay.arpa > University of Illinois, Dept. of Computer Science The easiest thing to do would be to look at the colour under the pointer hot spot. Allocate one colour per country (note they needn't look different). If you don't have enough bit planes in the display to differentiate all the countries you can have some extra bit planes which aren't displayed. If memory is at a premium, you could use colour in combination with a table which gave a rough idea of what is where. Steve.