packages feed

diagrams-lib 1.3.0.3 → 1.3.0.4

raw patch · 4 files changed

+35/−25 lines, 4 filesdep ~basedep ~lineardep ~semigroupsPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, linear, semigroups

API changes (from Hackage documentation)

- Diagrams.Segment: oeEnvelope :: Lens' (OffsetEnvelope v_aCwW n_aCwX) (Envelope v_aCwW n_aCwX)
+ Diagrams.Segment: oeEnvelope :: Lens' (OffsetEnvelope v_aCCO n_aCCP) (Envelope v_aCCO n_aCCP)
- Diagrams.Segment: oeOffset :: Lens' (OffsetEnvelope v_aCwW n_aCwX) (TotalOffset v_aCwW n_aCwX)
+ Diagrams.Segment: oeOffset :: Lens' (OffsetEnvelope v_aCCO n_aCCP) (TotalOffset v_aCCO n_aCCP)
- Diagrams.ThreeD.Camera: horizontalFieldOfView :: Lens' (PerspectiveLens n_apAM) (Angle n_apAM)
+ Diagrams.ThreeD.Camera: horizontalFieldOfView :: Lens' (PerspectiveLens n_apGM) (Angle n_apGM)
- Diagrams.ThreeD.Camera: orthoHeight :: Lens' (OrthoLens n_apD3) n_apD3
+ Diagrams.ThreeD.Camera: orthoHeight :: Lens' (OrthoLens n_apJ3) n_apJ3
- Diagrams.ThreeD.Camera: orthoWidth :: Lens' (OrthoLens n_apD3) n_apD3
+ Diagrams.ThreeD.Camera: orthoWidth :: Lens' (OrthoLens n_apJ3) n_apJ3
- Diagrams.ThreeD.Camera: verticalFieldOfView :: Lens' (PerspectiveLens n_apAM) (Angle n_apAM)
+ Diagrams.ThreeD.Camera: verticalFieldOfView :: Lens' (PerspectiveLens n_apGM) (Angle n_apGM)
- Diagrams.Transform.Matrix: fromMat22 :: (Epsilon n, Floating n) => M22 n -> V2 n -> Maybe (T2 n)
+ Diagrams.Transform.Matrix: fromMat22 :: Floating n => M22 n -> V2 n -> T2 n
- Diagrams.Transform.Matrix: fromMat33 :: (Epsilon n, Floating n) => M33 n -> V3 n -> Maybe (T3 n)
+ Diagrams.Transform.Matrix: fromMat33 :: Floating n => M33 n -> V3 n -> T3 n
- Diagrams.Transform.Matrix: mat22 :: (Epsilon n, Floating n) => Prism' (M22 n, V2 n) (T2 n)
+ Diagrams.Transform.Matrix: mat22 :: Floating n => Iso' (M22 n, V2 n) (T2 n)
- Diagrams.Transform.Matrix: mat33 :: (Epsilon n, Floating n) => Prism' (M33 n, V3 n) (T3 n)
+ Diagrams.Transform.Matrix: mat33 :: Floating n => Iso' (M33 n, V3 n) (T3 n)
- Diagrams.Transform.ScaleInv: scaleInvDir :: Lens' (ScaleInv t_auYT) (Vn t_auYT)
+ Diagrams.Transform.ScaleInv: scaleInvDir :: Lens' (ScaleInv t_av3g) (Vn t_av3g)
- Diagrams.Transform.ScaleInv: scaleInvLoc :: Lens' (ScaleInv t_auYT) (Point (V t_auYT) (N t_auYT))
+ Diagrams.Transform.ScaleInv: scaleInvLoc :: Lens' (ScaleInv t_av3g) (Point (V t_av3g) (N t_av3g))
- Diagrams.Transform.ScaleInv: scaleInvObj :: Lens' (ScaleInv t_auYT) t_auYT
+ Diagrams.Transform.ScaleInv: scaleInvObj :: Lens' (ScaleInv t_av3g) t_av3g
- Diagrams.TwoD: _LG :: Prism' (Texture n_a1EQ9) (LGradient n_a1EQ9)
+ Diagrams.TwoD: _LG :: Prism' (Texture n_a1EXd) (LGradient n_a1EXd)
- Diagrams.TwoD: _RG :: Prism' (Texture n_a1EQ9) (RGradient n_a1EQ9)
+ Diagrams.TwoD: _RG :: Prism' (Texture n_a1EXd) (RGradient n_a1EXd)
- Diagrams.TwoD: _SC :: Prism' (Texture n_a1EQ9) SomeColor
+ Diagrams.TwoD: _SC :: Prism' (Texture n_a1EXd) SomeColor
- Diagrams.TwoD: eColor :: Lens' (EnvelopeOpts n_a1Shd) (Colour Double)
+ Diagrams.TwoD: eColor :: Lens' (EnvelopeOpts n_a1SnU) (Colour Double)
- Diagrams.TwoD: eLineWidth :: Lens (EnvelopeOpts n_a1Shd) (EnvelopeOpts n_a1Sjk) (Measure n_a1Shd) (Measure n_a1Sjk)
+ Diagrams.TwoD: eLineWidth :: Lens (EnvelopeOpts n_a1SnU) (EnvelopeOpts n_a1Sq1) (Measure n_a1SnU) (Measure n_a1Sq1)
- Diagrams.TwoD: ePoints :: Lens' (EnvelopeOpts n_a1Shd) Int
+ Diagrams.TwoD: ePoints :: Lens' (EnvelopeOpts n_a1SnU) Int
- Diagrams.TwoD: oColor :: Lens' (OriginOpts n_a1Sgq) (Colour Double)
+ Diagrams.TwoD: oColor :: Lens' (OriginOpts n_a1Sn7) (Colour Double)
- Diagrams.TwoD: oMinSize :: Lens' (OriginOpts n_a1Sgq) n_a1Sgq
+ Diagrams.TwoD: oMinSize :: Lens' (OriginOpts n_a1Sn7) n_a1Sn7
- Diagrams.TwoD: oScale :: Lens' (OriginOpts n_a1Sgq) n_a1Sgq
+ Diagrams.TwoD: oScale :: Lens' (OriginOpts n_a1Sn7) n_a1Sn7
- Diagrams.TwoD: radiusBL :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD: radiusBL :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD: radiusBR :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD: radiusBR :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD: radiusTL :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD: radiusTL :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD: radiusTR :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD: radiusTR :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD: tColor :: Lens' (TraceOpts n_a1SjJ) (Colour Double)
+ Diagrams.TwoD: tColor :: Lens' (TraceOpts n_a1Sqq) (Colour Double)
- Diagrams.TwoD: tMinSize :: Lens' (TraceOpts n_a1SjJ) n_a1SjJ
+ Diagrams.TwoD: tMinSize :: Lens' (TraceOpts n_a1Sqq) n_a1Sqq
- Diagrams.TwoD: tPoints :: Lens' (TraceOpts n_a1SjJ) Int
+ Diagrams.TwoD: tPoints :: Lens' (TraceOpts n_a1Sqq) Int
- Diagrams.TwoD: tScale :: Lens' (TraceOpts n_a1SjJ) n_a1SjJ
+ Diagrams.TwoD: tScale :: Lens' (TraceOpts n_a1Sqq) n_a1Sqq
- Diagrams.TwoD.Attributes: _LG :: Prism' (Texture n_a1EQ9) (LGradient n_a1EQ9)
+ Diagrams.TwoD.Attributes: _LG :: Prism' (Texture n_a1EXd) (LGradient n_a1EXd)
- Diagrams.TwoD.Attributes: _RG :: Prism' (Texture n_a1EQ9) (RGradient n_a1EQ9)
+ Diagrams.TwoD.Attributes: _RG :: Prism' (Texture n_a1EXd) (RGradient n_a1EXd)
- Diagrams.TwoD.Attributes: _SC :: Prism' (Texture n_a1EQ9) SomeColor
+ Diagrams.TwoD.Attributes: _SC :: Prism' (Texture n_a1EXd) SomeColor
- Diagrams.TwoD.Model: eColor :: Lens' (EnvelopeOpts n_a1Shd) (Colour Double)
+ Diagrams.TwoD.Model: eColor :: Lens' (EnvelopeOpts n_a1SnU) (Colour Double)
- Diagrams.TwoD.Model: eLineWidth :: Lens (EnvelopeOpts n_a1Shd) (EnvelopeOpts n_a1Sjk) (Measure n_a1Shd) (Measure n_a1Sjk)
+ Diagrams.TwoD.Model: eLineWidth :: Lens (EnvelopeOpts n_a1SnU) (EnvelopeOpts n_a1Sq1) (Measure n_a1SnU) (Measure n_a1Sq1)
- Diagrams.TwoD.Model: ePoints :: Lens' (EnvelopeOpts n_a1Shd) Int
+ Diagrams.TwoD.Model: ePoints :: Lens' (EnvelopeOpts n_a1SnU) Int
- Diagrams.TwoD.Model: oColor :: Lens' (OriginOpts n_a1Sgq) (Colour Double)
+ Diagrams.TwoD.Model: oColor :: Lens' (OriginOpts n_a1Sn7) (Colour Double)
- Diagrams.TwoD.Model: oMinSize :: Lens' (OriginOpts n_a1Sgq) n_a1Sgq
+ Diagrams.TwoD.Model: oMinSize :: Lens' (OriginOpts n_a1Sn7) n_a1Sn7
- Diagrams.TwoD.Model: oScale :: Lens' (OriginOpts n_a1Sgq) n_a1Sgq
+ Diagrams.TwoD.Model: oScale :: Lens' (OriginOpts n_a1Sn7) n_a1Sn7
- Diagrams.TwoD.Model: tColor :: Lens' (TraceOpts n_a1SjJ) (Colour Double)
+ Diagrams.TwoD.Model: tColor :: Lens' (TraceOpts n_a1Sqq) (Colour Double)
- Diagrams.TwoD.Model: tMinSize :: Lens' (TraceOpts n_a1SjJ) n_a1SjJ
+ Diagrams.TwoD.Model: tMinSize :: Lens' (TraceOpts n_a1Sqq) n_a1Sqq
- Diagrams.TwoD.Model: tPoints :: Lens' (TraceOpts n_a1SjJ) Int
+ Diagrams.TwoD.Model: tPoints :: Lens' (TraceOpts n_a1Sqq) Int
- Diagrams.TwoD.Model: tScale :: Lens' (TraceOpts n_a1SjJ) n_a1SjJ
+ Diagrams.TwoD.Model: tScale :: Lens' (TraceOpts n_a1Sqq) n_a1Sqq
- Diagrams.TwoD.Shapes: radiusBL :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD.Shapes: radiusBL :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD.Shapes: radiusBR :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD.Shapes: radiusBR :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD.Shapes: radiusTL :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD.Shapes: radiusTL :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe
- Diagrams.TwoD.Shapes: radiusTR :: Lens' (RoundedRectOpts d_a1kFT) d_a1kFT
+ Diagrams.TwoD.Shapes: radiusTR :: Lens' (RoundedRectOpts d_a1kIe) d_a1kIe

