Refactor some function names for readability

This commit is contained in:
2014-11-16 00:10:57 +01:00
parent bf596a5842
commit 3f3467cc44
4 changed files with 166 additions and 168 deletions

View File

@@ -12,22 +12,22 @@ import Parser.Meshparser
-- |Create the Diagram from the points.
diag :: DiagProp -> Object -> Diagram Cairo R2
diag p obj@(Object _)
| alg p == 0 =
| algo p == 0 =
mkDiag (mconcat [coordPointsText, coordPoints, plotterBG])
p obj
| alg p == 1 =
| algo p == 1 =
mkDiag (mconcat [convexHPText, convexHP, convexHLs, coordPoints, plotterBG])
p obj
| alg p == 4 =
| algo p == 4 =
mkDiag (mconcat [quadPathSquare, squares, coordPointsText,
coordPoints, polyLines, plotterBG])
p obj
| otherwise = mempty
diag p objs@(Objects _)
| alg p == 2 =
| algo p == 2 =
mkDiag (mconcat [polyLines, coordPointsText, coordPoints, plotterBG])
p objs
| alg p == 3 =
| algo p == 3 =
mkDiag (mconcat [polyIntersectionText, polyIntersection,
coordPoints, polyLines, plotterBG])
p objs
@@ -38,7 +38,7 @@ diag p objs@(Objects _)
-- of an obj file.
diagS :: DiagProp -> MeshString -> Diagram Cairo R2
diagS p mesh
| alg p == 2 || alg p == 3 = diag p. Objects . facesToArr $ mesh
| algo p == 2 || algo p == 3 = diag p. Objects . facesToArr $ mesh
| otherwise = (diag p . Object . meshToArr $ mesh) # bg white
@@ -46,5 +46,5 @@ diagS p mesh
-- of an obj file.
diagTreeS :: DiagProp -> MeshString -> Diagram Cairo R2
diagTreeS p mesh
| alg p == 4 = mkDiag treePretty p (Object . meshToArr $mesh)
| algo p == 4 = mkDiag treePretty p (Object . meshToArr $mesh)
| otherwise = mempty