Rasterific 0.7.2.3 → 0.7.3
raw patch · 3 files changed
+16/−10 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Rasterific.cabal +2/−4
- changelog +5/−0
- src/Graphics/Rasterific/MicroPdf.hs +9/−6
Rasterific.cabal view
@@ -1,7 +1,7 @@ -- Initial Rasterific.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ name: Rasterific -version: 0.7.2.3 +version: 0.7.3 synopsis: A pure haskell drawing engine. -- A longer description of the package. description: @@ -31,8 +31,6 @@ , docimages/*.png , exec-src/docImageGenerator.hs - - Source-Repository head Type: git Location: git://github.com/Twinside/Rasterific.git @@ -40,7 +38,7 @@ Source-Repository this Type: git Location: git://github.com/Twinside/Rasterific.git - Tag: v0.7.2.3 + Tag: v0.7.3 flag embed_linear description: Embed a reduced version of Linear avoiding a (huge) dep
changelog view
@@ -1,6 +1,11 @@ Change log ========== +v0.7.3 +------ + + * Fix: PDF output with stroke of width 0 (thanks to robx) + v0.7.2.2/0.7.2.3 ----------------
src/Graphics/Rasterific/MicroPdf.hs view
@@ -1034,15 +1034,18 @@ pure $ foldMap pathToPdf (resplit prims) <> filler method <> after + Stroke w j (c, _) prims next -> do after <- recurse next let output p = pathToPdf p <> reClose p - pure $ toPdf w <> tp " w " - <> lineJoinOf j - <> lineCapOf c <> "\n" - <> foldMap output (resplit prims) - <> tp "S\n" - <> after + stroke = case w of + 0 -> mempty + _ -> toPdf w <> tp " w " + <> lineJoinOf j + <> lineCapOf c <> "\n" + <> foldMap output (resplit prims) + <> tp "S\n" + pure $ stroke <> after DashedStroke o pat w j (c, _) prims next -> do sub <- go forceInverse activeTrans filler prevTexture $ Stroke w j (c, c) prims (Pure ())