v0.9.24
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 correspondingnpm install …
command into your terminal.Installation commands
Mac (Apple Silicon)
npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.24/skia-canvas-v0.9.24-darwin-arm64.tar.gz
Mac (Intel)
npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.24/skia-canvas-v0.9.24-darwin-x64.tar.gz
Windows (Intel)
npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.24/skia-canvas-v0.9.24-win32-x64.tar.gz
Linux (Intel/AMD; glibc)
npm install https://github.com/samizdatco/skia-canvas/releases/download/v0.9.24/skia-canvas-v0.9.24-linux-x64.tar.gz
New Features
- Path2D objects now have a read/write
d
property with an SVG representation of the path’s contours and anunwind()
method for converting from even-odd to non-zero winding rules - The
createTexture()
context method returns CanvasTexture objects which can be assigned tofillStyle
orstrokeStyle
- Textures draw either a parallel-lines pattern or one derived from the provided Path2D object and positioning parameters
- The marker used when
setLineDash
is active can now be customized by assigning a Path2D to the context’slineDashMarker
property (default dashing can be restored by assigningnull
) - The marker’s orientation & shape relative to the path being stroked can be controlled by the
lineDashFit
property which defaults to"turn"
but can be set to"move"
(which preserves orientation) or"follow"
(which distorts the marker’s shape to match the contour)
Bugfixes
- Removed use of the
??
operator which is unavailable prior to Node 14 - Prevented a spurious warning on windows incorrectly claiming that the
icudtl.dat
file could not be found
Misc. Improvements
- The Path2D
simplify()
method now takes an optional fill-rule argument - Added support for versions of macOS starting with 10.13 (High Sierra)