From 82a82bdde4ac1b6bd1d3cbbe1c4a732cf482105a Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 30 Dec 2016 13:59:22 +0100 Subject: [PATCH] reposition new haskelloids --- src/Main.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 81ed8d2..f7c55ce 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -498,8 +498,8 @@ insertHaskelloid hasks split (px, py) = do , Property "height" $ PropertyInt (100 `div` rdiv) ] tempTrans <- liftIO $ gegl_node_new_child tempRoot $ Operation "gegl:translate" - [ Property "x" $ PropertyDouble px - , Property "y" $ PropertyDouble py + [ Property "x" $ PropertyDouble $ px + (100 / fromIntegral rdiv / 2) + , Property "y" $ PropertyDouble $ py + (100 / fromIntegral rdiv / 2) , Property "sampler" $ PropertyInt $ fromEnum GeglSamplerCubic ] tempRot <- liftIO $ gegl_node_new_child tempRoot $ Operation "gegl:rotate" @@ -511,7 +511,10 @@ insertHaskelloid hasks split (px, py) = do liftIO $ gegl_node_link_many [tempSvg, tempRot, tempTrans] _ <- liftIO $ gegl_node_connect_to tempTrans "output" tempOver "aux" return $ Just Haskelloid - { hPos = (px, py) + { hPos = + ( px + (100 / 2 / fromIntegral rdiv) + , py + (100 / 2 / fromIntegral rdiv) + ) , hVel = (vx, vy) , hRot = rot , hPitch = pitch