packages feed

gluturtle 0.0.16 → 0.0.18

raw patch · 2 files changed

+7/−7 lines, 2 files

Files

gluturtle.cabal view
@@ -2,7 +2,7 @@ cabal-version:	>= 1.6  name:		gluturtle-version:	0.0.16+version:	0.0.18 stability:	alpha author:		Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer:	Yoshikuni Jujo <PAF01143@nifty.ne.jp>
src/Graphics/UI/GLUT/Turtle/Field.hs view
@@ -148,7 +148,7 @@ 		G.lineWidth $= 1.0 		ss1 <- readIORef str 		ss2 <- readIORef str2-		zipWithM_ (printString (-2.8)) [-1800, -1600 .. 0] (reverse ss1 ++ ss2)+		zipWithM_ (printString (-2.8)) [-1800, -1600 .. 1800] (reverse ss1 ++ ss2) 		swapBuffers) 	G.reshapeCallback $= Just (\size -> G.viewport $= (G.Position 0 0, size)) 	let f = Field{@@ -278,8 +278,8 @@  positionToVertex3 :: Field -> Position -> Vertex2 GLfloat positionToVertex3 f (Center x y) =-	Vertex2 (fromRational $ toRational x / fromIntegral (fWidth f))-		(fromRational $ toRational y / fromIntegral (fHeight f))+	Vertex2 (fromRational $ 2 * toRational x / fromIntegral (fWidth f))+		(fromRational $ 2 * toRational y / fromIntegral (fHeight f)) positionToVertex3 _ _ = error "positionToVertex3: not implemented"  writeString :: Field -> Layer -> String -> Double -> Color -> Position ->@@ -289,9 +289,9 @@ 	where 	action = preservingMatrix $ do 		let	size' = size / 15-			ratio = 7 * fromIntegral (fHeight f) -- 2000-			x_ratio = ratio / fromIntegral (fWidth f)-			y_ratio = ratio / fromIntegral (fHeight f)+			ratio = 3.5 * fromIntegral (fHeight f) -- 2000+			x_ratio = 2 * ratio / fromIntegral (fWidth f)+			y_ratio = 2 * ratio / fromIntegral (fHeight f) 			x = x_ratio * fromRational (toRational $ x_ / size') 			y = y_ratio * fromRational (toRational $ y_ / size') --			s = 0.0005 * fromRational (toRational size')