Computer Science Canada

drawfill with triangle problems!

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

Author:  Tony [ 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.

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

Author:  B-Man 31 [ 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

Author:  Turing_Gamer [ 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'

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

Author:  belarussian [ Mon Nov 23, 2009 9:31 pm ]
Post subject:  Re: drawfill with triangle problems!

srry not a function but a procedure


: