Dashed line
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Dashed line
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
Any suggestions would be appreciated.
Peter
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
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
And ... this is also true today? 

Re: Dashed line
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
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
Hi Mag,
It works with LC 6.6.1 and does not look awful when antialiased, see screenshot.
"dashes" are set to 30,20 in my example.
Best
Klaus
why not make a quick test with a graphic yourself?Mag wrote:And ... this is also true today?

It works with LC 6.6.1 and does not look awful when antialiased, see screenshot.

"dashes" are set to 30,20 in my example.
Best
Klaus
Re: Dashed line
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...
Klaus, where are the dashes property? I had not find it in the inspector... OK, I will search the Dictionary...

Re: Dashed line
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.
No interface to set the values unfortunately, you need to do this via script.
Re: Dashed line
Thank you Klaus!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.
Re: Dashed line
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:39 pm, edited 1 time in total.
shiftLock happens
Re: Dashed line
Hemann.
You sort of used "marching ants" (I am thinking about the "j" in your switch construction) in your handler. Adorable.
Craig
You sort of used "marching ants" (I am thinking about the "j" in your switch construction) in your handler. Adorable.
Craig
Re: Dashed line
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:38 pm, edited 1 time in total.
shiftLock happens
Re: Dashed line
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
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
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Dashed line
Simple way to create a dashed line
1) Draw a line
2) put the following code into the script of the line you drew
Put the IDE in run mode and click line.
based upon : https://livecode.fandom.com/wiki/Dashes
Regards,
Paul
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
based upon : https://livecode.fandom.com/wiki/Dashes
Regards,
Paul