Archived

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

RegularKid

DirectX Help...

Recommended Posts

I have set up DirectDraw normal and everything is running good. However, when I want to scale a bitmap I just change the size of the destination rectangle and still call the usual blt function like this: lpBack->Blt(&dest, lpBmp, &src, DDBLT_KEYSRC | DDBLT_WAIT, NULL); But, whenever I scale something DirectDraw does antialiasing on it. How do I stop DirectDraw from doing this so that there is no antialiasing? Thanks.

Share this post


Link to post
Share on other sites
Are you sure that the image itself isn''t antialiased?
If the bitmap is antialiased, you might have your problem there.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites
Oh, wait, never mind, you mean when you scale it. Sorry, missed that.

This effect is known as pixelation distortion. It comes from the fact that there are not enough source pixels to know all of the destination pixels, or vice versa. There are different ways of alleviating the effect, known as using filters. One of the most common methods is bilinear filtering. Look it up somewhere.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites