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

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




PostPosted: Sat Jun 24, 2006 2:37 pm   Post subject: Color

Move the arrow with the right arrow key. Now my problem is the Draw.Fill
command. It is ok at first, (the triangle have an inside of red) but when i move it, the hole screen changes to red, is it because there is an opening?

thx in advance, robbie

code:

setscreen ("offscreenonly")
var x, y : real := 100
var angle : real := 0
var chars : array char of boolean
var speed : real := 0
loop
    cls

    Input.KeyDown (chars)

    Draw.ThickLine (round (x), round (y + 10), round (x + cosd (angle) * 30), round (y + sind (angle)), 3, 7)
    Draw.ThickLine (round (x), round (y - 10), round (x + cosd (angle) * 30), round (y + sind (angle)), 3, 7)



    Draw.Arc (round (x - 100), round (y - 20), round (x + cosd (angle) * 3), round (y + 50 + sind (angle)), 4, 12, 7)


    drawfill (round (x + 10), round (y), 12, 7)


    if chars (KEY_RIGHT_ARROW) then

        angle += 2

    end if


    delay (3)
    View.Update
end loop


Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Jun 24, 2006 3:02 pm   Post subject: (No subject)

add in this line right after teh drawfill
code:

    drawfill (round (x + 10), round (y), 12, 7)
    Draw.Oval(round (x + 10), round (y),3,3,blue)

and you'll see _exactly_ where your problem is Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: