DIAGRAM: rm obsolete maybeDiag calls

We handle these conditions inside the functions themselves
by checking the DiagProp.
This commit is contained in:
hasufell 2014-10-25 15:44:59 +02:00
parent b85afda7e7
commit b67ef899c7
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -14,25 +14,25 @@ diag :: DiagProp -> Object -> Diagram Cairo R2
diag p obj@(Object _) diag p obj@(Object _)
| alg p == 0 = | alg p == 0 =
mkDiag mkDiag
(mconcat [maybeDiag (ct p) coordPointsText, (mconcat [coordPointsText,
coordPoints, plotterBG]) coordPoints, plotterBG])
p obj p obj
| alg p == 1 = | alg p == 1 =
mkDiag mkDiag
(mconcat (mconcat
[maybeDiag (ct p) convexHPText, [convexHPText,
convexHP, convexHLs, convexHP, convexHLs,
coordPoints, plotterBG]) coordPoints, plotterBG])
p obj p obj
| otherwise = mempty | otherwise = mempty
diag p objs@(Objects _) diag p objs@(Objects _)
| alg p == 2 = | alg p == 2 =
mkDiag (mconcat [polyLines, maybeDiag (ct p) coordPointsText, coordPoints, mkDiag (mconcat [polyLines, coordPointsText, coordPoints,
plotterBG]) plotterBG])
p objs p objs
| alg p == 3 = | alg p == 3 =
mkDiag (mconcat [maybeDiag (ct p) polyIntersectionText, mkDiag (mconcat [polyIntersectionText,
polyIntersection, maybeDiag (ct p) coordPointsText, polyIntersection, coordPointsText,
coordPoints, polyLines, coordPoints, polyLines,
plotterBG]) plotterBG])
p objs p objs