svgone 0.2.0.0 → 0.2.0.1
raw patch · 3 files changed
+20/−22 lines, 3 filesdep ~basedep ~bytestringdep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, bytestring, containers, generic-lens, lens, linear, mtl, pretty-simple, reanimate-svg, text
API changes (from Hackage documentation)
- Svgone.Plugin: data family PluginOptions a;
- Svgone.Plugin.CollapseGroups: data family PluginOptions a
- Svgone.Plugin.MergePaths: data family PluginOptions a
- Svgone.Plugin.RemoveAttributes: data family PluginOptions a
+ Svgone.Plugin: data PluginOptions a;
+ Svgone.Plugin.CollapseGroups: data PluginOptions a
+ Svgone.Plugin.MergePaths: data PluginOptions a
+ Svgone.Plugin.RemoveAttributes: data PluginOptions a
Files
- src/Svgone/Plugin/MergePaths.hs +1/−2
- src/Svgone/Plugin/RemoveAttributes.hs +8/−9
- svgone.cabal +11/−11
src/Svgone/Plugin/MergePaths.hs view
@@ -10,7 +10,6 @@ import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.List.NonEmpty as NE import Data.Maybe-import Data.Monoid import Data.Tuple import GHC.Generics import Graphics.SvgTree hiding (Text)@@ -99,7 +98,7 @@ toPolygonPath :: Path -> Maybe (DrawAttributes, PolygonPath) toPolygonPath (Path attrs pcs) = do guard $ -- only proceed if there is no visible stroke- maybe True nearZeroNumber (getLast $ attrs ^. strokeWidth)+ maybe True nearZeroNumber (attrs ^. strokeWidth) || maybe False nearZero (attrs ^. strokeOpacity) MoveTo OriginAbsolute [v] : xs <- pure pcs (attrs,) . PolygonPath . (v :|) <$> f v xs
src/Svgone/Plugin/RemoveAttributes.hs view
@@ -1,7 +1,6 @@ module Svgone.Plugin.RemoveAttributes (P, PluginOptions (..)) where import Control.Lens-import Data.Monoid import Graphics.SvgTree import Linear.Epsilon import Svgone.Plugin@@ -45,17 +44,17 @@ removeInvisibleStroke :: DrawAttributes -> DrawAttributes removeInvisibleStroke attrs- | Last (Just x) <- attrs ^. strokeWidth, nearZeroNumber x = remove+ | Just x <- attrs ^. strokeWidth, nearZeroNumber x = remove | Just x <- attrs ^. strokeOpacity, nearZero x = remove | otherwise = attrs where remove = attrs- & strokeWidth .~ Last Nothing- & strokeColor .~ Last Nothing+ & strokeWidth .~ Nothing+ & strokeColor .~ Nothing & strokeOpacity .~ Nothing- & strokeLineCap .~ Last Nothing- & strokeLineJoin .~ Last Nothing- & strokeMiterLimit .~ Last Nothing- & strokeOffset .~ Last Nothing- & strokeDashArray .~ Last Nothing+ & strokeLineCap .~ Nothing+ & strokeLineJoin .~ Nothing+ & strokeMiterLimit .~ Nothing+ & strokeOffset .~ Nothing+ & strokeDashArray .~ Nothing
svgone.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: svgone-version: 0.2.0.0+version: 0.2.0.1 license: BSD-3-Clause maintainer: George Thomas <georgefsthomas@gmail.com> homepage: https://github.com/georgefst/svgone@@ -13,21 +13,21 @@ common common build-depends:- base ^>= { 4.13, 4.14 },- bytestring ^>= 0.10.10,- containers ^>= 0.6.2,+ base ^>= {4.13, 4.14, 4.15, 4.16, 4.17, 4.18, 4.19},+ bytestring ^>= {0.10.10, 0.11, 0.12},+ containers ^>= {0.6.2, 0.7}, directory ^>= 1.3.6, extra ^>= 1.7.9, filepath ^>= 1.4.2,- generic-lens ^>= 2.0,- lens ^>= 4.19.2,- linear ^>= 1.21.3,- mtl ^>= 2.2.2,- pretty-simple ^>= 4.0.0,+ generic-lens ^>= {2.0, 2.1, 2.2},+ lens ^>= {4.19.2, 5.0, 5.1, 5.2},+ linear ^>= {1.21.3, 1.22},+ mtl ^>= {2.2.2, 2.3},+ pretty-simple ^>= {4.0.0, 4.1}, process ^>= 1.6.8,- reanimate-svg ^>= 0.13.0,+ reanimate-svg ^>= 0.13.0.1, safe ^>= 0.3.19,- text ^>= 1.2.3,+ text ^>= {1.2.3, 2.0, 2.1}, ghc-options: -Wall -fdefer-typed-holes