Skip to content

v0.9.28

Compare
Choose a tag to compare
@github-actions github-actions released this 12 Jan 21:20
· 449 commits to main since this release

Deprecation Warning

This version can no longer be installed via npm due to the unsustainable expense of hosting the library on S3. You can still install it directly from this GitHub release via the commands below. Find the section for your OS and machine type and copy/paste the corresponding npm install … command into your terminal.

Installation commands

Mac (Apple Silicon)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-darwin-arm64.tar.gz

Mac (Intel)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-darwin-x64.tar.gz

Windows (Intel)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-win32-x64.tar.gz

Linux (Intel/AMD; glibc)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-linux-x64-glibc.tar.gz

Linux (Intel/AMD; musl C library)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-linux-x64-musl.tar.gz

Linux (ARM-64; glibc)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-linux-arm64-glibc.tar.gz

Linux (ARM-32; glibc)

npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.28/skia-canvas-v0.9.28-linux-arm-glibc.tar.gz

New Features

  • Added TypeScript definitions for extensions to the DOM spec (contributed by @cprecioso)
  • Added 3D-perspective transformations via the new createProjection() context method
  • Colors can now use the hwb() model

Breaking Changes

  • The Canvas .async property has been deprecated and will be removed in a future release.
    • The saveAs, toBuffer, and toDataURL methods will now be async-only (likewise the shorthand properties).
    • Use their synchronous counterparts (saveAsSync, toBufferSync, and toDataURLSync) if you want to block execution while exporting images.
  • The ImageData constructor now orders its arguments properly: the optional buffer/array argument now comes first

Bugfixes

  • Fixed a stack overflow that was occurring when images became too deeply nested for the default deallocator to handle (primarily due to many thousands of image exports from the same canvas)
  • The source-in, source-out, destination-atop, and copy composite operations now work correctly for paths rather than rendering shapes without color (contributed by @meihuanyu)
  • Shape primitives now behave consistently with browsers when being added to a non-empty path:
    • rect() now issues an initial moveTo rather than extending the path, then leaves the ‘current’ point in its upper left corner
    • ellipse() extends the current path rather than implicitly closing it (contributed by @meihuanyu)
    • arc() also extends the current path rather than closing it

Misc. Improvements

  • Upgraded Skia to milestone 96
  • Added workflow for creating docker build environments