cairo-0.13.4.1: Binding to the Cairo library.

Graphics.Rendering.Cairo.Matrix

Description

Matrix math

Synopsis

# Documentation

data Matrix Source #

Representation of a 2-D affine transformation.

The Matrix type represents a 2x2 transformation matrix along with a translation vector. Matrix a1 a2 b1 b2 c1 c2 describes the transformation of a point with coordinates x,y that is defined by

  / x' \  =  / a1 b1 \  / x \  + / c1 \
\ y' /     \ a2 b2 /  \ y /    \ c2 /

or

  x' =  a1 * x + b1 * y + c1
y' =  a2 * x + b2 * y + c2

Constructors

 Matrix !Double !Double !Double !Double !Double !Double

Instances

 Source # Methods(==) :: Matrix -> Matrix -> Bool #(/=) :: Matrix -> Matrix -> Bool # Source # Methods(+) :: Matrix -> Matrix -> Matrix #(-) :: Matrix -> Matrix -> Matrix #(*) :: Matrix -> Matrix -> Matrix #abs :: Matrix -> Matrix # Source # MethodsshowsPrec :: Int -> Matrix -> ShowS #showList :: [Matrix] -> ShowS # Source # MethodssizeOf :: Matrix -> Int #pokeElemOff :: Ptr Matrix -> Int -> Matrix -> IO () #peekByteOff :: Ptr b -> Int -> IO Matrix #pokeByteOff :: Ptr b -> Int -> Matrix -> IO () #poke :: Ptr Matrix -> Matrix -> IO () #