diagrams-core v0.6 Release Notes

Release Date: 2012-12-12 // over 11 years ago
  • Full Changelog

    • ๐Ÿ†• New features

      • Proper support for subdiagrams: previous versions of diagrams-core had a mechanism for associating names with a pair of a location and an envelope. Now, names are associated with actual subdiagrams (including their location and envelope, along with all the other information stored by a diagram).

        See Diagrams.Core.Types.

      • Traces: in addition to an envelope, each diagram now stores a "trace", which is like an embedded raytracer: given any ray (represented by a base point and a vector), the trace computes the closest point of intersection with the diagram along the ray. This is useful for determining points on the boundary of a diagram, e.g. when drawing arrows between diagrams.

        See Diagrams.Core.Trace.

    • API changes

      • The modules have all been renamed to be more consistent with the module naming scheme in the rest of the diagrams universe. In particular:

        Graphics.Rendering.Diagrams --> Diagrams.Core Grahpics.Rendering.Diagrams.Core --> Diagrams.Core.Types Graphics.Rendering.Diagrams.* --> Diagrams.Core.*

      • Graphics.Rendering.Diagrams.UDTree has been split out into a separate dual-tree package (which has also been substantially rewritten).

      • Graphics.Rendering.Diagrams.{Monoids,MList} have been split out into a separate monoid-extras package.

      • The names function now returns a list of names and their associated locations, instead of the associated subdiagrams. In particular the output is suitable to be rendered to a String using show.

      • The new subMap function fills a similar role that names used to play, returning the entire mapping from names to subdiagrams.

      • New functions envelope[VP]May

        envelopeV and envelopeP return the zero vector and origin, respectively, when called on an empty envelope. However, sometimes it's useful to actually know whether the envelope was empty or not (the zero vector and the origin are legitimate outputs from non-empty envelopes). The new functions have their return type wrapped in Maybe for this purpose.

      • New functions envelopeS and envelopeSMay

        Like envelope[VP](May), but returning a scalar multiple of the input vector.

      • The Graphics.Rendering.Diagrams.Util module has been removed, along with the withLength function. Calls to withLength can be replaced using

        withLength s v = s *^ normalized v

      • Add needed constraints (InnerSpace v, OrderedField (Scalar v), Monoid' m) to the type of the renderDias method in the MultiBackend class.

      • Generalized Transformable instances for pairs and tuples

        Previously, the components of the tuples were required to have the same type; but everything still works as long as they all share the same vector space. This is actually useful in practice: say, if we wanted to pair a diagram with a path and then apply the same transformation to both.

    • ๐Ÿ‘Œ Improvements

      • More efficient implementation of diameter
    • Dependency/version changes

      • Tested with GHC 7.6.1
      • allow base-4.6
      • allow containers-0.5.*
      • allow MemoTrie-0.6.1
    • ๐Ÿ› Bug fixes

      • juxtaposeDefault now correctly handles empty envelopes (#37)

        juxtaposeDefault is now the identity on the second object if either one has an empty envelope. In particular this means that mempty is now an identity element for beside and friends.

    Implemented enhancements:

    • Turn R2 into D2 (Generalize R2 to any numeric type) #20

    • Terminology: rename "bounding function" -> "envelope"; "boundary function" -> "boundary" #16

    • ๐Ÿ”จ Refactor: rename AnnDiagram to QDiagram #15

    • Combine (point, bounds) pairs stored in NameMap into a single "located bounding function" data structure #14

    • ๐Ÿ— Remember more structure when building diagrams #12

    • ๐Ÿ— Diagram-building service library + executable #7

    ๐Ÿ›  Fixed bugs:

    • setBounds is incorrect -- throws away bounds of subsequent diagrams too #13

    • โœ… Start developing test suites #10

    • Freezing does not appear to work with the SVG backend #9

    • Silent failure on other image types than .png #6

    • ๐Ÿ“ฆ Tutorial contains links to old version of package #5

    • space is not left for empty diagram when using e.g. hcat' with {sep = ... } #3

    • โœ… Ellipse rotated incorrectly in test file with ellipse next to a square #2

    Closed issues:

    • ๐Ÿšš Rename core modules to remove Graphics.Rendering prefix. #28

    • ๐Ÿ‘Œ Improve haddock documentation #11

    • ๐Ÿ‘Œ Improve description of Envelope in Haddock documentation #1

    ๐Ÿ”€ Merged pull requests:

    • โž• Add envelopeS / envelopeSMay for querying scalar displacements from envelopes #31 (mgsloan)

    • ๐Ÿ‘ Better definition for diameter #30 (mgsloan)

    • โž• Added needed constraints for MultiBackend. #29 (fryguybob)

    • ๐Ÿ“‡ Rename names to subMap, and add new function names #26 (byorgey)

    • ๐Ÿ›  Fixes to work with rewritten dual-tree #25 (byorgey)

    • ๐Ÿ›  Fix for juxtaposeDefault to correctly handle empty envelopes #24 (byorgey)

    • ๐Ÿ›  dep bumps - fixes for GHC7.6 #23 (mgsloan)