typography-geometry-1.0.0: Drawings for printed text documents



This module contains basic tools for geometric types and functions.



data Matrix2 a Source

The type of the transformation matrices used in all geometrical applications.


Matrix2 a a a a

The application of Matrix2 a b c d to vector (x,y) should be (ax+by,cx+dy).


Intervalize Matrix2 
Eq a => Eq (Matrix2 a) 
Num a => Num (Matrix2 a) 
Read a => Read (Matrix2 a) 
Show a => Show (Matrix2 a) 

inverse :: (Fractional a, Num a) => Matrix2 a -> Matrix2 aSource

Inverses an inversible matrix. If it is not inversible, The behaviour is undefined.

rotation :: Floating a => a -> Matrix2 aSource

The matrix of a rotation

class Geometric g whereSource

A class for applying geometric applications to objects


translate :: Double -> Double -> g -> gSource

apply :: Matrix2 Double -> g -> gSource


leftMost :: (Double, Double) -> (Double, Double) -> (Double, Double)Source

leftMost a b is the leftmost point between a and b.

rightMost :: (Double, Double) -> (Double, Double) -> (Double, Double)Source

rightMost a b is the rightmost point between a and b.

topMost :: (Double, Double) -> (Double, Double) -> (Double, Double)Source

topMost a b is the upper point between a and b.

bottomMost :: (Double, Double) -> (Double, Double) -> (Double, Double)Source

bottomMost a b is the lower point between a and b.