On Fri, Nov 26, 2004 at 06:30:21PM -0500, Albert Cahalan wrote: > I was just preparing to cache the stamp outline. When the > stamp changes (new choice, flip, mirror, or scaling), the > outline needs to be recomputed. There's no need to be > computing it every time the mouse moves a tiny bit.
Yes, I've noticed that. :^) On my 450MHz Celeron, the recomputation takes up QUITE a bit of time. So much so that if I move the mouse quickly enough, the event handler seems to loose the last few positions. This causes the outline to stay where it was, while the "+" mouse pointer has moved a few inches away. If I click to place the stamp, of course (part of) the old outline remains. :^( > The code in CVS is prepared for this now. Notice that > update_stamp_xor has been split out of stamp_xor. Now > there are two reasonable options: I tried simply moving the 'update_stamp_xor()' call to whenever the stamp shape changes (mousewheel rolls or user specifically clicks a stamp button on the right). This seems to work great, so far. (I need to make sure the first stamp, when the Stamp tool is first chosen, causes this update, as well) I'll commit in a moment... <snip> > If this works out well, maybe the low-quality stamp > outline code will be pointless to keep. I notice that's "gone" all of a sudden. ;^) I wouldn't discount it. We'll need to hear back from LTSP users as to whether the new code works well enough. If not, we should keep that feature around. > BTW, there's a bit of a problem with flicker. I suppose > the solution might involve a canvas-sized bitmap for the > outline. Then there would never be a need to clear the > old outline prior to painting the new one; the clearing > and painting would take place in one operation. What's flickering, exactly? Thx! -bill! [EMAIL PROTECTED] Have I been helpful? http://newbreedsoftware.com/ http://svcs.affero.net/rm.php?r=billkendrick _______________________________________________ Tuxpaint-dev mailing list [EMAIL PROTECTED] http://tux4kids.net/mailman/listinfo/tuxpaint-dev
