drawRotatedBitmap Draws from wrong center if degrees is one of the four cardinal directions

This is on the Windows C SDK / Simulator FWIW. I don't have a device to test on.

With a call like: pd->graphics->drawRotatedBitmap(bmp, x,y, 270, 0,0, 1,1) bmp will be drawn oriented as expected but not positioned relative to the 0,0 center. Instead, it is drawn with it's top/left at the unrotated coords. Same thing happens at 90 and 180 degrees.

For any angle in between, the bitmap is drawn as expected: rotated around the provided center.

Corollary to this: if you gradually increase degrees by 1 with a center of 0.5f 0.5f, the rotation will glitch or skip as it crosses the cardinal directions.

As seen here, the fourth draw is in the wrong place:

I also see this behavior with image:drawRotated(), but (at least as far as I can tell) only if the source image has transparency on some edges for some reason.

1 Like