Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: Easy way to draw the rubber band?? Message-ID: <53705@apple.Apple.COM> Date: 6 Jun 91 15:49:56 GMT References: <30149@hydra.gatech.EDU> <53513@apple.Apple.COM> <1991May31.151716.5814@midway.uchicago.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 20 jcav@quads.uchicago.edu (john cavallino) writes: >In article <53513@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes: >>[...about doing rubber-banding, to which John writes...] > >All of the futzing around to create the rectangle from the points can be >eliminated if you use the Quickdraw procedure _Pt2Rect (IM I-175). I knew that it existed, but I must've been suffering a temporary case of blindness when perusing those pages in Inside Mac, so I did it the hard way. Also, in a separate message, it was pointed out the check to see if the mouse moved should be "if ((newPt.v != lastPt.v) || (newPt.h != lastPt.h))" instead of "&&". Brain-deadness on my part, I guess... steve -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Christensen Never hit a man with glasses. stevec@apple.com Hit him with a baseball bat.