rotating transparent bitmap causes a halo of transparent color around bitmap
-
When I rotate a transparent bitmap, the transparent background color will be drawn around the bitmap (a one pixel halo). This doesn't happen when the rotation is horizontal or vertical. I am doing the following masking: BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMemoryDC, 0, 0, SRCINVERT ); BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMaskDC, 0, 0, SRCAND ); BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMemoryDC, 0, 0, SRCINVERT ); At this point I have no clue as to why something like this would occur, because I have rotated the whole bitmap and saved it into the DC's. Has this happened to anyone before? Thanks!
-
When I rotate a transparent bitmap, the transparent background color will be drawn around the bitmap (a one pixel halo). This doesn't happen when the rotation is horizontal or vertical. I am doing the following masking: BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMemoryDC, 0, 0, SRCINVERT ); BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMaskDC, 0, 0, SRCAND ); BitBlt( hScreenDC, r.left, r.top, curWidth, curHeight, hMemoryDC, 0, 0, SRCINVERT ); At this point I have no clue as to why something like this would occur, because I have rotated the whole bitmap and saved it into the DC's. Has this happened to anyone before? Thanks!
Sounds like your rotation code is causing your mask to degrade, so that the transparent colour where it is next to another colour is slightly changed. Have you verified that the pixels in question are EXACTLY the background colour, and not off by one or two ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002