From 1dcc24064b3afdeaaa7b7717c790455fe98a672d Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 16 Nov 2014 00:49:05 +0100 Subject: [PATCH] DIAG: improve readability --- Graphics/Diagram/Plotter.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Graphics/Diagram/Plotter.hs b/Graphics/Diagram/Plotter.hs index 0e4a62d..72eb8cc 100644 --- a/Graphics/Diagram/Plotter.hs +++ b/Graphics/Diagram/Plotter.hs @@ -180,8 +180,8 @@ squares = Diag f f _ (Object []) = mempty f p (Object vt) = mconcat - $ (\((xmin', xmax'), (ymin', ymax')) -> rect (xmax' - xmin') (ymax' - ymin') - # moveTo (p2 ((xmax' + xmin') / 2, (ymax' + ymin') / 2)) # lw ultraThin) + $ (\((xmin, xmax), (ymin, ymax)) -> rect (xmax - xmin) (ymax - ymin) + # moveTo (p2 ((xmax + xmin) / 2, (ymax + ymin) / 2)) # lw ultraThin) <$> (quadTreeSquares (xDimension p, yDimension p) . quadTree vtf $ (xDimension p, yDimension p)) where vtf = filterValidPT p vt @@ -201,8 +201,8 @@ quadPathSquare = Diag f where f _ (Object []) = mempty f p (Object vt) = - (\((xmin', xmax'), (ymin', ymax')) -> rect (xmax' - xmin') (ymax' - ymin') - # moveTo (p2 ((xmax' + xmin') / 2,(ymax' + ymin') / 2)) # lw thin # lc red) + (\((xmin, xmax), (ymin, ymax)) -> rect (xmax - xmin) (ymax - ymin) + # moveTo (p2 ((xmax + xmin) / 2,(ymax + ymin) / 2)) # lw thin # lc red) (getSquare (stringToQuads (quadPath p)) (qt vt p, [])) where getSquare :: [Either Quad Orient] -> Zipper PT -> Square @@ -219,8 +219,8 @@ gifQuadPath :: Diag gifQuadPath = GifDiag f where f p col _ vt = - (\((xmin', xmax'), (ymin', ymax')) -> rect (xmax' - xmin') (ymax' - ymin') - # moveTo (p2 ((xmax' + xmin') / 2,(ymax' + ymin') / 2)) # lw thick # lc col) + (\((xmin, xmax), (ymin, ymax)) -> rect (xmax - xmin) (ymax - ymin) + # moveTo (p2 ((xmax + xmin) / 2,(ymax + ymin) / 2)) # lw thick # lc col) <$> getSquares (stringToQuads (quadPath p)) (qt vt p, []) where getSquares :: [Either Quad Orient] -> Zipper PT -> [Square]