Socket
Socket
Sign inDemoInstall

skia-canvas

Package Overview
Dependencies
65
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous13Next

0.9.22

Diff

Changelog

Source

📦 ⟩ [v0.9.22] ⟩ Jun 09, 2021

New Features

Breaking Changes

  • The canvas functions dealing with rasterization (toBuffer, toDataURL, png, jpg, pdf, and svg) and file i/o (saveAs) are now asynchronous and return Promise objects. The old, synchronous behavior is still available on a canvas-by-canvas basis by setting its async property to false.
  • The optional quality argument accepted by the output methods is now a float in the range 0–1 rather than an integer from 0–100. This is consistent with the encoderOptions arg in the spec. Quality now defaults to 0.92 (again, as per the spec) rather than lossless.

Bugfixes

  • measureText was reporting zero when asked to measure a string that was entirely made of whitespace. This is still the case for ‘blank‘ lines when textWrap is set to true but in the default, single-line mode the metrics will now report the width of the whitespace.
  • Changed the way text rendering was staged so that SVG exports didn’t entirely omit(!) text from their output. As a result, Context2Ds now use an external Typesetter struct to manage layout and rendering.
samizdatco
published 0.9.21 •

Changelog

Source

📦 ⟩ [v0.9.21] ⟩ May 22, 2021

New Features

  • Now runs on Windows and Apple Silicon Macs.
  • Precompiled binaries support Node 10, 12, 14+.
  • Image objects can be initialized from PNG, JPEG, GIF, BMP, or ICO data.
  • Path2D objects can now be combined using boolean operators and can measure their own bounding boxes.
  • Context objects now support createConicGradient().
  • Image objects now return a promise from their decode() method allowing for async loading without the loadImage helper.

Bugfixes

  • Calling drawImage with a Canvas object as the argument now uses a Skia Pict rather than a Drawable as the interchange format, meaning it can actually respect the canvas's current globalAlpha and globalCompositeOperation state (fixed #6).
  • Improved some spurious error messages when trying to generate a graphics file from a canvas whose width and/or height was set to zero (fixed #5).
  • CanvasPatterns now respect the imageSmoothingEnabled setting
  • The counterclockwise arg to ellipse and arc is now correctly treated as optional.

Misc. Improvements

  • Made the console.log representations of the canvas-related objects friendlier.
  • Added new test suites for Path2D, Image, and Canvas’s format support.
  • Created workflows to automate precompiled binary builds, testing, and npm package updating.
samizdatco
published 0.9.20 •

Changelog

Source

📦 ⟩ [v0.9.20] ⟩ Mar 27, 2021

Bugfixes

  • The loadImage helper can now handle Buffer arguments

Misc. Improvements

  • Improved documentation of compilation steps and use of line height with ctx.font
samizdatco
published 0.9.19 •

Changelog

Source

📦 ⟩ [v0.9.19] ⟩ Aug 30, 2020

Initial public release 🎉

samizdatco
published 0.9.18 •

samizdatco
published 0.9.17 •

samizdatco
published 0.9.16 •

samizdatco
published 0.9.15 •

samizdatco
published 0.9.6 •

samizdatco
published 0.9.5 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc