http://code.google.com/p/gnu-open-canvas/
The one on the left is the real thing. The one on the right was created by my program reading the WPE file. I swear it! I'm sure it looks easy now, but i've been up nights reverse-engineering OpenCanvas's weird tablet arithmetic.
The project is still very immature, the Eraser, Blur and Watercolor tools are still total crap. Personally I don't use those, so I'm more interested in getting a UI in front of this existing functionality so you guys can play with it.
If anyone has any experience or bright ideas for how Undo functionality can work in a Photoshop-like application without eating up huge amounts of resources, please let me know!! OC supports 9 undo states for each layer, so if I were stupid enough to try and cache the 9 previous states for each layer as image data in memory, my program would consume 9 times the resources...
The one on the left is the real thing. The one on the right was created by my program reading the WPE file. I swear it! I'm sure it looks easy now, but i've been up nights reverse-engineering OpenCanvas's weird tablet arithmetic.
The project is still very immature, the Eraser, Blur and Watercolor tools are still total crap. Personally I don't use those, so I'm more interested in getting a UI in front of this existing functionality so you guys can play with it.
If anyone has any experience or bright ideas for how Undo functionality can work in a Photoshop-like application without eating up huge amounts of resources, please let me know!! OC supports 9 undo states for each layer, so if I were stupid enough to try and cache the 9 previous states for each layer as image data in memory, my program would consume 9 times the resources...
Category All / All
Species Unspecified / Any
Size 318 x 353px
File Size 90.3 kB
that was a thought i had, like each undo layer would just be the size of the stroke it was undoing. but couldn't that also grow hyuuuuuge if the user just draws 9 big strokes per layer? Like, a line from the lower-right to the upper left, 9 times?
for the worst case, it doesn't seem to make anything any better! (although i guess i could say the same for quicksort)
for the worst case, it doesn't seem to make anything any better! (although i guess i could say the same for quicksort)
You could save the whole image for the undo buffer every 10 or 20 changes, and if someone wants to go back one or two, have the program redraw the strokes since the last image cache. This would not take much space, and it could be adjested based on stroke detail and the power needed to redraw individual strokes.
That's my favorite idea yet. Since oC doesn't let you undo more than 10, i'll just always keep 10 strokes on the buffer. The only problem here is that strokes can take a long time to draw, if they're drawn with big brushes. So it might make undo slower than a different approach.
Thanks for your input!
Thanks for your input!
It looks like you've done a tremendous job. If you need help, put in an ad at SourceForge.net (your program is non-commercial, right?). I'm sure you'll get a response. Good luck!
FA+

Comments