Hi,
I'm trying to figure out how the rotation works.
I want to rotate a 16x16 sprite using to following code:
It rotates, but I thought that since I use a rotation center it wouldn't clip any more, but it does.
Maurice
BTW. The docs say the rotation center is the position in the destination surface, but it seems to me it is the position in the destination rectangle.
I'm trying to figure out how the rotation works.
I want to rotate a 16x16 sprite using to following code:
- Code:
SetRect(&rcDst, x, y, x + 16, y + 16);
fx.dwRotationAngle = 4500;
fx.rotationCenter.x = 8; // 16/2
fx.rotationCenter.y = 8; // 16/2
backbuffer.Blt(&rcDst, pSurface, &rcSrc, GDBLT_ROTATIONANGLE | GDBLT_ROTATIONCENTER, &fx);
It rotates, but I thought that since I use a rotation center it wouldn't clip any more, but it does.
Maurice
BTW. The docs say the rotation center is the position in the destination surface, but it seems to me it is the position in the destination rectangle.