Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!samsung!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st.tech Subject: Re: Drawing rubber-bands Message-ID: <1588@uqcspe.cs.uq.oz.au> Date: 24 May 91 02:08:32 GMT References: <1991May23.160310.2034@m2xenix.psg.com> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 28 >In drawing programs, it's common to allow lines between the mouse cursor >and a fixed point. Another example is the rubber-band boxes for selecting >a screen area. Would some kind soul tell me how they're done? The AES call graf_rubberbox() is one way. >It's easy enough to determine the start point by using the EventMulti >loop to detect the mouse button's first click, but how does one keep >track of the mouse cursor and draw to it AND know when the mouse button >is clicked again? >Is it necessary to drop out of the EventMulti loop and use lower-level >facilities? It doesn't make much sense to stay in the EventMulti loop, since nothing should really happen until the rubberbox is finished. eg. What should happen if the box extends over a desk accessory's window? Does it get an event? I use graf_rubberbox() normally, but I guess you'd use VDI calls with the AES VDI handle if you wanted something like a rubber line. Warwick. -- _-_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.-._/ University of Queensland, v Brisbane, AUSTRALIA.