drawfill with triangle problems!
Author |
Message |
hamid14
![](http://compsci.ca/v3/uploads/user_avatars/12047066924bcf67a12efdb.png)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
belarussian
|
Posted: 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)
![Neutral Neutral](images/smiles/icon_neutral.gif) |
|
|
|
|
![](images/spacer.gif) |
B-Man 31
![](http://compsci.ca/v3/uploads/user_avatars/370363944af8c60a7db3b.jpg)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Turing_Gamer
![](http://compsci.ca/v3/uploads/user_avatars/8617055374bcc8b48c6d4f.png)
|
Posted: 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' |
|
|
|
|
![](images/spacer.gif) |
belarussian
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
belarussian
|
Posted: Mon Nov 23, 2009 9:31 pm Post subject: Re: drawfill with triangle problems! |
|
|
srry not a function but a procedure |
|
|
|
|
![](images/spacer.gif) |
|
|