Computer Science Canada My First Class |
Author: | Anonymous [ Sun May 28, 2006 5:22 pm ] | ||
Post subject: | My First Class | ||
Im testing out Classes now, and I can't think at the moment (low on food energy), so how would I implement my box_fill proc in a way so when I let go of the mouse, it fills the area and the drawfillbox(0,0,maxx,maxy,black) doesn't erase the filled box.
|
Author: | jamonathin [ Sun May 28, 2006 6:00 pm ] |
Post subject: | |
Well what you could do and what is also used in some paint programs is simply taking a picture of the screen, a screen shot. Now, rather than drawing the black background, you draw the last saved picture image, where the first picture would be a big black box. Then once the user releases the box, take a picture before you update the screen and voila, new background. Then if you wanted to expand from that, you could keep an array of images where it displays the last taken picture - so that if the user wanted to undo anything you just resort to one of the previous pictures. But i know you're not trying to make paint, just learn classes ![]() That's my thought at least (unless you want to save co-ordinates) |