[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
Re: [XaraXtreme-dev] Bitmap Gallery drag/View redraw
- From: Alex Bligh <alex@xxxxxxxxxxx>
- Date: Fri, 28 Apr 2006 19:08:46 +0100
- Subject: Re: [XaraXtreme-dev] Bitmap Gallery drag/View redraw
Gerry Iles wrote:
I'm pretty certain that you can do this as the non-transparent dragging
also does it and that works fine. The initial background is copied away
in SetupSolidDrag and DrawSolidDrag also copies what is on the screen.
Yes indeed. It does work.
The rendering code is quite tricky to understand as it deliberately
doesn't just blit the old background back to the screen before copying
away a new background and rendering the drag to eliminate the horrible
flicker that you get with that approach.
One problem seems to be that the mask works a bit differently. I think
the output should be something like
Output = (DragBitmap AND Mask) OR (Background AND NOT Mask)
Output = (DragBitmap AND NOT Mask) OR (Background AND Mask)
depending on the polarity of the mask.
It wasn't doing this (I think that's what the commented out lines
did on windows but they do nothing on wx as it just seems to use
bit values - unverified). So using AND_INVERT on one of them should
The next problem is even after fixing up mask creation (doh), the
mask is blank. I'm looking into this.
I expect that you should be able to get it working fairly quickly with a
bit of experimentation. You could try blitting the various other
bitmaps to the screen instead of the OffscreenDC (e.g. to see what is in
Bitmap.SaveFile() and GIMP is a boon.