summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrentYorgey <>2018-06-11 18:49:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-06-11 18:49:00 (GMT)
commitc6a2d737baedf7d3baf81153db3968d52ae7f18b (patch)
tree3190b610c8f148df269f7be5b9ce126302408968
parent757f878d57e6e12faaab590652ee783dee51e578 (diff)
version 1.4.2.3HEAD1.4.2.3master
-rw-r--r--CHANGELOG.md4
-rw-r--r--diagrams-lib.cabal8
-rw-r--r--src/Diagrams/Combinators.hs6
3 files changed, 11 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 461c443..071ff63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## [v1.4.2.3](https://github.com/diagrams/diagrams-lib/tree/v1.4.2.2) (2018-06-11)
+
+- Bug fix for `extrudeEnvelope` and friends ([#316](https://github.com/diagrams/diagrams-lib/issues/316))
+
## [v1.4.2.2](https://github.com/diagrams/diagrams-lib/tree/v1.4.2.2) (2018-05-08)
- Fixes for GHC < 8.0
diff --git a/diagrams-lib.cabal b/diagrams-lib.cabal
index f083ab1..e20d4c9 100644
--- a/diagrams-lib.cabal
+++ b/diagrams-lib.cabal
@@ -1,5 +1,5 @@
Name: diagrams-lib
-Version: 1.4.2.2
+Version: 1.4.2.3
Synopsis: Embedded domain-specific language for declarative graphics
Description: Diagrams is a flexible, extensible EDSL for creating
graphics of many types. Graphics can be created
@@ -104,7 +104,7 @@ Library
containers >= 0.3 && < 0.6,
array >= 0.3 && < 0.6,
semigroups >= 0.3.4 && < 0.19,
- monoid-extras >= 0.3 && < 0.5,
+ monoid-extras >= 0.3 && < 0.6,
dual-tree >= 0.2 && < 0.3,
diagrams-core >= 1.4 && < 1.5,
diagrams-solve >= 0.1 && < 0.2,
@@ -123,7 +123,7 @@ Library
adjunctions >= 4.0 && < 5.0,
distributive >=0.2.2 && < 1.0,
process >= 1.1 && < 1.7,
- fsnotify >= 0.2.1 && < 0.3,
+ fsnotify >= 0.2.1 && < 0.4,
directory >= 1.2 && < 1.4,
unordered-containers >= 0.2 && < 0.3,
text >= 0.7.1 && < 1.3,
@@ -158,7 +158,7 @@ test-suite tests
, Instances
hs-source-dirs: test
build-depends: base,
- tasty >= 0.10 && < 1.1,
+ tasty >= 0.10 && < 1.2,
tasty-hunit >= 0.9.2 && < 0.11,
tasty-quickcheck >= 0.8 && < 0.11,
deepseq >= 1.3 && < 1.5,
diff --git a/src/Diagrams/Combinators.hs b/src/Diagrams/Combinators.hs
index f95186a..82387b3 100644
--- a/src/Diagrams/Combinators.hs
+++ b/src/Diagrams/Combinators.hs
@@ -145,7 +145,7 @@ strut v = QD $ D.leafU (inj . toDeletable $ env)
extrudeEnvelope
:: (Metric v, OrderedField n, Monoid' m)
=> v n -> QDiagram b v n m -> QDiagram b v n m
-extrudeEnvelope = deformEnvelope 0.5
+extrudeEnvelope = deformEnvelope 1
-- | @intrudeEnvelope v d@ asymmetrically \"intrudes\" the envelope of
-- a diagram away from the given direction. All parts of the envelope
@@ -157,7 +157,7 @@ extrudeEnvelope = deformEnvelope 0.5
intrudeEnvelope
:: (Metric v, OrderedField n, Monoid' m)
=> v n -> QDiagram b v n m -> QDiagram b v n m
-intrudeEnvelope = deformEnvelope (-0.5)
+intrudeEnvelope = deformEnvelope (-1)
-- Utility for extrudeEnvelope / intrudeEnvelope
deformEnvelope
@@ -167,7 +167,7 @@ deformEnvelope s v = over (envelope . _Wrapping Envelope) deformE
where
deformE = Option . fmap deformE' . getOption
deformE' env v'
- | dp > 0 = Max $ getMax (env v') + (dp * s) / norm v'
+ | dp > 0 = Max $ getMax (env v') + (dp * s) / quadrance v'
| otherwise = env v'
where
dp = v' `dot` v