I have been experimenting with GAPIDraw and have the following question about transforming coordinates.
I have a large image let's say (1024 x 768) that I load in a surface and BitBlt to the backbuffer with a rotation, scale, and center adjustment.
Now I have some sprites that I want to BitBlt on the backbuffer at several known pixel coordinates from the original image. I don't want these sprites scaled and rotated like the image surface.
I have tried writing a coordinate transform function that I could send an original image pixel location and calc the logical coordinate to draw my sprite. The routine places the sprite dead on for several angles and scales but is often off (sometimes by as many as 15 logical pixels). I have tweaked and retweaked the routine looking for precision errors but I am not satisfied yet with the result.
Strangely enough for my particular image the pixel location is dead on along one axis but incorrect on the other axis at certain scales like 205% with no rotation.
Does GapiDraw expose a Point Transform routine?
Is there a much easier way to do this?
Thanks,
Fro
I have a large image let's say (1024 x 768) that I load in a surface and BitBlt to the backbuffer with a rotation, scale, and center adjustment.
Now I have some sprites that I want to BitBlt on the backbuffer at several known pixel coordinates from the original image. I don't want these sprites scaled and rotated like the image surface.
I have tried writing a coordinate transform function that I could send an original image pixel location and calc the logical coordinate to draw my sprite. The routine places the sprite dead on for several angles and scales but is often off (sometimes by as many as 15 logical pixels). I have tweaked and retweaked the routine looking for precision errors but I am not satisfied yet with the result.
Strangely enough for my particular image the pixel location is dead on along one axis but incorrect on the other axis at certain scales like 205% with no rotation.
Does GapiDraw expose a Point Transform routine?
Is there a much easier way to do this?
Thanks,
Fro