Xref: utzoo comp.sys.mac.hypercard:4716 comp.sys.mac.programmer:18236 Path: utzoo!attcan!uunet!midway!daisy!francis From: francis@daisy.uchicago.edu (Francis Stracke) Newsgroups: comp.sys.mac.hypercard,comp.sys.mac.programmer Subject: Re: odd-shaped buttons Message-ID: <1990Oct13.000500.14994@midway.uchicago.edu> Date: 13 Oct 90 00:05:00 GMT References: Sender: news@midway.uchicago.edu (News Administrator) Organization: Mathematics Department, University of Chicago Lines: 23 In article ch2i+@andrew.cmu.edu (Charles A. Hill) writes: >I want to use the outlines of a picture to define the parameters of a >button. In other words, if someone clicks anywhere within the outlines >of a picture (no matter what shape the picture is), the button will be >activated. I've been trying to improvise by filling all the nooks and [...] >I don't know any languages but Hypertalk, but I'm told that making an >irregularly shaped picture "hot" is no sweat in a language such as C. It's not incredibly easy. You'd have to have some way of getting the region from the bitmap (is this supported by the Toolbox?), then check, for each click, if the mouse is inside the region. In HC, this would take a XFCN returning a handle to the region, and another to check if a given point is in a given region. The card script would catch the mouseUp event, then act on it as necessary. Anybody in comp.sys.mac.programmer got any better ideas? | Francis Stracke | My opinions are my own. I don't steal them.| | Department of Mathematics |=============================================| | University of Chicago | A mathematician is a professional | | francis@zaphod.uchicago.edu | schizophrenic.--Me. |