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

Username:   Password: 
 RegisterRegister   
 Drawing to Code
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
The_Bean




PostPosted: Sat Sep 13, 2008 12:19 am   Post subject: Drawing to Code

This is program is for anyone that has to make a clown face or anything else using a lot of drawing commands.

A simple drawing program where can you can use:
Draw.Dot
Draw.ThickLine
Draw.Box
Draw.FillBox
Draw.Oval
Draw.FillOval
Draw.MapleLeaf
Draw.FillMapleLeaf
Draw.Star
Draw.FillStar
to create a masterpiece, and then have the program output the code for the work of art fully scalable.
All colours are random, and the Draw.ThickLine's thickness is Rand.Int(1,5)

Warning: I do not suggest submitting the exact code you get to your teacher.



drawing_to_code.zip
 Description:
Enjoy

Download
 Filename:  drawing_to_code.zip
 Filesize:  342.7 KB
 Downloaded:  255 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Warchamp7




PostPosted: Sat Sep 13, 2008 11:13 am   Post subject: RE:Drawing to Code

Very nice program but it gets pretty laggy : /

That's not really your fault though.

Also, use a Window.Active to make sure the focus is on the drawing window whenever you click.

Nice work.
SNIPERDUDE




PostPosted: Sat Sep 13, 2008 1:57 pm   Post subject: Re: Drawing to Code

Pretty cool, wasn't laggy for me at all.

Really cool idea, really reminds me of my Visual Turing idea, but rather turing built-in graphics. Innovative and creative.

Smile
The_Bean




PostPosted: Sat Sep 13, 2008 6:31 pm   Post subject: Re: Drawing to Code

Heres an update with Arcs and Polygons

Arcs take a little bit of getting use to because of the way they are drawn.
Polygons are limited to 4 sides



drawing_to_code2.zip
 Description:

Download
 Filename:  drawing_to_code2.zip
 Filesize:  347.01 KB
 Downloaded:  157 Time(s)

Insectoid




PostPosted: Sat Sep 13, 2008 6:34 pm   Post subject: RE:Drawing to Code

Sounds pretty cool, though I haven't got the time to download right now. Random colors? It couldn't be too hard to make them choose-able. Even just a few buttons with maybe 6 colors.
SNIPERDUDE




PostPosted: Sat Sep 13, 2008 9:02 pm   Post subject: RE:Drawing to Code

The Draw.Arc if fun to use. Very Happy
The_Bean




PostPosted: Tue Sep 16, 2008 7:54 pm   Post subject: Re: Drawing to Code

Hopefully the final update to it:

Colour picker added on the right

Grid that always stays on top, but isn't put into the final code

ThickLine set to a thickness of 3 instead of random 1,5

Clear function added, removes everything that you've done but not the grid.

code shortened by 200 lines even with updates (now 490)



DrawingToCode-Sweet.zip
 Description:

Download
 Filename:  DrawingToCode-Sweet.zip
 Filesize:  345.47 KB
 Downloaded:  151 Time(s)

SNIPERDUDE




PostPosted: Wed Sep 17, 2008 6:51 am   Post subject: Re: Drawing to Code

Very well done Very Happy

+ bits
Sponsor
Sponsor
Sponsor
sponsor
petree08




PostPosted: Wed Sep 17, 2008 9:05 am   Post subject: RE:Drawing to Code

this is pretty cool
i was just wondering how are you getting the code to open in turing after it has been saved?
Carey




PostPosted: Wed Sep 17, 2008 2:16 pm   Post subject: RE:Drawing to Code

Probably using Sys.Exec or something of the sort and giving the created .t file to turing.exe as a parameter.
Boiq




PostPosted: Thu Sep 25, 2008 10:11 am   Post subject: RE:Drawing to Code

Awesome program, thanks a lot!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: