| CARVIEW |
diagrams 1.4: 27 October, 2016
New features
New
eachNametraversal, for traversing over parts of aNamethat match a given typeMore documentation explaining
HasOriginandTransformableinstances forEnvelope
Dependency/version changes
- Allow
lens-4.15 - Many other upper bounds bumped; see minor release changelogs below.
- Allow
New instances
Transformableinstance forMeasuredA bunch more instances for
Query(Distributive,Representable,Profunctor,Coseive,Closed,Costrong,Corepresentable)
API changes
Move some
Query-related functions todiagrams-lib(sample,value,resetValue,clearValue)Remove some redundant constraints in type signatures (should not actually affect API)
New features
New
mkText'function, which allows making a text primitive without recommending a fill colour or font size so users can recommend their own (e.g. using therecommendFontSizefunction).New functions
reflectXYandreflectionXYNew
composeAlignedcombinator for doing composition under an alignment while leaving the local origin unaffected.Add
_LocLoopand_LocLineprismsNew
bsplinefunction for creating uniform cubic B-splines- New 3D features:
- New
Skinnedclass - Improved handling of 3D primitives
- CSG
- New
New standard attributes for separate fill and stroke opacity (see #248).
New
HasQueryclass for things which can be spatially queried for values from some monoid.New function
inquirefor testing whether a given point is inside a diagram.New font weights:
bolder,lighter,thinWeight,ultraLight,light,mediumWeight,heavy,semiBold,ultraBold. Note that currently only the SVG backend deals with the new weights.Export
GetSegmentCodomainand update documentationImproved performance of 2D rotations
New instances
Alignableinstance forLocatedToPathinstances for lines and loopsSerializeinstances forTrail,Path,Located,SegTree,SegmentGenericinstances forPath,LocatedActioninstance forAngle: angles act by rotation.
API changes
snugBL,snugBR,snugTRandsnugBRare deprecated. These functions were unintuitive, ad-hoc, and not particularly useful, especially since e.g.snugLandsnugBdo not commute. You can use something likesnugB . snugLdirectly, or usesnugwith a direction vector. See #250 for more details.
Dependency/version changes
- upgrade
fsnotifyand drop dependency on deprecatedsystem-filepath - Allow
lens-4.15 - Many other bumped upper bounds, see release notes for minor releases below
- upgrade
Bug fixes
- Performance improvement: port
ReadPathto useattoparsec - New
loadFont'function, to read font data from anXmlSource - Export
Kern(..)fromGraphics.SVGFonts.ReadFont - New
Serializeinstances forFontDataandKern
New features
New modules:
Diagrams.TwoD.Path.LSystem: module for generating L-system fractalsDiagrams.TwoD.Path.Boolean: boolean operations on pathsDiagrams.Color.XKCD: Common names for the 949 most common RGB monitor colors, as determined by the xkcd color name survey.Diagrams.TwoD.Layout.Constrained: 2D layout via relative constraint specificationsDiagrams.Anchors: layout via specified anchor pointsDiagrams.TwoD.Path.Follow: monoid for trails which matches tangent vectors at endpoints
Diagrams.TwoD.Path.IteratedSubsetis greatly expanded, with more tools, examples, and documentationNew radial layout algorithm for rose trees,
radialLayoutfunction inDiagrams.TwoD.Layout.TreeCode in
Diagrams.TwoD.Apolloniancleaned up and generalized
API changes
Diagrams.TwoD.Path.Turtle: pen width is now aMeasure ninstead ofn
No changes.
No changes.
No changes.
New features
Can now output PDFs.
Font files are now embedded with
file-embed.Various functions for better GIF support.
Support for group opacity.
New instances
ToResultinstance for animated GIFs.
- Handle wider range of font weight specifications
- Changes for
svg-builder - Deprecate
svgIdandsvgClass
No changes.
No changes.
- Require
haskell-src-exts-1.18andhaskell-src-exts-simple diagrams-builder-pgf: add catch-all case for file extension- Better defaults (#29):
- default extension will be chosen based on backend
inputoption automatically selected when usingpgfbackenddiagramsis now default output directory
- Modules can now be imported qualified
- Build with
ghc-8.0 - Improved error message when
setup-configcan’t be read - Replace
lucid-svgwithsvg-builder
diagrams 1.3: 19 April, 2015
- add derived instances where possible:
Typeable,Data,Read,Eq,Ord,Functor,Foldable,Traversable - allow
base-4.8
- Allow
base-4.8 - Allow
monoid-extras-0.4
- switch from
vector-spacetolinear - allow
lens-4.9 - allow
base-4.8
New features
Update for ghc-7.10.
Switch from
vector-spacetolinearfor linear algebra.OpacityGroupannotation for setting the opacity of diagrams as a group. Opacity groups can be applied with theopacityGrouporgroupOpacityfunctions.Added
atAttr,atMAttrandatTAttrlenses onto the attributes of styles.InSpaceandSameSpacesynonyms.sizefunction for computing the range of an enveloped object in the basis vectors.“Grouping” for transparent things #21
Dependency/version changes
- Allow
base-4.8 - Allow
lens-4.9
- Allow
New instances
Showinstances forAttributeandStyle.Each,IxedandAtinstances for andStyle.
API changes
Measurehas a new internal representation.Local,Global,Normalized, andOutputhave been renamed tolocal,global,normalizedandoutputrespectivly.Measureis now defined inDiagrams.Core.Measure.GTAttributehas been removed.MAttributenow holds measured attributes and no longer requires aDatainstance.Vis now a* -> *kind type family.New type family
Nfor the number type of an object,Scalartype family no longer exists.(|>)has moved to(.>>)to make room for lens’s snoc operator.Style’s internal representation now uses a hashmap of theTypeRep.
Merged pull requests:
Bump lens upper version bounds #74 (RyanGlScott)
Add Diagram B synonym for Diagram b v n #73 (jeffreyrosenbluth)
Bump linear upper version bounds #75 (RyanGlScott)
Change Measure back to not using Scalar v #65 (Mathnerd314)
Remove gratuitous Data constraints #69 (Mathnerd314)
Initial release
New features
Native image type that backends can specify.
Affine maps between spaces for path-like objects. A new
Diagrams.ThreeD.Projectionshas some helper functions for orthographic and perspective projections.Intersections for path-like objects using Bézier clipping.
Helper functions in
Diagrams.Matrixfor converting between transforms and matrices.New
Diagramsmodule that only exports functions defined in diagrams.New
Directiontype.Directionis a vector that’s forgot it’s magnitude. Some functions have changed their type fromR2toDirection V2 nto make it clear that magnitude has no effect.Use the
fsnotifypackage for command line looping. Command line looping now works on Windows.groupOpacityfunction added for lowering the opacity of a diagram as a whole.New
ToPathclass for converting path-like things to aPath.
New instances
Eachinstances forBoundingBox,Offset,Segment,FixedSegmentandPath.Reversinginstances forOffset,Segment,FixedSegment,TrailandPath.AsEmptyinstances forBoundingBox,TrailandPath.ConsandSnocinstances forPathandLine.New
Showinstances forAngle,Segment,SomeColor,Trail'andat.Tangentinstance for(FixedSegment v n).Ordinstances forLineMiterLimit,LineJoinandLineCap.
New helper functions
_Lineand_Loopprisms.Style lenses:
_fontSize,_lineWidth,_fillTexture,_lineTexture,_opacity,_font,_lineCap,_lineJoin_dashing._SomeColoriso and_ACprism onto anAlphaColour.atPointsfunction to zip points with diagrams.
API changes
Diagramtype synonym now only takes a backend token:Diagram BTypes that previously had a
vvariable now havevandn.Control.LensandData.Default.Classare now exported from fromDiagrams.PreludeMeasurehas a new internal representation.Local,Global,Normalized, andOutputhave been renamed tolocal,global,normalizedandoutputrespectivly.SizeSpec2Dhas moved toSizeSpec v ninDiagrams.SizeSpec.Dims, Height, Width andAbsolutehave moved todims2D,mkHeight,mkWidthandabsolute` respectively.Colorinstances forColourandAlphaColourare limited toDoublefor better type inference.underhas been renamed tounderT. Newtransformed,translated,movedTo,movedFromandrotatedisomorphisms to use with lens’sunderfunction.strokeis now polymorphic. UsestrokePathorstrokePto get oldstrokebehaviour.angleBetweennow works for any vector space, which means the angle is always positive. The old behaviour can be retrieved fromsignedAngleBetweenarcnow takes a startingDirectionand a sweepAngle.arcCWandarcCCWtake a start and finishDirection.
Dependency/version changes
- use
linearinstead ofvector-space
- use
Closed issues:
Merged pull requests:
- Split functionality out of
ReadFont, intoFonts(built-in fonts) andText(rendering text to Diagrams). textSVG'andtextSVG_now have the text as a separate argument, distinct fromTextOptions.ReadFontdoes not useunsafePerformIOany more.unsafePerformIOis now only used to load built-in fonts.
New features
- Generalized
Diagrams.TwoD.IteratedSubsetand added more examples. - New module
Diagrams.TwoD.Layout.Grid.
- Generalized
API changes
Diagrams.Lenshas had a lot of its lenses removed because they’re either invalid lenses or are now in diagrams-lib.
Dependency/version changes
- Allow
diagrams-core-1.3 - Allow
diarams-lib-1.3 - use
linearinstead ofvector-space
- Allow
Fixed bugs:
Dependency/version changes
- allow
lens-4.9
- allow
Merged pull requests:
Closed issues:
- Updates for diagrams 1.3:
- allow
base-4.8 - require
diagrams-lib-1.3 - require
diagrams-cairo-1.3
- Require
diagrams-core-1.3anddiagrams-lib-1.3 - allow
lens-4.9 - Allow
semigroups-0.16
Merged pull requests:
Twinside master #25 (jeffreyrosenbluth)
Preparing for float text size and PointSize new type in FontyFruity. #24 (Twinside)
Bump lens upper version bounds #14 (RyanGlScott)
Diagram B #12 (jeffreyrosenbluth)
call defaultAnimMainRender with ASetter for loop options #8 (bergey)
New features
User settable ID prefixes
Support opacity group
Fix clipping bug (Issue #70)
Internal Changes
Switch rendering engine from
blaze-svgtolucid-svgUse
fsnotifyfor loopingAdd defs tags for clips and gradients
Bug Fixes
Implemented enhancements
- Put
clip path,gradients, etc in defs tag. #73
- Put
Merged pull requests:
Allow user to set ID prefixes #71 (mightybyte)
Lucid #69 (jeffreyrosenbluth)
Initial (official) release
- Update to
diagrams-lib-1.3. - Add
diagrams-rasterificsupport. - Add support for
DIAGRAMS_SANDBOXenvironment variable. - Allow
exceptions-0.8 - Fix
diagrams-latexdirectory creation on Windows
- Allow
diagrams-builder-0.7,diagrams-lib-1.3, anddiagrams-svg-1.3
diagrams 1.2: 2 June 2014
New features
New function
matrixHomRepto convert a transformation to a homogeneous matrix representation.New function
dropTranslto drop the translation component from a transformation.A mini-DSL for Measures.
New
extentfunction, used indiameter.New
dimensionfunction to return the dimension of a vector space.New
_relativeiso between points and vectors.avgScalefunction (for computing the average scaling factor of a transformation) has been moved fromdiagrams-libtodiagrams-coreand generalized to work over any vector space.
Dependency/version changes
- Allow
semigroups-0.14 - Allow
lens-4.1
- Allow
API changes
Major refactoring which removes
freeze(and henceSplittransforms, etc.) and adds units ofMeasure.Refactoring and simplification of the
Backendclass.Remove
Multibackend.Remove
nullPrim,IsPrimand simplifyRPrimso that it does not carry a transformation.Update
adjustDiato return a transformation, not just a scale factor. AddrenderDiaTwhich returns a transformation (for use by end users, e.g. to convert output coordinates back into local coordinates).
New features
Several attributes (such as line width, dashing size, arrowhead size, and font size) that formerly had a value of type
Doublenow have the more general typeMeasure R2. This allows the attributes to be specified relative to one of four measurement frames:Local,Global,Normalized, andOutput.New DSL for specifying measurements.
New synonyms for specifying measurements, e.g.
thin,thick, andmedium,large.Support for radial and linear gradients for fills and strokes.
New
DImagetype that supports both embedded and external images in Backends that support them.New
lengthsTraversal for settingheadLengthandtailLengthsimultaneously.FrustrumandBoxshapes added toDiagrams.ThreeD.Shapes.New function
quartFormto find roots of quartic polynomials.New Lenses for polar coordinates.
New trig functions,
sinA,atanA, etc. which takeAngleas input or output.
New instances
Transformableinstances forLineWidth,Dashing,LineTexture, andFillTexture.
API changes
FillColorandLineColorattributes have been replaced with the more generalFillTextureandLineTexture. Use thesolidfunction to convert a color to a texture.The size of arrow heads and tails is now specified in terms of length instead of the radius of their circumcircle.
Gaps at the ends of arrows are now specified using
Measure R2.The
gaptraversal has been replaced bygapsfor consistency in naming, thoughgapis still provided for backwards compatibility.fontSizenow takes a value of typeMeasure R2.Get rid of (bitrotted)
Showbackend.Functions in
TwoD.Adjustnow return the adjustment transformation itself in addition to the resizedDiagramandOptionsrecord; this can be used, e.g. to convert screen coordinates back into diagram coordinates.Export
pathLocSegments.The
avgScalefunction has been moved toDiagrams.Core.The
Angledefinition and related functions (e.g.angleBetween) have moved to a separate module,Diagrams.Angle.A separate
Diagrams.TwoD.Attributesmodule now contains most of the attributes that require 2D transformation instances.The
splitColorFillsfunction has been replaced bysplitTextureFills.
Dependency/version changes
- Allow
semigroups-0.15 - Allow
optparse-applicative-0.9.0
- Allow
New features
Much improved text support using the
pangolibrary instead of cairo’s “toy” text API.Support for linear and radial gradients on strokes and fills.
Dependency/version changes
- Allow
opt-parse-applicative-0.9 - Allow
lens-4.2 - Allow
mtl-2.2 - Allow
transformers-0.4
- Allow
- Changes to reflect
Measurerefactoring. - Allow
diagrams-core-1.2anddiagrams-lib-1.2 - Allow
semigroups-0.15
New features
Support for radial and linear gradients.
Support for embedded images in
.pngformat.
New instances
Renderableinstances forDImage Embedded.
API changes
Updates to work with
Measureunits.Substantial refactoring of
Backendinstance to support changes inDiagrams.Core.
Initial release
- Module parse error messages now include the error location (thanks to Yiding Jia)
diagrams 1.1: 8 March 2014
diagrams-core-1.1
New features
- New
basisfunction - New
determinantfunction for computing the determinant of aTransformation - Add
Typeableconstraint onPrims, making it possible to extract things back out of aPrimwrapper usingcast - Raw
Traces now return a sorted list of intersections, instead of only the smallest. This is used to implement a new family of functionsrayTraceV,rayTraceP,maxRayTraceV,maxRayTraceP, which work similarly to the parallel versions withoutRay, but return the first intersection in the positive direction from the given point, rather than the smallest in absolute terms. - New
Annotationtype and correspondingapplyAnnotationfunction, for attaching uninterpreted annotations at specific points in a diagram tree. Currently this is used for hyperlinks; more annotation types will be added in the future.
- New
Dependency/version changes
- Require
lens-4.0 - Allow
vector-space-points-0.2
- Require
Bug fixes
- Looking up a subdiagram by name now results in a diagram which still has that name (#43)
diagrams-lib-1.1
New features
Support for
Deformations, arbitrary (non-affine) transformations on objects such as points, paths, and located trails (though not on diagrams).New functions
clipTo, which clips a diagram’s envelope and trace along with its visual representation, andclipped, which clips the diagram’s visual representation but replaces its envelope and trace with those of the clipping path.New
arrowVfunction, for creating an arrow with the direction and magnitude of a given vector.gaptraversal, for setting the head and tail gaps of an arrow simultaneously.Generalized types for
centerXYandsnugXY, based on newbasisfunction from `diagrams-coreNew 3D
Transforms, alignment, and 3D-specificPrelude.New
framefunction similar topad, but increases the envelope of a diagram by an amount specified in local units in every direction irrespective of the local origin.New
splitFillsfunction for pushing fill attributes down to subtrees containing only loops (mostly of relevance only to backend implementors).
New instances
Typeableinstances for all data types that are used as diagram primitives.Sectionableinstance forFixedSegment.
API changes
Angleis now a type, rather than a class. It uses a single internal representation for angles, and lensesturn,rad,anddegare supplied for constructing (using@@) and viewing (using^.)Angles in various units. In addition, theNuminstance forAnglehas been removed, eliminating a class of errors where a bare number is interpreted in units other than what you expect.Removed
Numinstance for angles.
Dependency/version changes
- Require
lens >= 4.0. - Allow
array-0.5. - Allow
hashable-1.1. - Remove
NumInstancesdependency.
- Require
Bug fixes
- Exclude joins in offsets on close segments (#160).
- Exclude extra segment when joining loops in offset (#155).
Performance improvements
colorToSRGBAfunction now avoids expensive matrix operations, offering dramatic speedups in rendering diagrams with many color attributes.
diagrams-cairo-1.1
New features
- It is now possible to directly output animated GIFs, using the
gifMainfunction.
- It is now possible to directly output animated GIFs, using the
Dependency/version changes
- allow
diagrams-core-1.1anddiagrams-lib-1.1 - allow
unix-2.7 - allow
vector-0.10
- allow
Bug fixes
- Don’t explicitly draw final segment of a loop if it is straight (#38)
diagrams-gtk-1.0.1
- Use double buffering.
diagrams-postscript-1.0.2
New features
Experimental support for raw CMYK colors.
Dependency/version changes
Allow
diagrams-core-1.1anddiagrams-lib-1.1.
diagrams-svg-1.0.2
New features
- Support for including hyperlinks.
Dependency/version changes
- Allow
diagrams-core-1.1anddiagrams-lib-1.1 - Allow
lens-4.0
- Allow
Bug fixes
Use
splitFillsto properly render certain diagrams with mixed lines and filled loops. Previously, in certain situations loops that should have been filled were not. (#43)Don’t emit last segment of a loop if it is linear.
See diagrams-cairo#38. This wasn’t actually causing any observable problems in the SVG backend output, but this seems a better/more robust way to do things in any case.
diagrams-builder 0.4.2
- Build expressions of type
Diagram b vorIO (Diagram b v). This means that expressions interpreted bydiagrams-builder(via e.g.diagrams-haddockorBlogLiterately-diagrams) can do someIOto build a diagram.
diagrams 1.0: 25 November 2013
dual-tree 0.2
- Expose internal d-annotations via
foldDUAL.
diagrams-core 1.0
New features
Delayed subtrees: instead of a primitive, one can now also have a delayed subtree at a leaf, containing a continuation which generates a
QDiagramwhen given the accumulated d-annotation at that point in the tree. Useful for things which need to know the final transformation applied to them before deciding what diagram to generate. The prototypical use case is arrows: see https://github.com/diagrams/diagrams-lib/issues/112 . However, this may be useful for other things as well: for example, diagrams which scale normally until hitting some maximum or minimum size, at which point they refuse to scale any further (or more generally diagrams which scale as some non-linear function of the transformation applied to them).The only downside is that the u-annotation must be fixed ahead of time—doing otherwise requires a more general solution for constraint solving.
New function
lookupNamefor doing a simple lookup of a named subdiagramNew module
Diagrams.Core.Compile, containing a framework for compilingQDiagramsinto a simpler tree typeRTree, which may be used by backends for rendering.
New instances
Qualifiableinstances for(,),(,,),[],Set,Map k, and(->) e.(->) einstance forJuxtaposable(thanks to Carlos Scheidegger)
API changes
Export
pointDiagramfunction, which creates an otherwise empty diagram with a point (not empty) envelope- A bunch of stuff now uses machinery from the
lenslibrary.envelope,trace, andsubMapare nowLens'esWrappedinstances forTrace,TransInv,QDiagram,SubMap,Envelope,Style,Query, andName(replacesNewtypeinstances)Isos forQuery,Envelope,QDiagram,SubMap,TransInv
diagrams-lib 1.0
New features
- New modules
Diagrams.TwoD.ArrowandDiagrams.TwoD.Arrowheadsfor creating arrows. - New module
Diagrams.Backend.CmdLine, providing a flexible framework for creating command-line-driven diagram rendering executables. - New functions in
Diagrams.Offset:offsetTrailandoffsetPathfor one-sided offsets of trails and paths;expandTrailandexpandPathfor “stroking” trails and paths, computing a path whose fill corresponds to the stroke of the given trail or path. - New module
Diagrams.Tangentfor computing tangent and normal vectors of segments, trails, and paths. - New functions in
Diagrams.Alignto allow diagrams to be aligned byTracecalledsnug,snugByandsnugCenterand the ability to define other boundary functions for alignment. FunctionssnugL,snugR, etc. are included inTwoD.Align. - Lenses from
Control.Lensare now used consistently for record fields throughout the library. - New function
angleRatiofor calculating the ratio between two angles. - Restricted identity functions
asTurn,asRad, andasDegfor resolving type ambiguity - New miter limit attribute.
- New function
annularWedgeinTwoD.Arc - New
avgScaleutility inTwoD.Transform, for backends which cannot fully implement freezing of line width - New function
heptagon, a vast improvement over the linguistic frankensteinseptagon. - New function
lookupName(re-exported fromdiagrams-core) for simple lookups of named subdiagrams - New function
angleBetweento calculate the angle between two vectors. - New function
arcBetweento draw an arc between two given points. - A bunch of new modules containing types, primitives and utilities for constructing 3D diagrams:
Diagrams.ThreeD.Align,.Camera,.Light,.Shapes,.Transform,.Types, and.Vector. This is still a “feature preview” (in particular, appropriate 3D backends are still under construction).
- New modules
New instances
AdditiveGroupandVectorSpaceinstances forTurn,Rad,DegAlignableinstance for(->) eDefaultinstances forFillRule,FillRuleA,LineJoin,LineCap,FillColorShowinstances forFillRule,FillRuleA
API changes
eno longer exported fromDiagrams.Prelude.Diagrams.BoundingBoxis no longer exported fromDiagrams.Prelude.- Re-export
Diagrams.Core.pointDiagramfromDiagrams.Prelude. - Added
fromAlphaColourmethod toColorclass. &renamed to^&- Stop re-exporting
tan,over, andbothfromData.Colour. - New coordinate lenses
_x,_y, and_zforR2,P2,R3,P3 - Export
fullTurnfromDiagrams.Prelude. Codomain (Located a)is nowPoint (Codomain a)instead ofLocated (Codomain a).- Export
domainBoundsfromDiagrams.Parametric. - Adjusting functionality moved from
Diagrams.Parametricto its own module,Diagrams.Parametric.Adjust. - Rename
strokeT(and primed variant) tostrokeTrail; renamestrokeLocTtostrokeLocTrail. ScaleInvis now in its own module,Diagrams.TwoD.Transform.ScaleInv.- Re-export
Imagetype (but not constructor) fromDiagrams.TwoD - Removed
FloatingandRealFloatinstances forTurnandDeg offsetSegmentnow returns aLocatedinstead of a tuple.- Removed
NumandFractionalinstances forR2.
Dependency/version changes
- Remove
newtypedependency - New dependencies on
lens,tagged,optparse-applicative,filepath,safe,vector-space-points,MemoTrie - Depend on
intervals >= 0.3 && < 0.5.
- Remove
Bug fixes
- Depend on
intervals 0.3, which allows diagrams to build on Windows, by evading a GHCi linker bug which affects the FFI use in previous versions of intervals (diagrams-contrib#14) - Use point envelope at the origin for text objects instead of an empty envelope (#115, #116).
- Adjusting the end of a trail now works correctly (#95).
- Only look for miter join on corners in
Diagrams.TwoD.Offset(#118). wedgefromDiagrams.TwoD.Arcis now a loop (#99).
- Depend on
Performance improvements
R2is now strict andUNPACKed- Add strictness to
Offset,Segment,OffsetEnvelope, andSizeSpec2D. - Make
getEnvelopecalculation forSegmentmore efficient by floating divisions out of the inner calculation. - Use a specialized
HasTrieinstance forR2.
diagrams-svg 1.0
- Re-implement via new backend
RTreeinterface, leading to smaller output files. - Use new command-line interface from
diagrams-lib. - Export
Bas an alias forSVGtoken
diagrams-cairo 1.0
- Re-implement via new backend
RTreeinterface. - Use new command-line interface from
diagrams-lib. - Export
Bas an alias forCairotoken.
diagrams-postscript 1.0
- Add support for miter limit attribute.
- Use new command-line interface from
diagrams-lib. - Export
Bas an alias forPostscripttoken.
diagrams-gtk 1.0
- Updated to work with diagrams-cairo-1.0.
diagrams-contrib 1.0
New features
- New module
Diagrams.TwoD.Sunburst, for drawing sunburst charts. - New module
Diagrams.TwoD.Path.Metafont, for specifying trails/paths using an API inspired by Metafont. LikecubicSplinebut gives you control over things like the tension/curvature or the tangent at a given point. - New module
Diagrams.TwoD.Path.Calligraphicfor making simple “calligraphic” strokes. - New module
Diagrams.Lenswith lenses for working with diagrams.
- New module
Bug fixes
Diagrams.TwoD.Factorization.primeLayouthas been rewritten to avoid iterated transformations, giving a significant performance boost.
monoid-extras 0.3.2.3
SVGFonts 1.4.0.1
diagrams-builder 0.4.1
diagrams-haddock 0.2.1.3
diagrams 0.7: 9 August 2013
diagrams-core 0.7
New features
new function
onBasis, to extract the matrix equivalent of aTransformationSubMaps are nowDeletablenew function
localizefor hiding/deleting names from scopenew
IsPrimclass, containingtransformWithFreezefunction. This is primarily intended to support scale-invariant primitives (e.g. arrowheads) but may be useful for other stuff as well. The default implementation ofrenderDianow usestransformWithFreeze.optimized
Transformableinstance forTransInv
New instances
Eq,Ord,Enveloped,Traced, andQualifiableinstances forTransInvTransformableinstance for functions, which acts by conjugation
API changes
namedandnamePointhave moved to thediagrams-libpackage.
Dependency/version changes
- allow
base-4.7 - upgrade to
monoid-extras-0.3 - allow
semigroups-0.9
- allow
Bug fixes
- the
diameterandradiusfunctions now work correctly.
- the
active 0.1.0.6
- allow
semigroupoids-3.1 - allow
base-4.7 - allow
QuickCheck-2.6 - allow
semigroups-0.9
diagrams-lib 0.7
New features
New module
Diagrams.TwoD.Curvature, for computing the curvature of 2D segments at any given point.New module
Diagrams.Offset, containing anoffsetSegmentfunction that builds a trail a fixed distance from the original segment. This is a precursor to planned functionsoffsetTrailandoffsetPath.New function
Diagrams.TwoD.Transform.onBasis, for extracting a matrix representation of a 2D transformationNew functions
extrudeEnvelopeandintrudeEnvelope, for extending or shrinking an envelope only in a certain direction.Generalize the
Colorclass to absolute colors. This addresses concerns raised in issue #66 by letting the backend choose which color space to renderColorinstances to. Functions are provided for backwards compatibility with the old semantics.New function
scaleInvPrimfor creating a diagram from a single scale-invariant primitive.New module
Diagrams.Parametric, containing a collection of classes abstracting over “parametric” things:Parametric,DomainBounds,EndValues,Sectionable, andHasArcLength, with instances for segments, trails, and related things.- A big refactoring of segments and trails:
- Segments can now be either “closed” or “open”.
- There are now two types of trails: “lines” (which travel from point A to point B) or “loops” (closed curves which end where they started).
Trailis now a wrapper type which can contain both loops and lines. - There is a new
Locatedwrapper type for adding locations to translation-invariant things.Paths now consist of a collection ofLocated Trails. - The
PathLikeclass is now renamed toTrailLike; thetrailLikefunction takes aLocated Trailas input.
New convenience functions
boundaryFromandboundaryFromMay, for computing boundaries of subdiagrams.Re-export from
diagrams-liba lot of things defined indiagrams-core, to make them easier for users to find. Several new modules have been created as a result:Diagrams.Query,Diagrams.Envelope,Diagrams.Trace, andDiagrams.Names.Export the
centroidfunction fromDiagrams.Prelude.triangleis now a synonym foreqTriangle.
New instances
IsPriminstances forPath,Ellipsoid,Image,Text, andScaleInvEq,Ord, andShowinstances forSizeSpec2D
API changes
CircleFrachas been renamedTurn(thoughCircleFracis retained as a deprecated synonym).Diagrams.Coordinatesis no longer exported fromDiagrams.Prelude. This is for compatibility withlens, as(&)is a rather important lens operator and clashes withDiagrams.Coordinates. Users who want theCoordinatesstuff can importDiagrams.Coordinatesexplicitly.
Dependency/version changes
- allow
base-4.7 - allow
semigroups-0.9 - allow
NumInstances-1.3 - upgrade to
monoid-extras-0.3 - depend on
data-default-classinstead ofdata-default - Tested with GHC 7.7.
- allow
Bug fixes
Quadratic solver is now more numerically stable, getting rid of some incorrect behavior of
juxtapose(#46)Added a special case that was a not handled properly by the quadratic solver, resulting in bogus envelopes in certain cases (#88).
Import only
Data.NumInstances.Tupleinstead ofData.NumInstances. Previously,Diagrams.PreludeexportedEq,Show, andNuminstances for functions and tuples; now it only exports tuple instances. Users wishing to useDiagrams.CubicSplinewith a vector space built over functions (!?) can importData.NumInstances.Functionthemselves. (#48)Do scaling on a
Pathbefore constructing aTrailLikeinrect(#43)
diagrams-contrib 0.7
New features
New module
Diagrams.Color.HSVwith anhsvBlendfunction for blending colors in HSV space.Diagrams logo code is now in
Diagrams.Example.Logo.New symmetric layout algorithm for binary trees in
Diagrams.TwoD.Layout.Tree.New
Diagrams.TwoD.Path.IteratedSubsetmodule, for constructing paths using an “iterated subset” algorithm (repeatedly replacing segments with a given path).New
Diagrams.TwoD.Layout.CirclePackingmodule for circle-packing layoutNew
Diagrams.TwoD.Factorizationmodule, for creating “factorization diagrams” as seen at https://mathlesstraveled.com/2012/11/05/more-factorization-diagrams/ and on the cover of Hacker Monthly (https://mathlesstraveled.com/2012/10/05/factorization-diagrams/).Diagrams.TwoD.Path.Turtle: generalizerunTurtlefunction, and add new functionsdrawTurtleandsketchTurtle.drawTurtleresults in a diagram (like the oldrunTurtle), andsketchTurtleyields a path (ignoring pen style commands).
Dependency/version changes
- Require
lens-3.8 - allow
QuickCheck-2.6
- Require
Bug fixes
- Fix a bug in
Diagrams.TwoD.Path.Turtlewhich sometimes caused it to output a doubled path (#13).
- Fix a bug in
Documentation
- Added lots of example images using
diagrams-haddock
- Added lots of example images using
diagrams-svg 0.7
New features
- New
renderToSVGconvenience function - Vastly improved Haddock documentation
- New
New instances
Showinstance forOptions SVG R2
Dependency/version changes
- allow
base-4.7andunix-2.7 - Upgrade to
monoid-extras-0.3
- allow
diagrams-postscript 0.7
First release as an officially supported diagrams backend, generating Postscript via native Haskell. Supports all features except transparency.
diagrams-cairo 0.7
New features
- New
renderCairofunction for more convenient use of the cairo backend. - Lots of Haddock documentation improvements.
- New
New instances
Showinstance forOptions Cairo R2.
diagrams-gtk 0.6.0.1
The diagrams-gtk package continues to work with no changes; 0.6.0.1 has been released simply to allow the dependency versions base-4.7, diagrams-lib-0.7, and diagrams-cairo-0.7.
diagrams-builder 0.4
New features
Add
hsenvcompatibility.- Big improvements in the way rebuilding is handled:
- Strip comments before deciding whether to rebuild, so changing only comments does not trigger a rebuild
- Take local imports into account: if a diagram has an import which corresponds to a local file, rebuild if that file has changed
- Rebuild when options (e.g. size) change
new
diagrams-builder-postscripttoolmiscellaneous improvements to
diagrams-latex.sty
Dependency/version changes
- depend on
cryptohash >= 0.8 && < 0.10(use new unified API) - remove
base16-bytestringdependency
- depend on
diagrams-haddock 0.1.1.1
diagrams-haddock is a new tool for embedding automatically-generated diagrams in Haddock documentation. It has been released for a while, but 0.1.1.1 is the first version officially included in a major diagrams release.
SVGFonts 1.3
First release as an officially supported diagrams package, adding nice support to diagrams for text using fonts in SVG format.
diagrams 0.6: 11 December 2012
diagrams-core 0.6
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.CoreGrahpics.Rendering.Diagrams.Core–>Diagrams.Core.TypesGraphics.Rendering.Diagrams.*–>Diagrams.Core.*Graphics.Rendering.Diagrams.UDTreehas been split out into a separatedual-treepackage (which has also been substantially rewritten).Graphics.Rendering.Diagrams.{Monoids,MList}have been split out into a separatemonoid-extraspackage.The
namesfunction 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 aStringusingshow.The new
subMapfunction fills a similar role thatnamesused to play, returning the entire mapping from names to subdiagrams.New functions
envelope[VP]MayenvelopeVandenvelopePreturn 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 inMaybefor this purpose.New functions
envelopeSandenvelopeSMayLike
envelope[VP](May), but returning a scalar multiple of the input vector.The
Graphics.Rendering.Diagrams.Utilmodule has been removed, along with thewithLengthfunction. Calls towithLengthcan be replaced usingwithLength s v = s *^ normalized vAdd needed constraints
(InnerSpace v, OrderedField (Scalar v), Monoid' m)to the type of therenderDiasmethod in theMultiBackendclass.Generalized
Transformableinstances for pairs and tuplesPreviously, 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
- More efficient implementation of
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)
juxtaposeDefaultis now the identity on the second object if either one has an empty envelope. In particular this means thatmemptyis now an identity element forbesideand friends.
active 0.1.0.2
Bump dependency upper bounds:
semigroupoids< 3.1base< 4.7QuickCheck< 2.6
diagrams-lib 0.6
New features
boundingRectfunction for constructing a bounding rectanglebgfunction for “setting the background color” (i.e. placing atop a colored bounding rectangle)New functions
setDefault2DAttributesandadjustDiaSize2D.adjustDia2Ddoes both — so the behavior ofadjustDia2Dhas not changed, but it is now possible to apply just one of the two adjustments using the new functions.Diagrams.TwoD.Transformnow exports aScaleInvtype for creating scale-invariant objects, which are only affected by rotational and translational components of transformations.The new
Diagrams.Coordinatesmodule provides nicer syntax for constructing and pattern-matching point and vector literals.New
fromFixedSegfunction inDiagrams.Segment, which decomposes aFixedSegmentinto a starting point and aSegment.New
withTracefunction for setting theTraceof a diagram.Three new size-related functions:
New
sizedfunction for scaling an object to a particular size. One particularly nice use of this is to obviate the need to keep fiddling with the line width to get diagrams to “look right”; just set the line width relative to some arbitrary scale (e.g. assuming the final diagram will fit into a 1x1 box) and then applysizedto the final diagram to make it that given arbitrary size. It can also be used for easily making something (a diagram, path, trail, …) the same size as something else, with the help of the newsizeSpec2Dfunction.New
sizedAsfunction, for setting the size of some object to be “the same as” some other object.New
sizeSpec2Dfunction for conveniently calculating the size of an object as aSizeSpec2Dvalue (for use with the newsizedfuntion).
New
extrudeEnvelopeandintrudeEnvelopefunctions for modifying envelopes in a single direction only, as well as new functionsextrude{Left,Right,Bottom,Top}specializingextrudeEnvelopeto 2D.arcCWdraws clockwise arcs;arc'draws arcs counterclockwise or clockwise as the radius is positive or negative, respectively.fill color attribute is generalized to support “recommended” and “committed” colors; text objects use a recommended fill color of black.
New instances
The
Showinstance forR2now produces something like2 & 6instead ofR2 { unR2 = (2,6) }. TheReadinstance has also been changed to match, soread . show = id.Envelopedinstance forFixedSegmentTracedinstances forSegment,FixedSegment,Trail, andPathNew derived
Eqinstances forLineCapA,LineJoinA,Dashing,DashingA,FillRule,Font,FontSize,FontSlant,FontSlantA,FontWeight, andFontWeightARenderable Ellipsoid NullBackendinstance
API changes
Data.Colour(minusatopandAffineSpace) is now re-exported from Diagrams.Prelude for convenience.The
beneathfunction is now infixl 6.The
BoundingBoxmodule has had a complete overhaul. There is now a special empty bounding box, and bounding boxes are an instance ofMonoid.The type of
withEnvelopehas been slightly generalized.Diagrams.TwoD.Adjust.adjustSizeis now deprecated; it has been renamed and moved toDiagrams.TwoD.Size.requiredScaleT.expandPathhas been renamed toscalePath.
Dependency/version changes
- Allow
data-default0.4 and 0.5 - Allow
base-4.6 - Allow
containers-0.5
- Allow
Bug fixes
arcandarcTfunctions now always produce counterclockwise arcs, as claimed.
diagrams-contrib 0.6
Version bumped to 0.6 to match other diagrams packages.
New features
New pure implementation of Turtle library, in
Turtle.InternalsDiagrams.TwoD.Layout.Tree:New
renderTree'function which gives the edge-drawing function access to the values stored at the nodes instead of just the node positions.The type of
renderTreeis generalized to work with anyQDiagram b R2 m.
Bug fixes
- Tiling generation code in
Diagrams.TwoD.Tilingswasn’t actually checking whether vertexes had been already visited.
- Tiling generation code in
Dependency/version changes
- Switch from
fclabelstolens
- Switch from
diagrams-cairo 0.6
New features
New
--listoption formultiMainto list all available diagramsMajor documentation improvements
New modules:
Diagrams.Backend.Cairo.Ptr, for rendering directly to buffers in memoryDiagrams.Backend.Cairo.List, for rendering to a list of lists of pixels.
API changes
Removal of
StyleParamfromDiagrams.Backend.Cairo.Text, change functions in that module to acceptStyle R2. Usage can be fixed by applying these style functions tomempty.GTK rendering has been split out into a new package, diagrams-gtk.
The
Diagrams.Backend.Cairo.Gtkmodule is nowDiagrams.Backend.Gtkin thediagrams-gtkpackage.The
CairoOptionsrecord has a new booleancairoBypassAdjustoption; when set, the backend should bypass callingadjustDia2D.The GTK output type is gone.
There is a new
RenderOnlyoutput type, for when you don’t care about theIOaction but only want the cairoRenderaction.
Dependency/version changes
Upper bounds relaxed to allow
base-4.6,unix-2.6,cmdargs-0.10,split-0.2.*,mtl-2.1Add a dependency on
time, and conditional compilation to use either ClockTime or UTCTime depending on the version of thedirectorypackageAdd dependency on
colourLower bound on
cairoraised to 0.12.4
Bug fixes
Fixed looped compile mode, which was repeatedly trying to compile when the code contained errors, instead of trying once and then waiting for a change.
Fix a bug where default attributes were not being set when using the “bypass” mode used by the gtk backend. (#16)
diagrams-gtk 0.6
Initial release. Split out into a separate package from diagrams-cairo.
diagrams-svg 0.6
First “officially supported” release.
Features still not implemented:
- text alignment
- inline images
As of this release everything else Should Work (tm).
diagrams-builder 0.2.1.0
- new
diagrams-builder-svgtool - deal properly with an empty list of sources (#2)
- put cached diagrams in
.diagrams_cacheinstead ofdiagramsby default - bug fix: cached files should use same extension as requested output, not “png”
- bug fix: create output directory for cached images if it doesn’t exist
- new module
Diagrams.Builder.CmdLine; factor out common utilities for command-line tools - depend on 0.6 versions of diagrams libs
diagrams 0.5: 9 March 2012
diagrams-core 0.5
- New features:
- New
Juxtaposableclass - New
NullBackendandDtypes, for conveniently giving a monomorphic type to diagrams when we don’t care which one it is. - #27: Change type of
adjustDiato return a new options record (with an explicitly filled-in size)
- New
- New instances:
Enveloped,HasOrigin,Juxtaposable,HasStyle, andTransformableinstances forSets and tuplesV Double = DoubleJuxtaposableandBoundableinstances forMap
- API changes
AnnDiagramrenamed toQDiagram- #61: terminology change from “bounds” to “envelope”
boundary->envelopeP- “bounding region” -> “envelope”
Bounds->EnvelopeBoundable->EnvelopedgetBounds->getEnvelope- etc.
- Split out definition of
Pointinto separate package (vector-space-points) - The
PointconstructorPis no longer exported fromGraphics.Rendering.Diagrams. See theDiagrams.TwoD.Typesmodule fromdiagrams-libfor new tools for working with abstract 2D points. If you really need thePconstructor, importGraphics.Rendering.Diagrams.Points. - Name-related functions now return “located bounding functions” instead of pairs of points and bounds, to allow for future expansion.
- Dependency/version changes:
vector-space0.8 is now required.- Bump base upper bound to allow 4.5; now tested with GHC 7.4.1.
- Bug fixes:
- Bug fix related to empty envelopes
active 0.1.0.0
- Initial release
diagrams-lib 0.5
- New features:
mkSizeSpecfunction for constructing aSizeSpec2Dfrom twoMaybe Doublesbeneathas convenient synonym forflip atop- Improvements and extensions to rounded rectangles by Peter Hall:
roundedRect'allows rounded rectangles with a different radius specified for each corner- both
roundedRect'androundedRectnow allow negative radii, resulting in “inverted” circular corners
- #64: New
Alignableclass for things that can be aligned. explodeTrailandexplodePathhave been generalized to return anyPathLiketype.- New path functions
pathCentroid(compute the centroid of a path’s vertices) andexpandPath(scale a path about its centroid). - Generalized
centroidfunction now exported from new moduleDiagrams.Points. - Initial (experimental) support for animation:
AnimationandQAnimationdefined as synonyms forActivediagrams (seeactivepackage)- Instances for
Active:V,HasOrigin,Transformable,HasStyle,PathLike,Juxtaposable,Alignable animEnvelopeandanimRectfunctions for automatic bounding of animations
addClosingSegmentfunction for making the implicit closing segment of a closed trail explicit- Improvements to
BoundingBoxmodule from Michael Sloan: querying ofBoundingBoxbounds, corners, extents, and transformation of objects to fit within a given box. - Text alignment options from Michael Sloan
viewfunction for restricting a diagram’s envelope to a rectangular region.iterateNfunction for iterating a finite number of timesatAnglefor placing two diagrams next to each other along a specified angle.padXandpadYfunctions for padding in the X- and Y-directions independently.- generalized
showOriginfunction from Ian Ross - #40: add shears to
Diagrams.TwoD.Transform
- Performance improvements
- Use a balanced folding scheme for
cat', reducing time in some cases from \(O(n^2)\) to \(O(n \log n)\) - More efficient implementation of
beside
- Use a balanced folding scheme for
- New instances:
Alignableinstances forQDiagram,Path,Envelope,Active,Set,Map,[]Renderableinstances forNullBackend(Trail,Path,Segment,Image,Text)- Instances for
Active:V,HasOrigin,Transformable,HasStyle,PathLike,Juxtaposable,Alignable
- API changes
R2used to be a synonym for(Double, Double)but is now abstract. To convert between pairs ofDoublesandR2, use the new functionsr2andunr2. There are two reasons for this change:- to allow for future changes to the implementation of
R2; (Double, Double)was an awkward special case getting in the way of useful tuple instances for classes likeHasOrigin,Enveloped, and so on.
- to allow for future changes to the implementation of
circlePathhas been removed; its functionality has been subsumed bycircle.adjustSegmentnow takes an extra tolerance option.- Ellipses are now represented using Bezier approximations rather than a separate special type.
BoundingBoxno longer has aTransformableinstance; the old instance was misleading at best.- Change semantics of
beside(hence also(|||)and(===)) so the result’s origin is the same as that of the first argument. adjustDia2Dnow takes aSizeSpec2D.besideand related functions are now implemented in terms ofjuxtapose.- Instead of taking an
R2,roundedRectnow takes a pair ofDoubles, to be more consistent withrect.
- Dependency/version changes
- Support for GHC 7.4.1:
- depend on
colour>= 2.3.2 - update
baseandarrayupper bounds
- depend on
- bump
vector-spaceupper bound
- Support for GHC 7.4.1:
- Bug fixes
- Avoid scale by zero error in
showOrigin. - Base
adjustDia2Dtranslation on output size rather than diagram size.
- Avoid scale by zero error in
diagrams-contrib 0.1.0.0
- Initial release
diagrams-cairo 0.5
- New features
- New
Diagrams.Backend.Cairo.Textmodule by Michael Sloan, with functions for creating appropriately sized text objects by querying cairo for the size, and related supporting functions. - Basic support for animation with
animMainfunction, by generating frames sampled at regular intervals. - Proper vertical alignment of default text based on font parameters (Michael Sloan).
- Requesting just a width or height now causes the other to be computed appropriately.
- New
- API changes
- Move
Diagrams.Backend.CairotoDiagrams.Backend.Cairo.Internaland export everything.Diagrams.Backend.Caironow just re-exports selected functions fromInternal. This allows anyone who wants access to the helper/utility functions to importInternal.
- Move
- Dependency/version changes
- relax
cmdargsupper bound - GHC 7.4.1 compatibility: update
base,filepath, andold-timeupper bounds
- relax
- Bug fixes
- #54: Generate warning for missing image files (Ian Ross).