Archived

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

thorpe

Flip (rotate) a surface 90 degrees (using DirectDraw)

Recommended Posts

thorpe    122
How do I do it? I''m using DirectX 7.0a if it is of any interest. I''d prefer to do it in hardware but if the display adapter doesnt have the capability, will directdraw flip it for me (in software)? Johan Torp - http://www.destruction.nu

Share this post


Link to post
Share on other sites
thorpe    122
Thanks for the tip but i just can''t get it working.... This is the code I use. What''s wrong (The blit doesn''t seem to take place if i use the DDBLT_DDFX flag)?


RECT destRect={x,y,
x + rcRect.right-rcRect.left,
y + rcRect.bottom-rcRect.top};

ZeroMemory(&ddbltfx, sizeof(ddbltfx));
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwDDFX=rot;
(*Destination)->Blt(&destRect, (*BlitSource), &rcRect, DDBLT_WAIT | DDBLT_KEYSRC | DDBLT_DDFX , &ddbltfx);

Btw, how do you guys get the colors when including a code piece in a message?


Johan Torp - http://www.destruction.nu

Share this post


Link to post
Share on other sites
thorpe    122
I figured out how to get colors so here is my code again, slighlty easier to read:

  RECT destRect={x,y,
x + rcRect.right-rcRect.left,
y + rcRect.bottom-rcRect.top};
ZeroMemory(&ddbltfx, sizeof(ddbltfx));
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwDDFX=rot;
(*Destination)->Blt(&destRect, (*BlitSource), &rcRect, DDBLT_WAIT | DDBLT_KEYSRC | DDBLT_DDFX , &ddbltfx);


Though my still question remains...

Johan Torp - http://www.destruction.nu

Share this post


Link to post
Share on other sites