reanimate-svg 0.9.4.0 → 0.9.5.0
raw patch · 2 files changed
+13/−15 lines, 2 filesdep +double-conversionPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: double-conversion
API changes (from Hackage documentation)
- Graphics.SvgTree.Types: attrClass :: HasDrawAttributes c_apFd => Lens' c_apFd [Text]
+ Graphics.SvgTree.Types: attrClass :: HasDrawAttributes c_apJr => Lens' c_apJr [Text]
- Graphics.SvgTree.Types: attrId :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe String)
+ Graphics.SvgTree.Types: attrId :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe String)
- Graphics.SvgTree.Types: class HasColorMatrix c_ayLq
+ Graphics.SvgTree.Types: class HasColorMatrix c_ayUE
- Graphics.SvgTree.Types: class HasComposite c_ayC9
+ Graphics.SvgTree.Types: class HasComposite c_ayLn
- Graphics.SvgTree.Types: class HasDocument c_axOb
+ Graphics.SvgTree.Types: class HasDocument c_axXf
- Graphics.SvgTree.Types: class HasDrawAttributes c_apFd
+ Graphics.SvgTree.Types: class HasDrawAttributes c_apJr
- Graphics.SvgTree.Types: class HasGaussianBlur c_ayQD
+ Graphics.SvgTree.Types: class HasGaussianBlur c_ayZR
- Graphics.SvgTree.Types: class HasTextPath c_ayqj
+ Graphics.SvgTree.Types: class HasTextPath c_ayzx
- Graphics.SvgTree.Types: clipPathRef :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: clipPathRef :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: clipRule :: HasDrawAttributes c_apFd => Lens' c_apFd (Last FillRule)
+ Graphics.SvgTree.Types: clipRule :: HasDrawAttributes c_apJr => Lens' c_apJr (Last FillRule)
- Graphics.SvgTree.Types: colorMatrix :: HasColorMatrix c_ayLq => Lens' c_ayLq ColorMatrix
+ Graphics.SvgTree.Types: colorMatrix :: HasColorMatrix c_ayUE => Lens' c_ayUE ColorMatrix
- Graphics.SvgTree.Types: colorMatrixDrawAttributes :: HasColorMatrix c_ayLq => Lens' c_ayLq DrawAttributes
+ Graphics.SvgTree.Types: colorMatrixDrawAttributes :: HasColorMatrix c_ayUE => Lens' c_ayUE DrawAttributes
- Graphics.SvgTree.Types: colorMatrixFilterAttr :: HasColorMatrix c_ayLq => Lens' c_ayLq FilterAttributes
+ Graphics.SvgTree.Types: colorMatrixFilterAttr :: HasColorMatrix c_ayUE => Lens' c_ayUE FilterAttributes
- Graphics.SvgTree.Types: colorMatrixIn :: HasColorMatrix c_ayLq => Lens' c_ayLq (Last FilterSource)
+ Graphics.SvgTree.Types: colorMatrixIn :: HasColorMatrix c_ayUE => Lens' c_ayUE (Last FilterSource)
- Graphics.SvgTree.Types: colorMatrixType :: HasColorMatrix c_ayLq => Lens' c_ayLq ColorMatrixType
+ Graphics.SvgTree.Types: colorMatrixType :: HasColorMatrix c_ayUE => Lens' c_ayUE ColorMatrixType
- Graphics.SvgTree.Types: colorMatrixValues :: HasColorMatrix c_ayLq => Lens' c_ayLq String
+ Graphics.SvgTree.Types: colorMatrixValues :: HasColorMatrix c_ayUE => Lens' c_ayUE String
- Graphics.SvgTree.Types: composite :: HasComposite c_ayC9 => Lens' c_ayC9 Composite
+ Graphics.SvgTree.Types: composite :: HasComposite c_ayLn => Lens' c_ayLn Composite
- Graphics.SvgTree.Types: compositeDrawAttributes :: HasComposite c_ayC9 => Lens' c_ayC9 DrawAttributes
+ Graphics.SvgTree.Types: compositeDrawAttributes :: HasComposite c_ayLn => Lens' c_ayLn DrawAttributes
- Graphics.SvgTree.Types: compositeFilterAttr :: HasComposite c_ayC9 => Lens' c_ayC9 FilterAttributes
+ Graphics.SvgTree.Types: compositeFilterAttr :: HasComposite c_ayLn => Lens' c_ayLn FilterAttributes
- Graphics.SvgTree.Types: compositeIn :: HasComposite c_ayC9 => Lens' c_ayC9 (Last FilterSource)
+ Graphics.SvgTree.Types: compositeIn :: HasComposite c_ayLn => Lens' c_ayLn (Last FilterSource)
- Graphics.SvgTree.Types: compositeIn2 :: HasComposite c_ayC9 => Lens' c_ayC9 (Last FilterSource)
+ Graphics.SvgTree.Types: compositeIn2 :: HasComposite c_ayLn => Lens' c_ayLn (Last FilterSource)
- Graphics.SvgTree.Types: compositeK1 :: HasComposite c_ayC9 => Lens' c_ayC9 Number
+ Graphics.SvgTree.Types: compositeK1 :: HasComposite c_ayLn => Lens' c_ayLn Number
- Graphics.SvgTree.Types: compositeK2 :: HasComposite c_ayC9 => Lens' c_ayC9 Number
+ Graphics.SvgTree.Types: compositeK2 :: HasComposite c_ayLn => Lens' c_ayLn Number
- Graphics.SvgTree.Types: compositeK3 :: HasComposite c_ayC9 => Lens' c_ayC9 Number
+ Graphics.SvgTree.Types: compositeK3 :: HasComposite c_ayLn => Lens' c_ayLn Number
- Graphics.SvgTree.Types: compositeK4 :: HasComposite c_ayC9 => Lens' c_ayC9 Number
+ Graphics.SvgTree.Types: compositeK4 :: HasComposite c_ayLn => Lens' c_ayLn Number
- Graphics.SvgTree.Types: compositeOperator :: HasComposite c_ayC9 => Lens' c_ayC9 CompositeOperator
+ Graphics.SvgTree.Types: compositeOperator :: HasComposite c_ayLn => Lens' c_ayLn CompositeOperator
- Graphics.SvgTree.Types: description :: HasDocument c_axOb => Lens' c_axOb String
+ Graphics.SvgTree.Types: description :: HasDocument c_axXf => Lens' c_axXf String
- Graphics.SvgTree.Types: document :: HasDocument c_axOb => Lens' c_axOb Document
+ Graphics.SvgTree.Types: document :: HasDocument c_axXf => Lens' c_axXf Document
- Graphics.SvgTree.Types: documentAspectRatio :: HasDocument c_axOb => Lens' c_axOb PreserveAspectRatio
+ Graphics.SvgTree.Types: documentAspectRatio :: HasDocument c_axXf => Lens' c_axXf PreserveAspectRatio
- Graphics.SvgTree.Types: documentLocation :: HasDocument c_axOb => Lens' c_axOb FilePath
+ Graphics.SvgTree.Types: documentLocation :: HasDocument c_axXf => Lens' c_axXf FilePath
- Graphics.SvgTree.Types: drawAttributes :: HasDrawAttributes c_apFd => Lens' c_apFd DrawAttributes
+ Graphics.SvgTree.Types: drawAttributes :: HasDrawAttributes c_apJr => Lens' c_apJr DrawAttributes
- Graphics.SvgTree.Types: elements :: HasDocument c_axOb => Lens' c_axOb [Tree]
+ Graphics.SvgTree.Types: elements :: HasDocument c_axXf => Lens' c_axXf [Tree]
- Graphics.SvgTree.Types: fillColor :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Texture)
+ Graphics.SvgTree.Types: fillColor :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Texture)
- Graphics.SvgTree.Types: fillOpacity :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe Float)
+ Graphics.SvgTree.Types: fillOpacity :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe Float)
- Graphics.SvgTree.Types: fillRule :: HasDrawAttributes c_apFd => Lens' c_apFd (Last FillRule)
+ Graphics.SvgTree.Types: fillRule :: HasDrawAttributes c_apJr => Lens' c_apJr (Last FillRule)
- Graphics.SvgTree.Types: filterRef :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: filterRef :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: fontFamily :: HasDrawAttributes c_apFd => Lens' c_apFd (Last [String])
+ Graphics.SvgTree.Types: fontFamily :: HasDrawAttributes c_apJr => Lens' c_apJr (Last [String])
- Graphics.SvgTree.Types: fontSize :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Number)
+ Graphics.SvgTree.Types: fontSize :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Number)
- Graphics.SvgTree.Types: fontStyle :: HasDrawAttributes c_apFd => Lens' c_apFd (Last FontStyle)
+ Graphics.SvgTree.Types: fontStyle :: HasDrawAttributes c_apJr => Lens' c_apJr (Last FontStyle)
- Graphics.SvgTree.Types: gaussianBlur :: HasGaussianBlur c_ayQD => Lens' c_ayQD GaussianBlur
+ Graphics.SvgTree.Types: gaussianBlur :: HasGaussianBlur c_ayZR => Lens' c_ayZR GaussianBlur
- Graphics.SvgTree.Types: gaussianBlurDrawAttributes :: HasGaussianBlur c_ayQD => Lens' c_ayQD DrawAttributes
+ Graphics.SvgTree.Types: gaussianBlurDrawAttributes :: HasGaussianBlur c_ayZR => Lens' c_ayZR DrawAttributes
- Graphics.SvgTree.Types: gaussianBlurEdgeMode :: HasGaussianBlur c_ayQD => Lens' c_ayQD EdgeMode
+ Graphics.SvgTree.Types: gaussianBlurEdgeMode :: HasGaussianBlur c_ayZR => Lens' c_ayZR EdgeMode
- Graphics.SvgTree.Types: gaussianBlurFilterAttr :: HasGaussianBlur c_ayQD => Lens' c_ayQD FilterAttributes
+ Graphics.SvgTree.Types: gaussianBlurFilterAttr :: HasGaussianBlur c_ayZR => Lens' c_ayZR FilterAttributes
- Graphics.SvgTree.Types: gaussianBlurIn :: HasGaussianBlur c_ayQD => Lens' c_ayQD (Last FilterSource)
+ Graphics.SvgTree.Types: gaussianBlurIn :: HasGaussianBlur c_ayZR => Lens' c_ayZR (Last FilterSource)
- Graphics.SvgTree.Types: gaussianBlurStdDeviationX :: HasGaussianBlur c_ayQD => Lens' c_ayQD Number
+ Graphics.SvgTree.Types: gaussianBlurStdDeviationX :: HasGaussianBlur c_ayZR => Lens' c_ayZR Number
- Graphics.SvgTree.Types: gaussianBlurStdDeviationY :: HasGaussianBlur c_ayQD => Lens' c_ayQD (Last Number)
+ Graphics.SvgTree.Types: gaussianBlurStdDeviationY :: HasGaussianBlur c_ayZR => Lens' c_ayZR (Last Number)
- Graphics.SvgTree.Types: groupOpacity :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe Float)
+ Graphics.SvgTree.Types: groupOpacity :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe Float)
- Graphics.SvgTree.Types: height :: HasDocument c_axOb => Lens' c_axOb (Maybe Number)
+ Graphics.SvgTree.Types: height :: HasDocument c_axXf => Lens' c_axXf (Maybe Number)
- Graphics.SvgTree.Types: markerEnd :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: markerEnd :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: markerMid :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: markerMid :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: markerStart :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: markerStart :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: maskRef :: HasDrawAttributes c_apFd => Lens' c_apFd (Last ElementRef)
+ Graphics.SvgTree.Types: maskRef :: HasDrawAttributes c_apJr => Lens' c_apJr (Last ElementRef)
- Graphics.SvgTree.Types: preRendered :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe String)
+ Graphics.SvgTree.Types: preRendered :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe String)
- Graphics.SvgTree.Types: strokeColor :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Texture)
+ Graphics.SvgTree.Types: strokeColor :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Texture)
- Graphics.SvgTree.Types: strokeDashArray :: HasDrawAttributes c_apFd => Lens' c_apFd (Last [Number])
+ Graphics.SvgTree.Types: strokeDashArray :: HasDrawAttributes c_apJr => Lens' c_apJr (Last [Number])
- Graphics.SvgTree.Types: strokeLineCap :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Cap)
+ Graphics.SvgTree.Types: strokeLineCap :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Cap)
- Graphics.SvgTree.Types: strokeLineJoin :: HasDrawAttributes c_apFd => Lens' c_apFd (Last LineJoin)
+ Graphics.SvgTree.Types: strokeLineJoin :: HasDrawAttributes c_apJr => Lens' c_apJr (Last LineJoin)
- Graphics.SvgTree.Types: strokeMiterLimit :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Double)
+ Graphics.SvgTree.Types: strokeMiterLimit :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Double)
- Graphics.SvgTree.Types: strokeOffset :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Number)
+ Graphics.SvgTree.Types: strokeOffset :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Number)
- Graphics.SvgTree.Types: strokeOpacity :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe Float)
+ Graphics.SvgTree.Types: strokeOpacity :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe Float)
- Graphics.SvgTree.Types: strokeWidth :: HasDrawAttributes c_apFd => Lens' c_apFd (Last Number)
+ Graphics.SvgTree.Types: strokeWidth :: HasDrawAttributes c_apJr => Lens' c_apJr (Last Number)
- Graphics.SvgTree.Types: textAnchor :: HasDrawAttributes c_apFd => Lens' c_apFd (Last TextAnchor)
+ Graphics.SvgTree.Types: textAnchor :: HasDrawAttributes c_apJr => Lens' c_apJr (Last TextAnchor)
- Graphics.SvgTree.Types: textPath :: HasTextPath c_ayqj => Lens' c_ayqj TextPath
+ Graphics.SvgTree.Types: textPath :: HasTextPath c_ayzx => Lens' c_ayzx TextPath
- Graphics.SvgTree.Types: textPathMethod :: HasTextPath c_ayqj => Lens' c_ayqj TextPathMethod
+ Graphics.SvgTree.Types: textPathMethod :: HasTextPath c_ayzx => Lens' c_ayzx TextPathMethod
- Graphics.SvgTree.Types: textPathName :: HasTextPath c_ayqj => Lens' c_ayqj String
+ Graphics.SvgTree.Types: textPathName :: HasTextPath c_ayzx => Lens' c_ayzx String
- Graphics.SvgTree.Types: textPathSpacing :: HasTextPath c_ayqj => Lens' c_ayqj TextPathSpacing
+ Graphics.SvgTree.Types: textPathSpacing :: HasTextPath c_ayzx => Lens' c_ayzx TextPathSpacing
- Graphics.SvgTree.Types: textPathStartOffset :: HasTextPath c_ayqj => Lens' c_ayqj Number
+ Graphics.SvgTree.Types: textPathStartOffset :: HasTextPath c_ayzx => Lens' c_ayzx Number
- Graphics.SvgTree.Types: transform :: HasDrawAttributes c_apFd => Lens' c_apFd (Maybe [Transformation])
+ Graphics.SvgTree.Types: transform :: HasDrawAttributes c_apJr => Lens' c_apJr (Maybe [Transformation])
- Graphics.SvgTree.Types: viewBox :: HasDocument c_axOb => Lens' c_axOb (Maybe (Double, Double, Double, Double))
+ Graphics.SvgTree.Types: viewBox :: HasDocument c_axXf => Lens' c_axXf (Maybe (Double, Double, Double, Double))
- Graphics.SvgTree.Types: width :: HasDocument c_axOb => Lens' c_axOb (Maybe Number)
+ Graphics.SvgTree.Types: width :: HasDocument c_axXf => Lens' c_axXf (Maybe Number)
Files
- reanimate-svg.cabal +2/−1
- src/Graphics/SvgTree/Misc.hs +11/−14
reanimate-svg.cabal view
@@ -1,5 +1,5 @@ name: reanimate-svg-version: 0.9.4.0+version: 0.9.5.0 synopsis: SVG file loader and serializer description: reanimate-svg provides types representing a SVG document,@@ -61,6 +61,7 @@ , transformers >= 0.3 && < 0.6 , mtl >= 2.1 && < 2.3 , lens >= 4.6 && < 5+ , double-conversion >= 2.0.0.0 && < 3.0.0.0 test-suite test default-language: Haskell2010
src/Graphics/SvgTree/Misc.hs view
@@ -1,19 +1,16 @@-module Graphics.SvgTree.Misc where+module Graphics.SvgTree.Misc+ ( ppD+ , ppF+ ) where -import Numeric+import Data.Double.Conversion.Text+import qualified Data.Text as T +precision :: Int+precision = 6+ ppD :: Double -> String-ppD c = pickMin (showFFloat Nothing c "") (showFFloat (Just precision) c "")- where- pickMin [] _ = []- pickMin _ [] = []- pickMin (x:xs) (_:ys) = x : pickMin xs ys- precision = 6+ppD c = T.unpack $ T.take (precision+2) $ toShortest c ppF :: Float -> String-ppF c = pickMin (showFFloat Nothing c "") (showFFloat (Just precision) c "")- where- pickMin [] _ = []- pickMin _ [] = []- pickMin (x:xs) (_:ys) = x : pickMin xs ys- precision = 6+ppF = ppD . realToFrac