Rasterific 0.7.4.2 → 0.7.4.3
raw patch · 3 files changed
+11/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Rasterific.cabal +2/−2
- changelog +5/−0
- src/Graphics/Rasterific/StrokeInternal.hs +4/−1
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.4.2 +version: 0.7.4.3 synopsis: A pure haskell drawing engine. -- A longer description of the package. description: @@ -38,7 +38,7 @@ Source-Repository this Type: git Location: git://github.com/Twinside/Rasterific.git - Tag: v0.7.4.2 + Tag: v0.7.4.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.4.3 May 2019 +----------------- + + * Fix round cap on degenerate cubic bezier (with null normal) + v0.7.4.2 December 2018 ----------------------
src/Graphics/Rasterific/StrokeInternal.hs view
@@ -16,6 +16,7 @@ , (^+^) , (^*) , dot + , nearZero ) import Graphics.Rasterific.Operators @@ -80,7 +81,9 @@ -- | Put a cap at the end of a bezier curve, depending -- on the kind of cap wanted. cap :: Float -> Cap -> Primitive -> Container Primitive -cap offset CapRound prim = roundJoin offset p u (- u) +cap offset CapRound prim + | nearZero u = cap offset (CapStraight 0) prim + | otherwise = roundJoin offset p u (- u) where (p, u) = lastPointAndNormal prim cap offset (CapStraight cVal) prim =