Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Doted line
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Lancelot




PostPosted: Fri Nov 04, 2005 2:38 pm   Post subject: Doted line

Is it possible to make a function which will draw a doted(or dashed) line from one point to another?

Thank you.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Nov 04, 2005 3:15 pm   Post subject: (No subject)

yes, it's quite possible, and relativly simple too. Give it a try Smile
[Gandalf]




PostPosted: Fri Nov 04, 2005 4:22 pm   Post subject: (No subject)

Here, I'll start you off...

code:
for i : 1 .. 50
    if i mod 2 = 0 then
        Draw.Line (50 + (i * 10), 50, 50 + (i + 1) * 10, 50, black)
    end if
end for

Smile
There is much to go on this code, but it shows the basic idea. You have to make it a function, add some flexibility, the availability for you to specify the start and end coords, etc. Good luck, and if you need any more help ask.
MysticVegeta




PostPosted: Fri Nov 04, 2005 6:01 pm   Post subject: (No subject)

Hmm, even more kissed.
code:
for i : 1 .. 50 by 2
    Draw.Line (50 + (i * 10), 50, 50 + (i + 1) * 10, 50, black)
end for
codemage




PostPosted: Sun Nov 06, 2005 8:57 pm   Post subject: (No subject)

Why not just do that with one line of code? (Ver 4.0.5)

code:
Draw.DashedLine (0, 200, maxx, 200, drawDot, black)


Doesn't get much simpler than that.
MysticVegeta




PostPosted: Sun Nov 06, 2005 10:27 pm   Post subject: (No subject)

wow i really gotta read the manual again!
Albrecd




PostPosted: Wed Nov 09, 2005 3:05 pm   Post subject: (No subject)

Quote:
wow i really gotta read the manual again!


Or you could just use the Turing Reference.
codemage




PostPosted: Wed Nov 09, 2005 4:12 pm   Post subject: (No subject)

Draw, F9.
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Wed Nov 09, 2005 6:58 pm   Post subject: (No subject)

Albrecd wrote:
Quote:
wow i really gotta read the manual again!


Or you could just use the Turing Reference.


that is what i meant by manual
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: