Page 1 of 1

Get a stroke applied to a single line?

Posted: Wed Aug 12, 2020 6:15 pm
by uncle808us
Hi: I looked and watched videos but could not find this answer.
When I draw a shape I can get the stroke automatically added but when I draw a single line I get no stroke thickness or any stroke. Is there a way to draw a single line using the add tool and have it stroked. I hope my question is clear.
Thanks.

Re: Get a stroke applied to a single line?

Posted: Wed Aug 12, 2020 6:27 pm
by synthsin75
Add points only creates a stroke when you close the line, by manually or automatically welding the end. You'd need to use the create shape tool to make a stroke on a two-point add points line.

Re: Get a stroke applied to a single line?

Posted: Thu Aug 13, 2020 1:47 am
by uncle808us
Thanks I thought so but was hoping to cut out that step. Again Thanks.

Re: Get a stroke applied to a single line?

Posted: Fri Aug 14, 2020 12:18 am
by DK
You can use the freehand drawing tool to create a stoked line. If you play with the settings you can get it to draw a straight line with minimal points.

Cheers
D.K

Re: Get a stroke applied to a single line?

Posted: Fri Aug 14, 2020 1:55 am
by uncle808us
Rodger That.. DK that is what I'm doing.

Re: Get a stroke applied to a single line?

Posted: Fri Aug 14, 2020 3:14 am
by DK
Wonder if a script could utilize "Expose Stroke" so as you plotted points it created a stroke? That would be a really handy tool I must admit.
I know as a shortcut sometimes I draw a single line then pepper it with points to quickly drag out a shape.

Cheers
D.K

Re: Get a stroke applied to a single line?

Posted: Sat Aug 15, 2020 5:41 am
by uncle808us
DK wrote: Fri Aug 14, 2020 3:14 am Wonder if a script could utilize "Expose Stroke" so as you plotted points it created a stroke? That would be a really handy tool I must admit.
I know as a shortcut sometimes I draw a single line then pepper it with points to quickly drag out a shape.

Cheers
D.K
Good tip I'll try that. PS the script for me would have to work in AS 11 pro as my computer is too old to run any newer version OS to support MOHO 12 + sadly.

Re: Get a stroke applied to a single line?

Posted: Sat Aug 15, 2020 5:29 pm
by hayasidist
had an idea that turned out to be pretty straightforward -- here it is --

http://www.mediafire.com/file/2ztq6e48n ... t.zip/file


it's the LM add point tool modified to recognise the "autostroke" option and create shapes for newly created paths. Each branch of a path is created as a new shape. I've left it this way for ease of implementation - if there's enough call for it, it is feasible to make the whole (branched) path one shape. Note that, if you 'close' the path, then the LM tool's 'create shape' behaviour kicks in and a further shape is created on top of the path shapes.

Consider this a "stable" beta -- but any issues (e.g. a clamour for "one shape for all connected points") please shout.

usual installation : copy the tool and the png to your custom folders. if you want the LM version in the bit bucket my suggestion would be to achieve that by replacing the entry in the tool list (and updating shortcuts)

((for anyone of a technical mindset - a curve is extended NOT by adding points on the end, but by dropping a new point into the path at the same place as the endpoint, leaving the original EndPoint as the point that's dragged around... ))

Re: Get a stroke applied to a single line?

Posted: Sun Aug 16, 2020 2:18 am
by uncle808us
Thanks very much for your time spent doing this I appreciate it.
I get a pop up.
Image
I don't know what it means I know nothing about coding.
Anyway I just close the pop up and it works fine.
Again thanks
Bob

Re: Get a stroke applied to a single line?

Posted: Sun Aug 16, 2020 12:55 pm
by hayasidist
ooops!

Bug fix for AS11 in this version (Moho 12 and later users don't need this update -- that function - moho:CurrentTool() - was not in AS11)

http://www.mediafire.com/file/2ztq6e48n ... t.zip/file

(same location)

Re: Get a stroke applied to a single line?

Posted: Mon Aug 17, 2020 3:14 am
by uncle808us
Thanks I installed the new version (uninstalled the old version).
I am still getting this message:
Image
I installed the update to tools should it be somewhere else?
I get the idea this message has to do with the image in the tools section??
This version also works fine.except for that message.
As I said before I appreciate you putting your time in on this very generous.
If it is a bother Please don't go to any further trouble.

Re: Get a stroke applied to a single line?

Posted: Mon Aug 17, 2020 12:16 pm
by hayasidist
uncle808us wrote: Mon Aug 17, 2020 3:14 am Thanks I installed the new version (uninstalled the old version).
I am still getting this message:
...
ok -- mea culpa -- not an excuse for the mess, just an explanation: like a ding-dong, I just looked at the version numbers of the SM tools for AS11 and Moho12 -- both 6.0 -- thought no more!! Then you reported the CurrentTool problem and again, I looked no further.... how WRONG could I be??!!!!

Bottom line, a whole lot had changed from 11 to 12... (bezier, multi-touch, ...) so the easy solution was to dig out the V11 release, take the V12 updates and apply them to the V11 base tool from SM.

This should do it: (and apologies in advance if not ... and, well ... you know how to find me! :wink: )
http://www.mediafire.com/file/cnupa1et4 ... 1.zip/file

tool .lua and icon (.png) to go into your custom content folder...

Re: Get a stroke applied to a single line?

Posted: Tue Aug 18, 2020 2:04 am
by uncle808us
I am so grateful for you endeavors your work and your brain. This is perfection!
Thank you Thank you.