Changelog for diagrams-lib-0.6.0.2
0.6.0.2 (28 March 2013)
-
bump upper bound to allow
NumInstances-1.2 -
Quadratic solver is now more numerically stable, getting rid of some incorrect behavior of
juxtapose(#46)
0.6.0.1: 7 January 2013
- allow
semigroups-0.9
0.6: 11 December 2012
-
New features
-
boundingRectfunction for constructing a bounding rectangle -
bgfunction 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 forFixedSegment -
Tracedinstances forSegment,FixedSegment,Trail, andPath -
New derived
Eqinstances forLineCapA,LineJoinA,Dashing,DashingA,FillRule,Font,FontSize,FontSlant,FontSlantA,FontWeight, andFontWeightA -
Renderable 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.
0.5: 9 March 2012
-
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: 1. to allow for future changes to the implementation ofR2; 2.(Double, Double)was an awkward special case getting in the way of useful tuple instances for classes likeHasOrigin,Enveloped, and so on.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
0.4.0.1: 30 October 2011
- bump
data-defaultdependency to allow version 0.3
0.4: 23 October 2011
-
documentation fixes
-
New functions and primitives
wedgeshape primitivefromDirectionfunction for converting angles to 2D unit vectors; inverse functiondirectiongeneralized to return any Angle type- New functions for computing and adjusting segment lengths
scaleUToXandscaleUToYfor doing uniform scales resulting in a desired width or height.circlePath,reversePath,decoratePath
-
New features
- Completely new and improved polygon generation API
- Cubic splines
- User-controllable path fill rules
-
Bug fixes
- fix incorrect corner case in arc generation
- fix incorrect
reverseTrailfunction
0.3: 18 June 2011
-
New features
- new customizable
stroke'function which lets you assign names to path vertices circleandsquarefunctions now take a size argument- function for adjusting 2D diagrams to requested size abstracted from cairo backend
- generalize
PathLikeclass to include an instance for diagrams, and collapse things likepolygon/polygonPathinto a single polymorphic function - basic text support
- basic support for external images
- very sketchy initial proof-of-concept library of 3D primitives. See also diagrams-povray package.
- new customizable
-
Bug fixes
- Issue 32 (
memptynot behaving correctly within concatenations)
- Issue 32 (
0.2: 3 June 2011
-
documentation fixes
-
New functions and primitives
scaleToXandscaleToYfor scaling to an absolute width/heightreverseTrail- new
Angleclass and ability to use radians, degrees, or circle fractions for specifying angles rotateAboutandreflectAbouttransformations based on new conjugation functionsrectandroundedRectprimitivesexplodeTrail/Pathfor breaking trails and paths into individual segments
-
New features
- opacity attribute
- support for path clipping
-
New modules
Diagrams.BoundingBox
-
Fixes and updates
withBoundsnow properly uses the new bounds instead of just combining them with the old
0.1.1: 18 May 2011
- minor documentation fixes
- link to new website
0.1: 17 May 2011
- initial preview release