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

Username:   Password: 
 RegisterRegister   
 What drawfill would you use, to make an iregular shape such as a cloud, and a tree?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
munt4life




PostPosted: Wed Dec 01, 2010 3:32 pm   Post subject: What drawfill would you use, to make an iregular shape such as a cloud, and a tree?

any tips would help Very Happy
Sponsor
Sponsor
Sponsor
sponsor
D_homes




PostPosted: Tue Jan 11, 2011 7:29 am   Post subject: Re: What drawfill would you use, to make an iregular shape such as a cloud, and a tree?

Syntax drawfill (x, y : int, fillColor, borderColor : int)

Description The drawfill procedure is used to color in a figure that is on the screen. Starting at (x, y), the figure is filled with fillColor to a surrounding border whose color is borderColor.


Example This program draws an oval with x and y radius of 10 in the center of the screen using color 1. Then the oval is filled with color 2. The maxx and maxy functions are used to determine the maximum x and y values on the screen.
setscreen ("graphics")
const midx := maxx div 2
const midy := maxy div 2
drawoval (midx, midy, 10, 10, 1)
drawfill (midx, midy, 2, 1)


Straight from the Turing Reference Documents. drawfill will fill in any enclosed shape.


Edit: This thread is in the wrong section btw
Insectoid




PostPosted: Tue Jan 11, 2011 9:56 am   Post subject: RE:What drawfill would you use, to make an iregular shape such as a cloud, and a tree?

Note that in some cases Turing's draw commands do NOT create a completely enclosed object- there may be even a single pixel missing that will cause drawfill to leak out and draw to the entire screen.
Tony




PostPosted: Tue Jan 11, 2011 11:32 am   Post subject: RE:What drawfill would you use, to make an iregular shape such as a cloud, and a tree?

Moved to the correct forum.

Answer - lots and lots of Draw.Dot 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  [ 4 Posts ]
Jump to:   


Style:  
Search: