yjsvg 0.1.13 → 0.1.14
raw patch · 2 files changed
+11/−3 lines, 2 files
Files
- src/Text/XML/YJSVG.hs +10/−2
- yjsvg.cabal +1/−1
src/Text/XML/YJSVG.hs view
@@ -3,7 +3,7 @@ , SVG(..) , Transform(..) , Color(..)-, Position(..)+, Position(..), topleft, center , yjsvgVersion ) where @@ -15,13 +15,21 @@ import Data.Word(Word8) yjsvgVersion :: (Int, String)-yjsvgVersion = (6, "0.1.11")+yjsvgVersion = (7, "0.1.11a") type Font = String data Position = TopLeft{posX :: Double, posY :: Double} | Center{posX :: Double, posY :: Double} deriving (Show, Read)++topleft, center :: Double -> Double -> Position -> Position+topleft w h Center{posX = x, posY = y} =+ TopLeft{posX = x + w / 2, posY = - y + h / 2}+topleft _ _ pos = pos+center w h TopLeft{posX = x, posY = y} =+ Center{posX = x - w / 2, posY = - y + h / 2}+center _ _ pos = pos getPos :: Double -> Double -> Position -> (Double, Double) getPos _ _ TopLeft{posX = x, posY = y} = (x, y)
yjsvg.cabal view
@@ -2,7 +2,7 @@ Cabal-Version: >= 1.6 Name: yjsvg-Version: 0.1.13+Version: 0.1.14 stability: experimental author: YoshikuniJujo <PAF01143@nifty.ne.jp> maintainer: YoshikuniJujo <PAF01143@nifty.ne.jp>