> On Nov 24, 2016, at 11:57 AM, Sannyasin Brahmanathaswami <bra...@hindu.org> 
> wrote:
> 
> Question: is there a way to close the polygon path? It does appear to be 
> closed by default, but I can't actually get the last point of the last line 
> to snap-connect to the first point of starting line… maybe that is not 
> doable?  But, mute point since when you switch out the polygon is closed even 
> if you have a small "x over" at the return point… 

You can do this by script, just use something like the following script in the 
card or stack;
on newGraphic

 — use the altKey to ensure this is a chosen behaviour

 — leave the altKey condition out if this is to be the default behaviour
   if the altKey is down and the style of the last graphic = "polygon" then

      get the points of the last graphic

      put line 1 of it into line -1 of it

      set the points of the last graphic to it

      set the editMode of the last graphic to "polygon" -- Thank you Mark!

   end if

end newGraphic

This will make sure the first point and last point are equal and the graphic 
points are editable.
  set the editMode of the last graphic to “none” -- turn off the Reshape 
Polygon mode and remove the edit handles

Regards,

Paul
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to