reanimate-svg 0.9.2.1 → 0.9.3.0
raw patch · 3 files changed
+8/−2 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Graphics.SvgTree.Types: [_documentAspectRatio] :: Document -> PreserveAspectRatio
+ Graphics.SvgTree.Types: documentAspectRatio :: HasDocument c_axLW => Lens' c_axLW PreserveAspectRatio
- Graphics.SvgTree.Types: Document :: Maybe (Double, Double, Double, Double) -> Maybe Number -> Maybe Number -> [Tree] -> Map String Tree -> String -> FilePath -> Document
+ Graphics.SvgTree.Types: Document :: Maybe (Double, Double, Double, Double) -> Maybe Number -> Maybe Number -> [Tree] -> Map String Tree -> String -> FilePath -> PreserveAspectRatio -> Document
- Graphics.SvgTree.Types: class HasColorMatrix c_ayIT
+ Graphics.SvgTree.Types: class HasColorMatrix c_ayKd
- Graphics.SvgTree.Types: class HasComposite c_ayzC
+ Graphics.SvgTree.Types: class HasComposite c_ayAW
- Graphics.SvgTree.Types: class HasDocument c_axLE
+ Graphics.SvgTree.Types: class HasDocument c_axLW
- Graphics.SvgTree.Types: class HasGaussianBlur c_ayO6
+ Graphics.SvgTree.Types: class HasGaussianBlur c_ayPq
- Graphics.SvgTree.Types: class HasTextPath c_aynM
+ Graphics.SvgTree.Types: class HasTextPath c_ayp6
- Graphics.SvgTree.Types: colorMatrix :: HasColorMatrix c_ayIT => Lens' c_ayIT ColorMatrix
+ Graphics.SvgTree.Types: colorMatrix :: HasColorMatrix c_ayKd => Lens' c_ayKd ColorMatrix
- Graphics.SvgTree.Types: colorMatrixDrawAttributes :: HasColorMatrix c_ayIT => Lens' c_ayIT DrawAttributes
+ Graphics.SvgTree.Types: colorMatrixDrawAttributes :: HasColorMatrix c_ayKd => Lens' c_ayKd DrawAttributes
- Graphics.SvgTree.Types: colorMatrixFilterAttr :: HasColorMatrix c_ayIT => Lens' c_ayIT FilterAttributes
+ Graphics.SvgTree.Types: colorMatrixFilterAttr :: HasColorMatrix c_ayKd => Lens' c_ayKd FilterAttributes
- Graphics.SvgTree.Types: colorMatrixIn :: HasColorMatrix c_ayIT => Lens' c_ayIT (Last FilterSource)
+ Graphics.SvgTree.Types: colorMatrixIn :: HasColorMatrix c_ayKd => Lens' c_ayKd (Last FilterSource)
- Graphics.SvgTree.Types: colorMatrixType :: HasColorMatrix c_ayIT => Lens' c_ayIT ColorMatrixType
+ Graphics.SvgTree.Types: colorMatrixType :: HasColorMatrix c_ayKd => Lens' c_ayKd ColorMatrixType
- Graphics.SvgTree.Types: colorMatrixValues :: HasColorMatrix c_ayIT => Lens' c_ayIT String
+ Graphics.SvgTree.Types: colorMatrixValues :: HasColorMatrix c_ayKd => Lens' c_ayKd String
- Graphics.SvgTree.Types: composite :: HasComposite c_ayzC => Lens' c_ayzC Composite
+ Graphics.SvgTree.Types: composite :: HasComposite c_ayAW => Lens' c_ayAW Composite
- Graphics.SvgTree.Types: compositeDrawAttributes :: HasComposite c_ayzC => Lens' c_ayzC DrawAttributes
+ Graphics.SvgTree.Types: compositeDrawAttributes :: HasComposite c_ayAW => Lens' c_ayAW DrawAttributes
- Graphics.SvgTree.Types: compositeFilterAttr :: HasComposite c_ayzC => Lens' c_ayzC FilterAttributes
+ Graphics.SvgTree.Types: compositeFilterAttr :: HasComposite c_ayAW => Lens' c_ayAW FilterAttributes
- Graphics.SvgTree.Types: compositeIn :: HasComposite c_ayzC => Lens' c_ayzC (Last FilterSource)
+ Graphics.SvgTree.Types: compositeIn :: HasComposite c_ayAW => Lens' c_ayAW (Last FilterSource)
- Graphics.SvgTree.Types: compositeIn2 :: HasComposite c_ayzC => Lens' c_ayzC (Last FilterSource)
+ Graphics.SvgTree.Types: compositeIn2 :: HasComposite c_ayAW => Lens' c_ayAW (Last FilterSource)
- Graphics.SvgTree.Types: compositeK1 :: HasComposite c_ayzC => Lens' c_ayzC Number
+ Graphics.SvgTree.Types: compositeK1 :: HasComposite c_ayAW => Lens' c_ayAW Number
- Graphics.SvgTree.Types: compositeK2 :: HasComposite c_ayzC => Lens' c_ayzC Number
+ Graphics.SvgTree.Types: compositeK2 :: HasComposite c_ayAW => Lens' c_ayAW Number
- Graphics.SvgTree.Types: compositeK3 :: HasComposite c_ayzC => Lens' c_ayzC Number
+ Graphics.SvgTree.Types: compositeK3 :: HasComposite c_ayAW => Lens' c_ayAW Number
- Graphics.SvgTree.Types: compositeK4 :: HasComposite c_ayzC => Lens' c_ayzC Number
+ Graphics.SvgTree.Types: compositeK4 :: HasComposite c_ayAW => Lens' c_ayAW Number
- Graphics.SvgTree.Types: compositeOperator :: HasComposite c_ayzC => Lens' c_ayzC CompositeOperator
+ Graphics.SvgTree.Types: compositeOperator :: HasComposite c_ayAW => Lens' c_ayAW CompositeOperator
- Graphics.SvgTree.Types: definitions :: HasDocument c_axLE => Lens' c_axLE (Map String Tree)
+ Graphics.SvgTree.Types: definitions :: HasDocument c_axLW => Lens' c_axLW (Map String Tree)
- Graphics.SvgTree.Types: description :: HasDocument c_axLE => Lens' c_axLE String
+ Graphics.SvgTree.Types: description :: HasDocument c_axLW => Lens' c_axLW String
- Graphics.SvgTree.Types: document :: HasDocument c_axLE => Lens' c_axLE Document
+ Graphics.SvgTree.Types: document :: HasDocument c_axLW => Lens' c_axLW Document
- Graphics.SvgTree.Types: documentLocation :: HasDocument c_axLE => Lens' c_axLE FilePath
+ Graphics.SvgTree.Types: documentLocation :: HasDocument c_axLW => Lens' c_axLW FilePath
- Graphics.SvgTree.Types: elements :: HasDocument c_axLE => Lens' c_axLE [Tree]
+ Graphics.SvgTree.Types: elements :: HasDocument c_axLW => Lens' c_axLW [Tree]
- Graphics.SvgTree.Types: gaussianBlur :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 GaussianBlur
+ Graphics.SvgTree.Types: gaussianBlur :: HasGaussianBlur c_ayPq => Lens' c_ayPq GaussianBlur
- Graphics.SvgTree.Types: gaussianBlurDrawAttributes :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 DrawAttributes
+ Graphics.SvgTree.Types: gaussianBlurDrawAttributes :: HasGaussianBlur c_ayPq => Lens' c_ayPq DrawAttributes
- Graphics.SvgTree.Types: gaussianBlurEdgeMode :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 EdgeMode
+ Graphics.SvgTree.Types: gaussianBlurEdgeMode :: HasGaussianBlur c_ayPq => Lens' c_ayPq EdgeMode
- Graphics.SvgTree.Types: gaussianBlurFilterAttr :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 FilterAttributes
+ Graphics.SvgTree.Types: gaussianBlurFilterAttr :: HasGaussianBlur c_ayPq => Lens' c_ayPq FilterAttributes
- Graphics.SvgTree.Types: gaussianBlurIn :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 (Last FilterSource)
+ Graphics.SvgTree.Types: gaussianBlurIn :: HasGaussianBlur c_ayPq => Lens' c_ayPq (Last FilterSource)
- Graphics.SvgTree.Types: gaussianBlurStdDeviationX :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 Number
+ Graphics.SvgTree.Types: gaussianBlurStdDeviationX :: HasGaussianBlur c_ayPq => Lens' c_ayPq Number
- Graphics.SvgTree.Types: gaussianBlurStdDeviationY :: HasGaussianBlur c_ayO6 => Lens' c_ayO6 (Last Number)
+ Graphics.SvgTree.Types: gaussianBlurStdDeviationY :: HasGaussianBlur c_ayPq => Lens' c_ayPq (Last Number)
- Graphics.SvgTree.Types: height :: HasDocument c_axLE => Lens' c_axLE (Maybe Number)
+ Graphics.SvgTree.Types: height :: HasDocument c_axLW => Lens' c_axLW (Maybe Number)
- Graphics.SvgTree.Types: textPath :: HasTextPath c_aynM => Lens' c_aynM TextPath
+ Graphics.SvgTree.Types: textPath :: HasTextPath c_ayp6 => Lens' c_ayp6 TextPath
- Graphics.SvgTree.Types: textPathMethod :: HasTextPath c_aynM => Lens' c_aynM TextPathMethod
+ Graphics.SvgTree.Types: textPathMethod :: HasTextPath c_ayp6 => Lens' c_ayp6 TextPathMethod
- Graphics.SvgTree.Types: textPathName :: HasTextPath c_aynM => Lens' c_aynM String
+ Graphics.SvgTree.Types: textPathName :: HasTextPath c_ayp6 => Lens' c_ayp6 String
- Graphics.SvgTree.Types: textPathSpacing :: HasTextPath c_aynM => Lens' c_aynM TextPathSpacing
+ Graphics.SvgTree.Types: textPathSpacing :: HasTextPath c_ayp6 => Lens' c_ayp6 TextPathSpacing
- Graphics.SvgTree.Types: textPathStartOffset :: HasTextPath c_aynM => Lens' c_aynM Number
+ Graphics.SvgTree.Types: textPathStartOffset :: HasTextPath c_ayp6 => Lens' c_ayp6 Number
- Graphics.SvgTree.Types: viewBox :: HasDocument c_axLE => Lens' c_axLE (Maybe (Double, Double, Double, Double))
+ Graphics.SvgTree.Types: viewBox :: HasDocument c_axLW => Lens' c_axLW (Maybe (Double, Double, Double, Double))
- Graphics.SvgTree.Types: width :: HasDocument c_axLE => Lens' c_axLE (Maybe Number)
+ Graphics.SvgTree.Types: width :: HasDocument c_axLW => Lens' c_axLW (Maybe Number)
Files
reanimate-svg.cabal view
@@ -1,5 +1,5 @@ name: reanimate-svg-version: 0.9.2.1+version: 0.9.3.0 synopsis: SVG file loader and serializer description: reanimate-svg provides types representing a SVG document,
src/Graphics/SvgTree/Types.hs view
@@ -2548,6 +2548,7 @@ , _definitions :: M.Map String Tree , _description :: String , _documentLocation :: FilePath+ , _documentAspectRatio :: PreserveAspectRatio } deriving Show
src/Graphics/SvgTree/XmlParser.hs view
@@ -1231,6 +1231,9 @@ , _definitions = defs , _description = "" , _documentLocation = rootLocation+ , _documentAspectRatio =+ fromMaybe defaultSvg $+ attributeFinder "preserveAspectRatio" e >>= aparse } where parsedElements = map unparse $ elChildren e@@ -1266,7 +1269,9 @@ ,attr "version" "1.1"] ++ catMaybes [attr "width" . serializeNumber <$> _width doc ,attr "height" . serializeNumber <$> _height doc- ]+ ] +++ catMaybes [attr "preserveAspectRatio" <$> aserialize (_documentAspectRatio doc)+ | _documentAspectRatio doc /= defaultSvg ] xmlOfTree :: Tree -> Maybe X.Element xmlOfTree = serializeTreeNode