typography-geometry-1.0.1.0: Drawings for printed text documents

Safe HaskellNone
LanguageHaskell98

Graphics.Typography.Geometry

Description

This module contains basic tools for geometric types and functions.

Synopsis

Documentation

data Matrix2 a Source #

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

Constructors

Matrix2 a a a a

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

Instances
Intervalize Matrix2 Source # 
Instance details

Defined in Graphics.Typography.Geometry

Eq a => Eq (Matrix2 a) Source # 
Instance details

Defined in Graphics.Typography.Geometry

Methods

(==) :: Matrix2 a -> Matrix2 a -> Bool #

(/=) :: Matrix2 a -> Matrix2 a -> Bool #

Num a => Num (Matrix2 a) Source # 
Instance details

Defined in Graphics.Typography.Geometry

Methods

(+) :: Matrix2 a -> Matrix2 a -> Matrix2 a #

(-) :: Matrix2 a -> Matrix2 a -> Matrix2 a #

(*) :: Matrix2 a -> Matrix2 a -> Matrix2 a #

negate :: Matrix2 a -> Matrix2 a #

abs :: Matrix2 a -> Matrix2 a #

signum :: Matrix2 a -> Matrix2 a #

fromInteger :: Integer -> Matrix2 a #

Read a => Read (Matrix2 a) Source # 
Instance details

Defined in Graphics.Typography.Geometry

Show a => Show (Matrix2 a) Source # 
Instance details

Defined in Graphics.Typography.Geometry

Methods

showsPrec :: Int -> Matrix2 a -> ShowS #

show :: Matrix2 a -> String #

showList :: [Matrix2 a] -> ShowS #

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

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

rotation :: Floating a => a -> Matrix2 a Source #

The matrix of a rotation

class Geometric g where Source #

A class for applying geometric applications to objects

Methods

translate :: Double -> Double -> g -> g Source #

apply :: Matrix2 Double -> g -> g Source #

Instances
Geometric Curve Source # 
Instance details

Defined in Graphics.Typography.Geometry.Bezier

Geometric g => Geometric [g] Source # 
Instance details

Defined in Graphics.Typography.Geometry

Methods

translate :: Double -> Double -> [g] -> [g] Source #

apply :: Matrix2 Double -> [g] -> [g] Source #

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.