HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulesdl2-gfx-0.3.0.0Haskell2010

SDL.Rotozoom

Bindings to SDL2_gfx's surface rotation and zoom functionality.

  • 4 types
  • 10 values
typetype Zoom = Double
#

A dimension scaling factor.

datadata Smooth
#

Whether resulting Surfaces are anti-aliased or not.

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
typetype Size = V2 CInt
#

A surface size, packing width and height.

valueshrink :: MonadIO m => Surface -> CInt -> CInt -> m Surface
#

Shrink a surface by an integer ratio.

The two CInt arguments are the horizontal and vertical shrinking ratios: 2 halves a dimension, 5 makes it a fifth of its original size etc.

The resulting Surface is anti-aliased and, if the input wasn't 8-bit or 32-bit, converted to a 32-bit RGBA format.

valuerotate90 :: MonadIO m => Surface -> Int -> m Surface
#

Given a number of clockwise rotations to perform, rotates Surface in increments of 90 degrees.

Since no interpolation is done, this is faster than rotozoomer.