PDA

Click to See Complete Forum and Search --> : My Drawing Project Just Kills Me! Help!


danny7
Mar 26th, 2001, 08:26 AM
Monday March 26, 2001

I'm working on a drawing program in which the user has the option of changing the background color of the picture box.

Problem: when the user changes the picture box's background color, all work is lost. Every line, scribble, shape and doodle are forever vanished! Is there a way to change a picture box's background color while preserving one's work?

Sincerely,
danny7
danny7@midplains.net

Mar 26th, 2001, 11:38 AM
I dont think so, at least not one that i can think of, except looping through each pixel, and if it is the old background color, set it to the new color. Its slow, but it will work.

Z.

Fox
Mar 26th, 2001, 01:01 PM
You could also BitBlt is to a temporary buffer, then change the color and BitBlt it back... would be faster I think.

Sastraxi
Mar 26th, 2001, 05:13 PM
Try recording an array of operations, one that has all of the points of every operation done, then when the bg colour is redrawn then just draw them back on!