Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Transformation = Transformation (M23 CFloat)
- resetTransform :: Context -> IO ()
- transform :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
- translate :: Context -> CFloat -> CFloat -> IO ()
- rotate :: Context -> CFloat -> IO ()
- skewX :: Context -> CFloat -> IO ()
- skewY :: Context -> CFloat -> IO ()
- scale :: Context -> CFloat -> CFloat -> IO ()
- peekTransformation :: Ptr CFloat -> IO Transformation
- allocaTransformation :: (Ptr CFloat -> IO b) -> IO b
- withTransformation :: Transformation -> (Ptr CFloat -> IO b) -> IO b
- currentTransform :: Context -> IO Transformation
- transformIdentity :: IO Transformation
- transformTranslate :: CFloat -> CFloat -> IO Transformation
- transformScale :: CFloat -> CFloat -> IO Transformation
- transformRotate :: CFloat -> IO Transformation
- transformSkewX :: CFloat -> IO Transformation
- transformSkewY :: CFloat -> IO Transformation
- transformMultiply :: Transformation -> Transformation -> IO Transformation
- transformPremultiply :: Transformation -> Transformation -> IO Transformation
- transformInverse :: Transformation -> IO Transformation
- transformPoint :: Transformation -> CFloat -> CFloat -> (CFloat, CFloat)
- degToRad :: CFloat -> CFloat
- radToDeg :: CFloat -> CFloat
- resetTransform'_ :: Context -> IO ()
- transform'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()
- translate'_ :: Context -> CFloat -> CFloat -> IO ()
- rotate'_ :: Context -> CFloat -> IO ()
- skewX'_ :: Context -> CFloat -> IO ()
- skewY'_ :: Context -> CFloat -> IO ()
- scale'_ :: Context -> CFloat -> CFloat -> IO ()
- currentTransform'_ :: Context -> Ptr CFloat -> IO ()
- transformIdentity'_ :: Ptr CFloat -> IO ()
- transformTranslate'_ :: Ptr CFloat -> CFloat -> CFloat -> IO ()
- transformScale'_ :: Ptr CFloat -> CFloat -> CFloat -> IO ()
- transformRotate'_ :: Ptr CFloat -> CFloat -> IO ()
- transformSkewX'_ :: Ptr CFloat -> CFloat -> IO ()
- transformSkewY'_ :: Ptr CFloat -> CFloat -> IO ()
- transformMultiply'_ :: Ptr CFloat -> Ptr CFloat -> IO ()
- transformPremultiply'_ :: Ptr CFloat -> Ptr CFloat -> IO ()
- transformInverse'_ :: Ptr CFloat -> Ptr CFloat -> IO CInt
- transformPoint'_ :: Ptr CFloat -> Ptr CFloat -> Ptr CFloat -> CFloat -> CFloat -> IO ()
- degToRad'_ :: CFloat -> IO CFloat
- radToDeg'_ :: CFloat -> IO CFloat
Documentation
newtype Transformation Source #
Affine matrix
[sx kx tx] [ky sy ty] [ 0 0 1]
Instances
resetTransform :: Context -> IO () Source #
Resets current transform to a identity matrix.
transform :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO () Source #
Premultiplies current coordinate system by specified matrix. The parameters are interpreted as matrix as follows:
[a c e] [b d f] [0 0 1]
rotate :: Context -> CFloat -> IO () Source #
Rotates current coordinate system. Angle is specified in radians.
skewX :: Context -> CFloat -> IO () Source #
Skews the current coordinate system along X axis. Angle is specified in radians.
skewY :: Context -> CFloat -> IO () Source #
Skews the current coordinate system along Y axis. Angle is specified in radians.
withTransformation :: Transformation -> (Ptr CFloat -> IO b) -> IO b Source #
currentTransform :: Context -> IO Transformation Source #
Returns the current transformation matrix.
transformIdentity :: IO Transformation Source #
Sets the transform to identity matrix.
transformTranslate :: CFloat -> CFloat -> IO Transformation Source #
Sets the transform to translation matrix matrix.
transformScale :: CFloat -> CFloat -> IO Transformation Source #
Sets the transform to scale matrix.
transformRotate :: CFloat -> IO Transformation Source #
Sets the transform to rotate matrix. Angle is specified in radians.
transformSkewX :: CFloat -> IO Transformation Source #
Sets the transform to skew-x matrix. Angle is specified in radians.
transformSkewY :: CFloat -> IO Transformation Source #
Sets the transform to skew-y matrix. Angle is specified in radians.
transformMultiply :: Transformation -> Transformation -> IO Transformation Source #
Sets the transform to the result of multiplication of two transforms, of A = A*B.
transformPremultiply :: Transformation -> Transformation -> IO Transformation Source #
Sets the transform to the result of multiplication of two transforms, of A = B*A.
transformInverse :: Transformation -> IO Transformation Source #
Sets the destination to inverse of specified transform. Returns 1 if the inverse could be calculated, else 0.
transformPoint :: Transformation -> CFloat -> CFloat -> (CFloat, CFloat) Source #
Transform a point by given transform.
resetTransform'_ :: Context -> IO () Source #