@hackage wumpus-basic0.11.0

Common drawing utilities built on wumpus-core.

** WARNING ** - this package is sub-alpha. It was released to Hackage prematurely - designing a higher-level drawing library turns out to be much more demanding than designing a low-level one (Wumpus-Core).

Some of the modules (SafeFonts, SVGColours, X11Colours) are relatively stable. The core modules of Basic.Graphic (Base, PrimGraphic, DrawingContext) seem to support a good set primitive functions, but the exact types of drawing objects do not feel right at the moment. Other modules (Paths, Chains, Shapes) are essentially sketches and are expected to be substantially revised in subsequent updates.

Version 0.11.0 is an interim release. It is expected that the next release will substantially rework Shapes and likely change the Graphic.Base types. As quite a large amount of code has already changed since version 0.10.0 (to support better arrowheads and connectors) it seems sensible to release 0.11.0 now, rather than have a huge delta after Shapes have been reworked again. The current versions of Wumpus-Tree and Wumpus-Microprint will work with version 0.11.0 if their respective .cabal files are edited to bump the version number. There will be no matching releases to work automatically with version 0.11.0 of Wumpus-Basic.

Changelog:

  1. 10.0 to 0.11.0:

  • Reworked arrowheads and connectors - connectors are now configurable: there are functions to make connectors with a left arrowhead, right arrowhead, none or both.

  • Reworked shapes - internally shapes now create a Path rather than a Graphic this means the path can be manipulated (e.g. round cornered rectangles, diamonds... can be constructed). Coordinate is no longer a Shape - it is now similar object but of a different type. Likewise, FreeLabel has been replaced by Plaintext which is not a Shape, but has some similar properties. Unfortunately, the Shape types are still difficult to work with and a larger reworking is still necessary.

  • Basic.Paths.Base - Path type changed, PathEmpty constructor removed so empty paths cannot be created. This allows a better API for taking points on a path. It also means Path is no longer an instance of Monoid. Type changes to various functions (e.g. tipR, tipL) reflecting that as paths cannot now be empty, functions on them can generally be total. toPrimPathU removed as converting to a PrimPath as now always safe. tracePoints renamed traceLinePoints, tracePointsCurve renamed traceCurvePoints, midpoint renamed midway.

  • Basic.Graphic - the types ConnDrawingR, ConnGraphic etc. have had their names expanded to ConnectorDrawingR, ConnectorGraphic...

  • Basic.SafeFont - font names changed to use underscore separators rather than camelCase. Wumpus generally uses underscored names for constants.

  • Removed conn from Basic.Graphic.Drawing. Connectors should be used instead.

  • The class DrawingCtxM now has Applicative as a superclass.

  • lineSpacing renamed baselineSpacing.