typography-geometry-1.0.0.1: 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 #

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

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

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

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

The matrix of a rotation

class Geometric g where #

A class for applying geometric applications to objects

Minimal complete definition

translate, apply

Methods

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

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

Instances

Geometric Curve # 
Geometric g => Geometric [g] # 

Methods

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

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

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

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

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

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

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

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

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

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