Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!texbell!uhnix1!hermes.cs.uh.edu!matt From: matt@hermes.cs.uh.edu Newsgroups: comp.sys.mac.programmer Subject: drawing a polygon w/the mouse Message-ID: <34046@uhnix1.uh.edu> Date: 2 Aug 90 01:55:57 GMT Sender: nntppost@uhnix1.uh.edu Reply-To: matt@hermes.cs.uh.edu () Organization: University of Houston Lines: 19 Hi. Does anyone have any pointers to some sample code on how to let the user draw a polygon in the manner of MacDraw? (i.e. click to start the polygon, rubberband the line, click for the next vertex, etc., and double-click to stop.) I've got the rubberbanding down, but I'm having a bit of a hard time detecting the double-click to signify the end. My current, inelegant approach is to say delay(GetDblTime, tix) and then see if there's a mouse down event in the queue after each new vertex is created. Pretty cheesy, huh? Another thing I was wondering -- I'm using an xor transfer mode, but I noticed that apparently programs like HyperCard don't. How do they make it so you can rubberband a solid line and not wipe out the rest of the screen? Thanks for any help you can send my way. ------------------------------------------------------------------------------- Matt Emerson matt@cs.uh.edu