Computer Science Canada

Jdraw v1.0 (prolly the only version that wil ever exist o.O)

Author:  jrblast [ 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

Author:  do_pete [ Wed Nov 30, 2005 11:23 am ]
Post 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

Author:  jamonathin [ Wed Nov 30, 2005 1:58 pm ]
Post 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.

Author:  Tony [ Wed Nov 30, 2005 2:01 pm ]
Post 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.

Author:  jrblast [ Wed Nov 30, 2005 6:54 pm ]
Post 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,


: