typography-geometry-1.0.1.0: Drawings for printed text documents

Safe HaskellNone
LanguageHaskell98

Graphics.Typography.Geometry.Outlines

Description

This module contains the necessary calls to the other modules of Metafont' to compute the outlines of a given number of pen strokes. The normal way of using it is by calling outlines. One other possible way would be :

let curves=cutAll curvesList in
remerge $ contour curves $ intersections curves
Synopsis

Documentation

cutAll :: [[Curve]] -> Vector (Vector Curve) Source #

cutAll curves is the array of all the curves, cut such that each part does not intersect itself.

intersections :: Vector (Vector Curve) -> Map (Int, Int, Double) [(Int, Int, Double, Double)] Source #

Computes the intersections between any pair of curves given as input, in parallel in GHC using +RTS -N.

contour :: Vector (Vector Curve) -> Map (Int, Int, Double) [(Int, Int, Double, Double)] -> [[(Int, Int, Double, Double)]] Source #

contour takes the curves and the intersections computed as in intersections, and outputs a list of all simple closed paths defined by the curves in the input.

remerge :: Vector (Vector Curve) -> [(Int, Int, Double, Double)] -> [Curve] Source #

remerge takes the curves, the output of contour, and outputs the list of "remerged" curves, i.e. where the parts free of self-intersections are glued back to each other.

outlines :: [[Curve]] -> [[Curve]] Source #

Takes a list of curves, potentially offset, and outputs the relevants part of the outlines.