sdl2gfx rotozoomSurfaceXY @ 90 degrees gives surface with wrong dimensions

Issue #81 wontfix
Colin Z created an issue

Might be internal to sdl2_gfx, but calling the equivalent of:

rotozoomSurfaceXY(surface, 90, 1.0, 1.0, 1)

returns a surface whose dimensions are sometimes slightly off.

For example, passing a surface with dimensions (970, 1417) yields a surface with dimensions (1416, 972) instead of the expected (1417, 970)

Another example is (700, 991) -> (990, 702)

Square surfaces such as (640, 640) seem to not be effected by the issue and produce the correct result

Comments (2)

  1. Marcus von Appen repo owner

    This may be related to the SDL2_gfx zoom mechanism, which, on rotation, provides slightly incorrrect float values (due to the nature of the calculation itself). If you just need to rotate by 90 degree steps, sdlgfx.rotateSurface90Degrees() is a better choice.

  2. Log in to comment