Archived

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

tehJaquio

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

Recommended Posts

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