Changelog for blank-canvas-0.6
0.6
API changes
- The
(#)function had its type generalized froma -> (a -> Canvas b) -> Canvas btoa -> (a -> b) -> b. This allows it to be used with font length units. - Added more type synonyms (
Interval,Degrees,Radians, etc.) to more clearly indicate what functions expect constrained values. showbJS(formerlyshowJS) andjsStylenow return a textBuilderinstead of aString. This change was introduced as part of a largerblank-canvasrefactoring to increase performance. See theData.Text.Lazy.Buildermodule from thetextpackage for more details on how to useBuilders.
API additions
- A new ADT for
Fonts has been added inGraphics.Blank.Fontthat can be used in place ofText. For example,"30pt Calibri"is equivalent to(defFont "Calibri") { fontSize = 30 # pt }. - A generalized
fontfunction of typeCanvasFont canvasFont => canvasFont -> Canvas ()was added toGraphics.Blank.Fontthat can accept aTextorFontargument. Thefontfunction inGraphics.Blankremains of typeText -> Canvas (). - Added a
cursorfunction to change the browser cursor. Also added theGraphics.Blank.Cursormodule containing a generalizedcursorfunction that uses aCursorADT instead ofText. - Added
Bounded,Enum,Eq,Ix,Ord, andShowinstances for more data types - Added support for more MIME types via the
mime-typeslibrary`
Additions
- Allowed building with
base-4.8.0.0
Other
- Require
scotty>= 0.10 andkansas-comet>= 0.4
0.5
API changes
- Using Double rather than Float
- Generalized saveRestore to be polymorphic
API additions
- Added sync for forcing synchronization between the server and client
- Added argument specific variants of drawImage and putImageData.
- Added ADTs for RepeatDirection, Alignment, Baseline, LineEnds, Corner (previous used Text)
- Use of the colour(sic) package (Text is still allowed)
Bug fixes:
- Fixed unicode escapes in strings
Additions:
- Allow Images to access client-side filesystem