packages feed

yjsvg 0.1.9 → 0.1.11

raw patch · 2 files changed

+7/−9 lines, 2 files

Files

src/Text/XML/YJSVG.hs view
@@ -15,13 +15,13 @@ import Data.Word(Word8)  yjsvgVersion :: (Int, String)-yjsvgVersion = (4, "0.1.9")+yjsvgVersion = (6, "0.1.11")  type Font = String data Position 	= TopLeft{posX :: Double, posY :: Double} 	| Center{posX :: Double, posY :: Double}-	deriving Show+	deriving (Show, Read)  getPos :: Double -> Double -> Position -> (Double, Double) getPos _ _ TopLeft{posX = x, posY = y} = (x, y)@@ -34,7 +34,7 @@              Text Position Double Color Font String | 	     Image Position Double Double FilePath | 	     Group [ Transform ] [ SVG ]-	deriving Show+	deriving (Show, Read) data Color 	= ColorName{ 		colorName :: String@@ -44,7 +44,7 @@ 		colorGreen ::  Word8, 		colorBlue ::  Word8 	 }-	deriving Show+	deriving (Show, Read)  mkColorStr :: Color -> String mkColorStr ColorName{colorName = n} = n@@ -57,16 +57,13 @@ 		 Rotate Double (Maybe (Double, Double)) | 		 SkewX Double | 		 SkewY Double-	deriving Show+	deriving (Show, Read)  showTrans :: Transform -> String showTrans (Translate tx ty) = "translate(" ++ show tx ++ "," ++ show ty ++ ")" showTrans (Scale sx sy) = "scale(" ++ show sx ++ "," ++ show sy ++ ")" showTrans _ = error "not implemented yet" --- instance Show [ SVG ] where---  show = showSVG- showSVG :: Double -> Double -> [ SVG ] -> String showSVG w h = show . document . svgToXml w h @@ -79,6 +76,7 @@      , ( N "y2", AttValue [ Left $ show y2 ] )      , ( N "stroke", AttValue [ Left $ mkColorStr color ] )      , ( N "stroke-width", AttValue [ Left $ show lineWidth ] )+	, (N "stroke-linecap", AttValue [Left "round"])      ] [] 	where 	(x1, y1) = getPos pw ph p1
yjsvg.cabal view
@@ -2,7 +2,7 @@ Cabal-Version:	>= 1.6  Name:		yjsvg-Version:	0.1.9+Version:	0.1.11 stability:	experimental author:		YoshikuniJujo <PAF01143@nifty.ne.jp> maintainer:	YoshikuniJujo <PAF01143@nifty.ne.jp>