...
destRect.top = y;
destRect.left = x;
destRect.bottom = y + width;
destRect.right = x + height;
ZeroMemory( &ddfx, sizeof( ddfx ) );
ddfx.dwSize = sizeof( ddfx );
ddfx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT;
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]
DirectX 7.0 DirectDraw Blt Bug?
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.
I believe blt is inclusive.
Just change your srcRect to accommodate.
Ben
[ IcarusIndie.com | recycledrussianbrides.com ]
Just change your srcRect to accommodate.
Ben
[ IcarusIndie.com | recycledrussianbrides.com ]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement