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

Username:   Password: 
 RegisterRegister   
 drawfill with triangle problems!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
hamid14




PostPosted: Fri Nov 20, 2009 8:36 pm   Post subject: drawfill with triangle problems!

What is it you are trying to achieve?
Trying to fill in a triangle I drew


What is the problem you are having?
I can't figure out how to use drawfill command

Describe what you have tried to solve this problem
I have tried putting in different x and y values


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)


Turing:


drawline (50,205,20,195,41)
drawline (20,195,50,200,41)
drawline (50,200,50,205,41)



Please specify what version of Turing you are using
4.1
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Nov 20, 2009 8:53 pm   Post subject: RE:drawfill with triangle problems!

I don't see you using drawfill in the posted code. If you are having trouble figuring out your coordinates, replace drawfill with Draw.Oval, to easily see where you are actually trying to fill from.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
belarussian




PostPosted: Fri Nov 20, 2009 9:06 pm   Post subject: Re: drawfill with triangle problems!

ok do draw.fill inside the triangle you drew so you can fill it

for example
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


drawline (50,205,20,195,41)
drawline (20,195,50,200,41)
drawline (50,200,50,205,41)
Draw.Fill (centre of trianglex,centre of triangley,fill color,background color)

BooHoo Canada Exclamation Wink Neutral
B-Man 31




PostPosted: Fri Nov 20, 2009 9:28 pm   Post subject: Re: drawfill with triangle problems!

belarussian @ Fri Nov 20, 2009 9:06 pm wrote:
ok do draw.fill inside the triangle you drew so you can fill it

Draw.Fill (centre of trianglex,centre of triangley,fill color,background color)



The last parameter is wrong in that, its the colour you which the drawfill to stop filling at, not the background colour, in his case it would be colour 41
Turing_Gamer




PostPosted: Sun Nov 22, 2009 5:03 pm   Post subject: Re: drawfill with triangle problems!

Search 'Draw.Fill' in the Turing index...
1. Press F10
2. Click index
3. Find 'Draw.Fill'
belarussian




PostPosted: Mon Nov 23, 2009 9:00 pm   Post subject: Re: drawfill with triangle problems!

ok look you have to make a function which will make three points aND THE IN THE procedure draw lines which will connect those dots. there easy
belarussian




PostPosted: Mon Nov 23, 2009 9:31 pm   Post subject: Re: drawfill with triangle problems!

srry not a function but a procedure
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  [ 7 Posts ]
Jump to:   


Style:  
Search: