Jump to content
  • Advertisement

Archived

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

tehJaquio

How do i flip a surface (vertically) in DirectDraw 7?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
If you're using the DD Blitter, I believe passing a RECT with negative coords will flip it. I may be mistaken, though (I've not tried it, but I remember reading it somewhere)



[edited by - Xanth on October 24, 2003 1:54:50 PM]

Share this post


Link to post
Share on other sites
just found this straight from Microsoft:

Enum CONST_DDBLTFXFLAGS
DDBLTFX_ARITHSTRETCHY = 1
DDBLTFX_MIRRORLEFTRIGHT = 2
DDBLTFX_MIRRORUPDOWN = 4
DDBLTFX_NOTEARING = 8
DDBLTFX_ROTATE180 = 16
DDBLTFX_ROTATE270 = 32
DDBLTFX_ROTATE90 = 64
DDBLTFX_ZBUFFERBASEDEST = 256
DDBLTFX_ZBUFFERRANGE = 128
End Enum

i guess this does the job, haven''t tried it yet

Share this post


Link to post
Share on other sites
I believe, but can''t quite remember if it works, that when you pass a source rect to the blitter, you can flip the top/bottom or right/left values and it will do the flip for you.

Share this post


Link to post
Share on other sites
it worked! is like this:

//sample code for mirroring a surface
DrawEffects dfx = new DrawEffects();
dfx.EffectOperationMirrorLeftRight = true;

m_Back.Draw(Sprite.DestRect, Sprite.SpriteSurface,
Sprite.SourceRect, DrawFlags.Effects |
DrawFlags.Wait | DrawFlags.KeySource, dfx);

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!