#4 rotozoomSurface 90 degree odd results

v1.0 (example)
wont-fix
ferzkopp
None
5
2013-10-27
2010-10-04
Jake Magee
No

When using the rotozoomSurface function in the following manner produces unexpected surface sizes:
paddleImage = SDL_DisplayFormat(rotozoomSurface(paddleImage, 90, 1, 0));

The original paddleImage surface is 20x60 and displays perfect. After the above command, the surface size (paddleImage->w and paddleImage->h) is reported as 60x22. I don't understand how a 90 degree rotation with no zoom would produce anything other than 60x20. Also, the new image appears to be missing a line or two of vertical pixels. I also believe that my surface is 24bits (hence why I cannot use the rotateSurface90Degrees function) if that matters.

Discussion

  • ferzkopp

    ferzkopp - 2011-01-29
    • assigned_to: nobody --> ferzkopp
     
  • ferzkopp

    ferzkopp - 2013-10-27

    Won't fix. It is simple to upcast a 24bit to a 32bit surface and use the rotateSurface90Degrees() function which will give the desired result. The rotozoomSurface() function was always designed to control the output surface size for optimal speed when antialiasing - this means it can grow the surface at will, even when that doesn't make logical sense.

     
  • ferzkopp

    ferzkopp - 2013-10-27
    • status: open --> wont-fix
    • Group: --> v1.0 (example)
     

Log in to post a comment.