chickadee » sdl2 » rotate-surface-90*

rotate-surface-90 surface turnsprocedure
rotate-surface-90* surface turnsprocedure

Return a copy of the given surface rotated by the given number of 90º clockwise turns. turns must be an integer. For example:

  • turns 0 means no rotation
  • turns 1 means 90º clockwise rotation
  • turns 2 means 180º rotation
  • turns 3 (or -1) means 270º clockwise (i.e. 90º counter-clockwise) rotation

The new surface will have an equivalent pixel format, color key, blend mode, alpha mod, and color mod as the given surface. If the given surface has a palette, the new surface will share the same palette. The new surface will have no clip rect.

Signals an exception of kind (exn sdl2) if an error occurs.

  • rotate-surface-90 returns a managed sdl2:surface.
  • rotate-surface-90* returns an unmanaged sdl2:surface, which must be freed with free-surface! when you are done with it.