I'm trying to rotate and resize an alpha blended image, however I'm having trouble finding the correct method. The alphablt result is an oversized image. Here's my code
The result of this is an image that hasn't been properly scaled. Do the temporary surfaces cause this problem by not being scaled themselves or something?
- Code:
//blit the surfaces into the correct position & size using temporary surfaces
srcCopy->Blt(NULL, srcSurface, NULL,
GDBLT_ROTATIONANGLE |
GDBLT_ROTATIONSCALE,
&bltfx;);
alphaCopy->Blt(NULL, alphaSurface, NULL,
GDBLT_ROTATIONANGLE |
GDBLT_ROTATIONSCALE,
&bltfx;);
RECT imagerect;
::SetRect(&imagerect;, 0, 0,
srcCopy->GetWidth(), srcCopy->GetHeight());
RECT alpharect;
::SetRect(&alpharect;, 0,0,
alphaCopy->GetWidth(), alphaCopy->GetHeight());
//blit the temporary surfaces onto the display
pBackBuffer->AlphaBlt(NULL,srcCopy,&imagerect;,alphaCopy,&alpharect;,GDALPHABLT_OPACITY, α);
The result of this is an image that hasn't been properly scaled. Do the temporary surfaces cause this problem by not being scaled themselves or something?