Better Zoom&Pan (still with bug)
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 27 Jun 2009 19:14:41 +0000 (21:14 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 27 Jun 2009 19:14:41 +0000 (21:14 +0200)
src/Lseed/Renderer/Cairo.hs

index 9ac9c6e..53b7aeb 100644 (file)
@@ -97,7 +97,7 @@ cairoObserver = do
                                  let (xLeft,xRight,xHeight) = gardenOffset garden
                                      scaleY = 1/xHeight
                                      shiftX = if xRight-xLeft-xHeight > 0
-                                       then scaleY * (xLeft + (1+sin (s/2))/2 * max 0 (xRight-xLeft-xHeight))
+                                       then scaleY * (xLeft + (1+sin (s/(xHeight*4)))/2 * max 0 (xRight-xLeft-xHeight))
                                        else 0
 
                                  renderWithDrawable dwin $ do