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

Username:   Password: 
 RegisterRegister   
 Jdraw v1.0 (prolly the only version that wil ever exist o.O)
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jrblast




PostPosted: Tue Nov 29, 2005 11:10 pm   Post subject: Jdraw v1.0 (prolly the only version that wil ever exist o.O)

42 lines with tags Very Happy the first program i ever made Very Happy not bad considering i started it (as well as turing) on friday, and finished it on saturday (night and morning respectiveley) but, i did know some commands and syntax from hanging out with my friends in teir comp sci class before school actualy started, but still, not bad for a beginner Very Happy

any comments are appreciated Very Happy



JDraw.t
 Description:
A simple 40 line drawing program with tags, features include change brush size, clear screen, change colour, and...thats it...lol

Download
 Filename:  JDraw.t
 Filesize:  968 Bytes
 Downloaded:  156 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
do_pete




PostPosted: Wed Nov 30, 2005 11:23 am   Post subject: (No subject)

not bad. try replacing
code:
    Mouse.Where (x, y, button)
    if button = 1 then
        Draw.FillOval (x, y, size, size, c)
    else

with
code:
    newx := x
    newy := y
    Mouse.Where (x, y, button)
    if button = 1 then
        Draw.ThickLine (newx, newy, x, y, size, c)
    else

it'll look much better. Ohh and don't forget to declare newx and newy
jamonathin




PostPosted: Wed Nov 30, 2005 1:58 pm   Post subject: (No subject)

do_pete wrote:
Ohh and don't forget to declare newx and newy

And to move the mouse command above newx.

I dont really see the difference between the two, except for the fact that the thick line is actually 5 pixels. But, I personally prefer the oval.
Tony




PostPosted: Wed Nov 30, 2005 2:01 pm   Post subject: (No subject)

jamonathin - the idea is to draw the line from previous point to the current..

this way if you were to move your mouse faster than oval's radius, it will still be continues.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
jrblast




PostPosted: Wed Nov 30, 2005 6:54 pm   Post subject: (No subject)

do_pete wrote:
not bad. try replacing
code:
    Mouse.Where (x, y, button)
    if button = 1 then
        Draw.FillOval (x, y, size, size, c)
    else

with
code:
    newx := x
    newy := y
    Mouse.Where (x, y, button)
    if button = 1 then
        Draw.ThickLine (newx, newy, x, y, size, c)
    else

it'll look much better. Ohh and don't forget to declare newx and newy


ill try it, but if you look at the topic title..."...prolly the only version that will ever exist"

Very Happy but thanks this much *spreads arms wide...stretches arms...arms fall off* for the suggestion,
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: