This topic is now archived and is closed to further replies.


DirectX 7.0 DirectDraw Blt Bug?

Recommended Posts

flamewill    122
So far I have successfully loaded bitmaps to DirectDraw surfaces and flip them to create animation. Right now I am trying to mirror an image and the most peculiar thing happens. Snippets of my code as follows. The mirror (and color key) works only if the destination rectangle has a different height/width than the source rectangle. Otherwise, I can Blt to the destination, but no mirror and no transparency.
... = y;
destRect.left = x;
destRect.bottom = y + width;
destRect.right = x + height;

ZeroMemory( &ddfx, sizeof( ddfx ) );
ddfx.dwSize = sizeof( ddfx );

result = pCanvas->Blt( &destRect, pSurface, &srcRect, DDBLT_KEYSRC | DDBLT_DDFX, &ddfx );

The code as above will blt the image from pSurface to pCanvas. However it will not mirror or use transparency when blitting. Yet if I add one to destRect.bottom or destRect.right, it works. Of course the image is thus a little distorted due to stretching. Just hoping that someone else has also come across this and know what is going on...? [edited by - flamewill on August 15, 2003 11:57:34 AM]

Share this post

Link to post
Share on other sites