MY FINAL ISU: ENJOY!
Author |
Message |
Reality Check
|
Posted: Wed Jun 14, 2006 11:20 pm Post subject: MY FINAL ISU: ENJOY! |
|
|
To clarify, I'm in grade 10 and just finished my ISU. Its a paint program and I really like how its turned out. I've tested on 4 different computers and it runs smoothly on all. I'd like to thank these forums for helping me through some rough patches and I'd like to clarify that the spray can tool concept was obtained from one of the topics made by a regular (Andy I think could be wrong though). I was going to implement a file > save as and file > load type of thing but I ran out of time. So for future reference, what are some improvements I could make and whats good about it? Thanks for the feedback.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
[Gandalf]
|
Posted: Wed Jun 14, 2006 11:33 pm Post subject: (No subject) |
|
|
There's no file or source code.
|
|
|
|
|
|
Reality Check
|
Posted: Wed Jun 14, 2006 11:45 pm Post subject: (No subject) |
|
|
*hits self on head*
I was too busy writing my topic that I forgot to put it in
*hits self again*
here
Description: |
|
Download |
Filename: |
ARIAN ISU.rar |
Filesize: |
104.99 KB |
Downloaded: |
392 Time(s) |
|
|
|
|
|
|
Reality Check
|
Posted: Thu Jun 15, 2006 1:53 pm Post subject: (No subject) |
|
|
My teacher says she really likes it . I may add in a save feature and undo feature...although the undo will only work once so no more than one undo.
|
|
|
|
|
|
upthescale
|
Posted: Thu Jun 15, 2006 1:55 pm Post subject: (No subject) |
|
|
amazing man, i love the spray painttool
|
|
|
|
|
|
jamonathin
|
Posted: Thu Jun 15, 2006 2:20 pm Post subject: (No subject) |
|
|
I've never written a paint program myself, but save and undo will be fairly easy to incorporate into your program.
For Save:
You are already drawing and capturing a picture, its all a matter of using Pic.Save - really easy to use. And you know how to make your own buttons, so it should be fairly easy for you.
For Undo:
You could just store the images in an array, like such.
code: |
var pics : flexible array 1 .. 0 of int |
And every time you need to make a picture you add 1 and take a pic, like such:
code: |
new pics, upper (pics) + 1
pics (upper(pics)) := Pic.New (0, 0, maxx, maxy) |
Then when undo-ing, just check like such. .
code: |
if upper(pics) - 1 > 0 then
new pics, upper (pics) - 1
end if
Pic.Draw (pics(upper(pics), 0, 0, picCopy) |
Somethin like that.
But you have an error in your program, and thats when you draw a maple leaf or star too far (off screen).
Good work on it .
|
|
|
|
|
|
upthescale
|
Posted: Thu Jun 15, 2006 6:40 pm Post subject: (No subject) |
|
|
also when u click and hold a button the screen will go flashy, fer the filled adn not filled, to fix that put setscreen("offscreenonly") at the top and right b4 the end loop at the bottom, place the 2 werds
View.Update
other than that amazing job as said b4 lol
|
|
|
|
|
|
Reality Check
|
Posted: Thu Jun 15, 2006 9:01 pm Post subject: (No subject) |
|
|
My teacher was nice enough to allow me to re-submit with a save and load feature. Should be extremely easy to implement.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
[Gandalf]
|
Posted: Sat Jun 17, 2006 9:15 pm Post subject: (No subject) |
|
|
jamonathin wrote: For Undo:
You could just store the images in an array, like such.
code: |
var pics : flexible array 1 .. 0 of int |
And every time you need to make a picture you add 1 and take a pic, like such:
code: |
new pics, upper (pics) + 1
pics (upper(pics)) := Pic.New (0, 0, maxx, maxy) |
Then when undo-ing, just check like such. .
code: |
if upper(pics) - 1 > 0 then
new pics, upper (pics) - 1
end if
Pic.Draw (pics(upper(pics), 0, 0, picCopy) |
Somethin like that.
The problem is that that would require massive amounts of memory, something which Turing isn't really efficient at. An alternative would be to save all the Draw module calls needed to create your image in a text file, and add/subtract from that when something is drawn/you undo. The only down side to this is that you would need to redraw everything when you undo, but it's still far more efficient than saving a bunch of pictures to memory.
|
|
|
|
|
|
Guest
|
Posted: Sat Jun 17, 2006 9:32 pm Post subject: (No subject) |
|
|
That's crazy. Only a few lines of code for all that.
|
|
|
|
|
|
Reality Check
|
Posted: Sat Jun 17, 2006 10:13 pm Post subject: (No subject) |
|
|
I don't tink I'll get around to doing the undo, I added an undo but it works once. Maybe after exams when I have time I'll work on it.
|
|
|
|
|
|
MysticVegeta
|
Posted: Sun Jun 18, 2006 2:02 pm Post subject: (No subject) |
|
|
Hmm I will try to remember what I did, I think for undo I made a 2D int array of size of the drawpad, then ran a loop and stored the value of each pixel in the array... then if undo was pressed then the values of new 2d array would be replaced by that of the old 2d array and a sketch of that would be drawn
|
|
|
|
|
|
[Gandalf]
|
Posted: Sun Jun 18, 2006 3:16 pm Post subject: (No subject) |
|
|
Tsk tsk, that would be even less efficient than storing an array of images via Pic.Save, and it would basically be doing the same thing.
|
|
|
|
|
|
|
|