Thread: 90 Degree Rotation Blt

  1. #1
    Unregistered
    Guest

    Question 90 Degree Rotation Blt

    I'm trying to do a 90 degree rotation blt, but I can't seem to get it working.


    HRESULT hr;
    RECT scRect, destRect;
    DDBLTFX ddBltFX;

    scRect.left = (124*frame); //frame is a class member
    scRect.right = scRect.left + 124;
    scRect.top = (248*move); //move is a class member
    scRect.bottom = scRect.top + 248;

    destRect.left = 300;
    destRect.right = destRect.left + 124;
    destRect.top = 150;
    destRect.bottom = destRect.top + 248;

    ddBltFX.dwSize = sizeof( DDBLTFX );
    ddBltFX.dwDDFX = DDBLTFX_ROTATE90;
    ddBltFX.dwRotationAngle = 90;

    if(FAILED(hr = pDD7temp->Blt( &destRect, pDD7Surface, &scRect, DDBLT_KEYSRC | DDBLT_WAIT | DDBLT_DDFX, &ddBltFX)) )
    return;

    Does anyone have a simple walkthrough for rotation blts in DirectX7? Or maybe just an answer to my question?

    Thanks-
    Asmo1986

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    http://www.leunen.com/cbuilder/rotbmp.html

    You should be able to adapt this by locking the surface and manipulating the pixels.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. camera rotation matrix
    By Vick jr in forum Game Programming
    Replies: 5
    Last Post: 05-26-2009, 08:16 AM
  2. Image rotation - doesn't always work
    By ulillillia in forum C Programming
    Replies: 12
    Last Post: 05-03-2007, 12:46 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. one final problem with rotation
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 11-19-2003, 03:50 AM