Hi,
I'm trying to display an image which is smaller than the size of the display. I want the image to fit the display.
What I have done is to scale it. However, for some reason, when I do that it doesn't show the top of the image.
Here is my code:
Do you guys know where is the problem?
Thanks
I'm trying to display an image which is smaller than the size of the display. I want the image to fit the display.
What I have done is to scale it. However, for some reason, when I do that it doesn't show the top of the image.
Here is my code:
- Code:
CGapiSurface *pSurface;
pSurface = new CGapiSurface(m_pGapiApplication->GetGlobal());
pSurface->CreateSurface(0, m_hInstance, dwResourceID, _T("PNG"));
GDBLTFX *pGDBltFx;
pGDBltFx = new GDBLTFX;
DWORD dwFlags = GDBLT_ROTATIONANGLE | GDBLT_ROTATIONSCALE| GDBLTFAST_KEYSRC;
pGDBltFx->nRotationAngle = 0 * 100;
pGDBltFx->dwRotationScale = 200;
m_pGapiApplication->GetDisplay()->GetBackBuffer()->Blt(NULL, pSurface,NULL, dwFlags, pGDBltFx);
delete pGDBltFx;
delete pSurface;
Do you guys know where is the problem?
Thanks