Files

CHANGELOG.md view
@@ -1,4 +1,12 @@-## [v1.3.0.3](https://github.com/diagrams/diagrams-lib/tree/v1.3.0.2) (2015-08-10)+## [v1.3.0.4](https://github.com/diagrams/diagrams-lib/tree/v1.3.0.4) (2015-09-17) ##++**Dependency/version changes**++- Allow `lens-1.13`+- Allow `semigroups-0.17`+- Require `linear-1.20`++## [v1.3.0.3](https://github.com/diagrams/diagrams-lib/tree/v1.3.0.3) (2015-08-10)  **Dependency/version changes** 
diagrams-lib.cabal view
@@ -1,5 +1,5 @@ Name:                diagrams-lib-Version:             1.3.0.3+Version:             1.3.0.4 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@@ -102,7 +102,7 @@   Build-depends:       base >= 4.2 && < 4.9,                        containers >= 0.3 && < 0.6,                        array >= 0.3 && < 0.6,-                       semigroups >= 0.3.4 && < 0.17,+                       semigroups >= 0.3.4 && < 0.18,                        monoid-extras >= 0.3 && < 0.5,                        dual-tree >= 0.2 && < 0.3,                        diagrams-core >= 1.3 && < 1.4,@@ -112,13 +112,13 @@                        data-default-class < 0.1,                        fingertree >= 0.1 && < 0.2,                        intervals >= 0.7 && < 0.8,-                       lens >= 4.6 && < 4.13,+                       lens >= 4.6 && < 4.14,                        tagged >= 0.7,                        optparse-applicative >= 0.11 && < 0.12,                        filepath,                        JuicyPixels >= 3.1.5 && < 3.3,                        hashable >= 1.1 && < 1.3,-                       linear >= 1.11.3 && < 1.20,+                       linear >= 1.20.1 && < 1.21,                        adjunctions >= 4.0 && < 5.0,                        distributive >=0.2.2 && < 1.0,                        process >= 1.1 && < 1.3,
src/Diagrams/Transform/Matrix.hs view
@@ -26,7 +26,6 @@ import           Diagrams.ThreeD.Types import           Diagrams.TwoD.Types -import           Linear.Epsilon import           Linear.Matrix import           Linear.Vector @@ -40,16 +39,16 @@ mkMatHomo t = mkTransformationMat (mkMat t) (transl t)  -- | Make a 2D transformation from a 2x2 transform matrix and a---   translation vector. If the matrix is not invertible, 'Nothing' is---   returned.-fromMat22 :: (Epsilon n, Floating n) => M22 n -> V2 n -> Maybe (T2 n)-fromMat22 m v = flip (fromMatWithInv m) v <$> inv22 m+--   translation vector. Does not check if the matrix is not invertible+--   (in which case the 'T2' will be invalid).+fromMat22 :: Floating n => M22 n -> V2 n -> T2 n+fromMat22 m v = flip (fromMatWithInv m) v $ inv22 m  -- | Make a 3D transformation from a 3x3 transform matrix and a---   translation vector. If the matrix is not invertible, 'Nothing' is---   returned.-fromMat33 :: (Epsilon n, Floating n) => M33 n -> V3 n -> Maybe (T3 n)-fromMat33 m v = flip (fromMatWithInv m) v <$> inv33 m+--   translation vector. Does not check if the matrix is not invertible+--   (in which case the 'T3' will be invalid).+fromMat33 :: Floating n => M33 n -> V3 n -> T3 n+fromMat33 m v = flip (fromMatWithInv m) v $ inv33 m  -- | Build a transform with a maxtrix along with its inverse. fromMatWithInv :: (Additive v, Distributive v, F.Foldable v, Num n)@@ -63,11 +62,12 @@                  v  -- | Prism onto a 2D transformation from a 2x2 transform matrix and---   translation vector.-mat22 :: (Epsilon n, Floating n) => Prism' (M22 n, V2 n) (T2 n)-mat22 = prism' (mkMat &&& transl) (uncurry fromMat22)+--   translation vector. Does not check if the matrix is invertible (in+--   which case the 'T2' will be invalid).+mat22 :: Floating n => Iso' (M22 n, V2 n) (T2 n)+mat22 = iso (uncurry fromMat22) (mkMat &&& transl)  -- | Prism onto a 2D transformation from a 2x2 transform matrix and---   translation vector.-mat33 :: (Epsilon n, Floating n) => Prism' (M33 n, V3 n) (T3 n)-mat33 = prism' (mkMat &&& transl) (uncurry fromMat33)+--   translation vector (in which case the 'T3' will be invalid).+mat33 :: Floating n => Iso' (M33 n, V3 n) (T3 n)+mat33 = iso (uncurry fromMat33) (mkMat &&& transl)
src/Diagrams/TwoD/Adjust.hs view
@@ -54,7 +54,6 @@       # lineJoin def       # lineMiterLimitA def - -- | Adjust the size and position of a 2D diagram to fit within the --   requested size. The first argument is a lens into the output --   size contained in the rendering options.  Returns an updated@@ -62,10 +61,13 @@ --   inverse of which can be used, say, to translate output/device --   coordinates back into local diagram coordinates), and the --   modified diagram itself.-adjustSize2D :: (TypeableFloat n, Monoid' m)-                => Lens' (Options b V2 n) (SizeSpec V2 n)-                -> b -> Options b V2 n -> QDiagram b V2 n m-                -> (Options b V2 n, Transformation V2 n, QDiagram b V2 n m)+adjustSize2D+  :: (TypeableFloat n, Monoid' m)+  => Lens' (Options b V2 n) (SizeSpec V2 n)+  -> b+  -> Options b V2 n+  -> QDiagram b V2 n m+  -> (Options b V2 n, Transformation V2 n, QDiagram b V2 n m) adjustSize2D szL _ opts d = (set szL spec opts, t, d # transform t)   where     spec    = dims sz