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

Username:   Password: 
 RegisterRegister   
 Need help with drawfill function
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Deshwitat




PostPosted: Mon Apr 19, 2004 6:01 pm   Post subject: Need help with drawfill function

I'm new to all this Turing programming stuff and just started learning a few days ago. I've been trying to fill in a triangle with the color but I haven't been able to get it to work. If anyone can help me out with what to put into the x, and y values that'd be awesome.

Heres what I have.

%program to draw a happy face
setscreen ("graphics:640;480,nocursor")
%first, draw the yellow triangle
drawline (250, 150, 400, 150, 14)
drawline (250, 150, 325, 350, 14)
drawline (400, 150, 325, 350, 14)
drawfill (x, y, 14, 14)
%next, draw the eyes
drawline (300, 250,310,250,12)
drawline (350, 250,340,250,12)
%now, draw the mouth
drawarc (325, 200, 10, 10, 0, 180, 10)


Heh...suppose to be a triangle with a sad face...wierd assignment from the teacher...
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Apr 19, 2004 6:12 pm   Post subject: (No subject)

lol Laughing
code:

drawfill (325, 200, 14, 14)


the trick I found helpful is to use Draw.FillOval instead of Draw.Fill so that you can visually see where the coordinates are in relationship to everything else on the screen. After you found a spot that works, just change it backk to Draw.Fill with x/y values.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Deshwitat




PostPosted: Mon Apr 19, 2004 6:14 pm   Post subject: (No subject)

ahhhhh...~~ I get it...haha...still getting used to using Turing...heh thanks for the advice Very Happy
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  [ 3 Posts ]
Jump to:   


Style:  
Search: