HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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.