#### Archived

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

# DirectX 7.0 DirectDraw Blt Bug?

This topic is 5228 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.
...

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]

##### Share on other sites
I believe blt is inclusive.

Just change your srcRect to accommodate.

Ben

[ IcarusIndie.com | recycledrussianbrides.com ]

• ### Forum Statistics

• Total Topics
628633
• Total Posts
2983955

• 10
• 18
• 20
• 12
• 9