This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
skia-canvas | ^0.9.29 -> ^1.0.0 |
Release Notes
samizdatco/skia-canvas
v1.0.1
Bugfixes
- If an offscreen buffer can't be allocated using the Vulkan renderer, CPU rendering is used as a fallback
- The
drawCanvas()
routine now works even when the destination canvas is later saved as an SVG (previously, the source canvas would be missing from the output). Caveat: this only works if the destination canvas is using the defaultsource-over
blend mode, has itsglobalAlpha
set to 1, and is not using shadows or theeffect
property. If any of those defaults have been changed, the drawn canvas will not appear in the saved SVG. Bitmap and PDF exports do not have this restriction.
Misc. Improvements
- Added a
fullscreen
event to theWindow
class to flag changes into and out of full-screen mode.
v1.0.0
New Features
- The new Window class can display a Canvas on screen, respond to mouse and keyboard input, and fluidly animate by calling user-defined event handlers.
- Bitmap rendering now occurs on the GPU by default and can be configured using the Canvas's
.gpu
property. If the platform supports hardware-accelerated rendering (using Metal on macOS and Vulkan on Linux & Windows), the property will betrue
by default and can be set tofalse
to use the software renderer. - Added support for recent Chrome features:
- the
reset()
context method which erases the canvas, resets the transformation state, and clears the current path - the
roundRect()
method on contexts and Path2D objects which adds a rounded rectangle using 1–4 corner radii (provided as a single value or an array of numbers and/or DOMPoint objects)
- the
Bugfixes
- The
FontLibrary.reset()
method didn't actually remove previously installed fonts that had already been drawn with (and thus cached). It now clears those caches, which also means previously used fonts can now be replaced by calling.use()
again with the same family name. - The [
.drawCanvas()
][drawCanvas] routine now applies filter effects and shadows consistent with the current resolution and transformation state.
Misc. Improvements
- The
.filter
property's"blur(…)"
and"drop-shadow(…)"
effects now match browser behavior much more closely and scale appropriately with thedensity
export option. - Antialiasing is smoother, particularly when down-scaling images, thanks to the use of mipmaps rather than Skia's (apparently buggy?) implementation of bicubic interpolation.
- Calling
clearRect()
with dimensions that fully enclose the canvas will now discard all the vector objects that have been drawn so far (rather than simply covering them up). - Upgraded Skia to milestone 103
v0.9.30
New Features
- Enhacements to the shared FontLibrary object:
- Added pre-compiled binaries for Alpine Linux on arm64
Bugfixes
- Calling
clip
with an empty path (or one that does not intersect the current clipping mask) will now prevent drawing altogether - Transformation (
translate
,rotate
, etc.) and line-drawing methods (moveTo
,lineTo
,ellipse
, etc.) are now silently ignored if called withNaN
,Infinity
, or non-Number values in the arguments rather than throwing an error- applies to both the Context and Path2D versions of the drawing methods
- a TypeError is thrown only if the number of arguments is too low (mirroring browser behavior)
-
conicCurveTo()
now correctly reflects the canvas's transform state - The browser-based version of
loadImage()
now returns a Promise that correctly resolves to an Image object - SVG exports no longer have an invisible, canvas-sized
<rect/>
as their first element - Fixed an incompatibility on Alpine between the version of libstdc++ present on the
node:alpine
docker images and the version used when building the precompiled binaries
Misc. Improvements
- Upgraded Skia to milestone 101
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.