Example #9 in the MetaCard example stack connects some buttons with lines 
that you can manipulate with the mouse.  I had this kind of functionality 
in a program I created that let the user annotate pictures with text and 
draw lines from the text to points on the picture to better illustrate 
their point.  They could click on and move either endpoint of the line if 
they wanted to in my app.

If I remember correctly, I think it goes something like this: 

set the points of graphic "foobarLine" to startx, starty, endx, endy


>>> >The "line" tool is a paint tool.  There are no "draw" tools in
>>> >MetaCard.  There is a "line" graphic style, though, which you can get
>>> >at with:
>>> >set the style of the templateGraphic to "line"
>>> >choose graphic tool
>>> 
>>> Almost there.  Adjusting the endpoints of the graphic does not seem 
>>> possible, at least not in the manner users are accustomed for line 
>>> objects.
>>
>>The object is always a rect, if that's what you mean.  This
>>characteristic would be extremely difficult to change.
>>
>>> Any chance we'll see the line style have selection/interaction behaviors 
>>> like standard line objects in drawing programs?
>>
>>There's always a chance, but it'd be good to know exactly what's wrong
>>with the way it works now first.
>
>In drawing programs for Mac OS and Windows (can't think of an exception 
>to these behaviors but there might be one), a line object is drawn by 
>dragging from the starting point to the ending point of the line.  Once 
>the line is created, it can be selected by clicking on it, and the 
>selection is indicated by a single handle at each of the two end points.  
>Dragging either of these handles adjusts that end point.
>
>For example, suppose you drag from 100,100 to 200,200.  This creates a 
>line at a 45 degree angle, sloped downward from top left to bottom right 
>(MC does this ok).  Clicking on the graphic should produce only two end 
>points (MC draws four), and it should be possible to drag the first end 
>point to 300,100, thus changing the slope of the line to upwards from 
>lower-left to upper right (attempting this manipulation in MC will only 
>resize the bounding rect of the line, but will not allow adjustment of 
>the direction of slope).
>
>See Canvas, SuperCard, Freehand, MacDraw, PowerPoint, SuperPaint, 
>Illustrator, InDesign, Quark, PageMaker, FrameMaker, FileMaker, 
>AppleWorks, Word, Excel, CorelDraw, or any CAD package for examples of 
>these line object behaviors.
>
>
>- Richard Gaskin 
>  Fourth World
>  Multimedia Design and Development for Mac, Windows, UNIX, and the Web
>  _____________________________________________________________________
>  [EMAIL PROTECTED]                 http://www.FourthWorld.com
>  US: 800-288-5825         Int'l: 323-225-3717        Fax: 323-225-0716

Reply via email to