DIAGRAM: fix unfiltered vtable for pointText functions

This commit is contained in:
hasufell 2014-10-10 23:59:02 +02:00
parent 60843e5879
commit ab2a0a331d
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020

View File

@ -36,9 +36,11 @@ pointToTextCoord pt =
coordPointsText :: Diag coordPointsText :: Diag
coordPointsText = Diag cpt coordPointsText = Diag cpt
where where
cpt _ vt = cpt p vt =
position $ position $
zip vt (pointToTextCoord <$> vt) # translate (r2 (0, 10)) zip vtf (pointToTextCoord <$> vtf) # translate (r2 (0, 10))
where
vtf = filter (inRange (dX p) (dY p)) vt
-- |Create a diagram which shows the points of the convex hull. -- |Create a diagram which shows the points of the convex hull.
@ -57,12 +59,12 @@ convexHullPoints = Diag chp
convexHullPointsText :: Diag convexHullPointsText :: Diag
convexHullPointsText = Diag chpt convexHullPointsText = Diag chpt
where where
chpt _ vt = chpt p vt =
position $ position $
zip vtch zip vtchf
(pointToTextCoord <$> vtch) # translate (r2 (0, 10)) (pointToTextCoord <$> vtchf) # translate (r2 (0, 10))
where where
vtch = grahamGetCH vt vtchf = grahamGetCH . filter (inRange (dX p) (dY p)) $ vt
-- |Create a diagram which shows the lines along the convex hull -- |Create a diagram which shows the lines along the convex hull