DIAGRAM: small refactor

Enhanced the Diag type and used it for poly functions as well.
This commit is contained in:
2014-10-25 15:40:10 +02:00
parent 70b4fa6e01
commit b85afda7e7
3 changed files with 123 additions and 112 deletions

View File

@@ -16,11 +16,15 @@ type MeshString = String
-- coordinates and common properties.
data Diag = Diag {
mkDiag :: DiagProp
-> [PT]
-> Object
-> Diagram Cairo R2
}
data Object = Object [PT]
| Objects [[PT]]
-- |Holds the properties for a Diagram, like thickness of 2d points etc.
-- This can also be seen as a context when merging multiple diagrams.
data DiagProp = MkProp {