Page 1 of 1

Dashed line

Posted: Fri Nov 23, 2007 11:51 pm
by petero
I have tried, unsuccessfully, to create a dashed line (arrow) in Revolution. I would like to eventually do this in a script but I can't even do it when in edit mode. I have checked the properties dashed lines box, I have tried transcript (setting the dashed lines property). Nothing seems to do it. I am creating in OSX.

Any suggestions would be appreciated.

Peter

Posted: Sat Nov 24, 2007 12:56 am
by malte
have you tried turning off antialiasing?

All the best,

Malte

Posted: Sat Nov 24, 2007 12:38 pm
by Klaus
Hi Peter-O,

From the docs for "dashes":
##...
Cross-platform note: On Mac OS and OS X, and Windows 95/98 systems, the dashes property cannot control the length of dashes and blanks: setting the dashes to any non-empty value at all creates a dashed line, but the length of dashes and blanks is controlled by the operating system.
##...

And yes, looks like this only works for not antialiased graphics at all.
Ergo: Hardly usable ;-)


Best

Klaus

Re: Dashed line

Posted: Mon May 26, 2014 10:25 pm
by Mag
And ... this is also true today? :roll:

Re: Dashed line

Posted: Tue May 27, 2014 3:41 am
by dunbarx
Peter.

The anti-aliased line looks awful.

It would not be hard to make your own, with a line graphic and a bunch of other opaque borderless objects all grouped together. I don't know how much you would need to manipulate this thing, though you could certainly could virtually make a new "object", with settable gap widths, etc.

Craig Newman

Re: Dashed line

Posted: Tue May 27, 2014 1:37 pm
by Klaus
Hi Mag,
Mag wrote:And ... this is also true today? :roll:
why not make a quick test with a graphic yourself? 8)

It works with LC 6.6.1 and does not look awful when antialiased, see screenshot. :D
"dashes" are set to 30,20 in my example.


Best

Klaus
dashed_line_lc_661.jpg

Re: Dashed line

Posted: Tue May 27, 2014 2:28 pm
by Mag
Hi dunbarx and Klaus, thank you so much.

Klaus, where are the dashes property? I had not find it in the inspector... OK, I will search the Dictionary... :lol:

Re: Dashed line

Posted: Tue May 27, 2014 2:38 pm
by Klaus
In the inspector right under the "linesize" field there is a checkbox to turn dashes on or off.
No interface to set the values unfortunately, you need to do this via script.

Re: Dashed line

Posted: Tue May 27, 2014 3:01 pm
by Mag
Klaus wrote:In the inspector right under the "linesize" field there is a checkbox to turn dashes on or off.
No interface to set the values unfortunately, you need to do this via script.
Thank you Klaus!

Re: Dashed line

Posted: Sat May 31, 2014 3:02 pm
by [-hh]
..........

Re: Dashed line

Posted: Mon Jun 02, 2014 5:34 pm
by dunbarx
Hemann.

You sort of used "marching ants" (I am thinking about the "j" in your switch construction) in your handler. Adorable.

Craig

Re: Dashed line

Posted: Mon Jun 02, 2014 10:26 pm
by [-hh]
..........

Re: Dashed line

Posted: Tue Jun 03, 2014 2:53 pm
by dunbarx
Hermann.

It does. All LC graphics have a "dash" property.

Place an arc below two lines oriented as you drew it. If anyone can make the dashes in that arc march, you can.

Craig

Re: Dashed line

Posted: Sat Dec 14, 2019 3:46 pm
by mrcoollion
Simple way to create a dashed line

1) Draw a line
2) put the following code into the script of the line you drew

Code: Select all

on mouseUp
   set the dashes of me to 10,2
end mouseUp
Put the IDE in run mode and click line.

based upon : https://livecode.fandom.com/wiki/Dashes

Regards,

Paul