Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!actrix!templar!jbickers From: jbickers@templar.actrix.gen.nz (John Bickers) Newsgroups: comp.sys.amiga.programmer Subject: Selecting curves. Message-ID: <1804.tnews@templar.actrix.gen.nz> Date: 1 Apr 91 05:41:42 GMT Organization: TAP, NZAmigaUG. Lines: 43 Oops, I accidently deleted the article this is a followup to. The question was about selecting a curve, and a proposed solution which involved rendering the curve and checking each point for proximity with the mouse. Another approach, a lot simpler, and the one I'd use (ha, some recommendation, huh? :) is to have a pick box associated with the curve. It's an approach that I've seen used on a couple of large programs - Finale, a Mac scoring program, and Information Engineering Workbench, a PClone software engineering tool. The idea is to draw a little box at some point along the curve, and the user clicks in this to select the thing. You can XOR the box in, so it's optional whether it's displayed or not (for example, if you have several classes of objects, and only want to allow the user to select a particular class, you might only draw the pick boxes for objects in that class). This seems great for allowing the user to pick up control points for curves, endpoints for lines, etc. You can even give the user options for how large these pick boxes should be, use different pick boxes for different things, etc... .....[.] .. [.] . . [.] One nice thing is that it shows the user exactly where they can select, rather than having to have a feel for how close the mouse has to be to an object to select it. You can use this scheme for selecting anything, including those polygon shapes we were talking about before. Using a proper detection scheme is better for things like gadgets, where clicking on rectangles is what you're trying to avoid in the 1st place, but for clicking on objects in a drawing program pick boxes could be nicer. -- *** John Bickers, TAP, NZAmigaUG. jbickers@templar.actrix.gen.nz *** *** "Patterns multiplying, re-direct our view" - Devo. ***