Hey there
I need to display an image on the screen which I need to be able to rotate, given any angle I want.
From the manual, I figured the only way to do this is to put the image as an object into the scene, then create a DynamicSprite from it, rotate it, and render it.
The problem I have is that when I use a DynamicSprite, the rendering is all messed up.

The middle image ("expected"), is what I get when I add the image to the scene as an object (the result I want).
The image on the right, is what I get when I use a DynamicSprite. As you can see, the edges don't look right. It seems a DS has a trouble dealing with alpha.
Here's my code:
Code: ags
I've also tried copying the transparency mask after creating the DynamicSprite but I get the same result.
What I my doing wrong?
Is there any other way to freely rotate an image and have it rendered correctly? I've been searching through the manual but couldn't find anything...
Thankies
I need to display an image on the screen which I need to be able to rotate, given any angle I want.
From the manual, I figured the only way to do this is to put the image as an object into the scene, then create a DynamicSprite from it, rotate it, and render it.
The problem I have is that when I use a DynamicSprite, the rendering is all messed up.

The middle image ("expected"), is what I get when I add the image to the scene as an object (the result I want).
The image on the right, is what I get when I use a DynamicSprite. As you can see, the edges don't look right. It seems a DS has a trouble dealing with alpha.
Here's my code:
DynamicSprite* dsBigRocket;
DrawingSurface* surface = Room.GetDrawingSurfaceForBackground();
dsBigRocket = DynamicSprite.CreateFromExistingSprite(oBigRocket.Graphic, true);
surface.DrawImage(
1024 / 2 - dsBigRocket.Width / 2,
768 / 2 - dsBigRocket.Height / 2,
dsBigRocket.Graphic,
0);
surface.Release();
I've also tried copying the transparency mask after creating the DynamicSprite but I get the same result.
What I my doing wrong?
Is there any other way to freely rotate an image and have it rendered correctly? I've been searching through the manual but couldn't find anything...
Thankies