chore(deps): update dependency skia-canvas to v2 #960
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.0.1
->^2.0.0
Release Notes
samizdatco/skia-canvas (skia-canvas)
v2.0.0
Compare Source
New Features
Website
Imagery
drawImage()
][mdn_drawImage] (thanks to @mpaperno #180). Note that Images loaded from SVG files that don't have awidth
andheight
set on their root<svg>
element have some quirks as of this release:height
will report being150
and thewidth
will be set to accurately capture the image's aspect ratiodrawImage()
without size arguments, the SVG will be scaled to a size that fits within the Canvas's current bounds (using an approach akin to CSS'sobject-fit: contain
).drawImage()
, the ‘crop’ arguments (sx
,sy
,sWidth
, &sHeight
) will correspond to this scaled-to-fit size, not the Image's reportedwidth
&height
.toBuffer()
andsaveAs()
methods now support"raw"
as a format name and/or file extension, causing them to return non-encoded pixel data (by default in an"rgba"
layout like a standard ImageData buffer)colorType
argument to specify alternative pixel data layouts (e.g.,"rgb"
or"bgra"
)new ImageData()
constructor, the optional settings arg now allows you to select thecolorType
for the buffer's pixels.Typography
outlineText()
][outline_text] method now takes an optionalwidth
argument and supports all the context's typographic settings (e.g.,.font
,.fontVariant
,.textWrap
,.textTracking
, etc.).fontStretch
property. Note that stretch values included in the.font
string will overwrite the current.fontStretch
setting (or will reset it tonormal
if omitted).serif
,sans-serif
,monospace
, andsystem-ui
families are currently supported..textDecoration
property..letterSpacing
and.wordSpacing
properties.GUI
resizable
property which can be set tofalse
to prevent the window from being manually resized or maximized (contributed by @nornagon #124).input
event now reports the composed character, not the individual keystrokes.Rendering
engine
property which describes whether the CPU or GPU is being used, which graphics device was selected, and what (if any) error prevented it from being initialized..transform
and.setTransform
methods on Context, Path2D, and CanvasPattern objects can now take their arguments in additional formats. They can now be passed a DOMMatrix object or a string with a list of transformation operations compatible with the CSStransform
property. The DOMMatrix constructor also supports these strings as well as plain, matrix-like objects with numeric attributes nameda
,b
,c
,d
,e
, &f
(contributed by @mpaperno #178).SKIA_CANVAS_THREADS
environment variableBreaking Changes
src
property has been set to a local path. As a result, it's now necessary toawait img.decode()
or set up an.on("load", …)
handler before drawing it—even when thesrc
is non-remote.keyup
/keydown
andinput
event listeners now has fields and values consistent with browser behavior. In particular,code
is now a name (e.g.,ShiftLeft
orKeyS
) rather than a numeric scancode,key
is a straightforward label for the key (e.g.,Shift
ors
) and the newlocation
field provides a numeric description of which variant of a key was pressed..async
property has been removed. See the v0.9.28 release notes for details..textTracking
property has been removed in favor of the new.letterSpacing
propertyBugfixes
vulkano
crate and makes better selections among devices present (previously it was just using the first result, which is not always optimal).this
to point to the new image (contributed by @mpaperno & @ForkKILLET).fullscreen
set totrue
now takes effect immediately (previously it was failing silently).on("draw")
handlers no longer become unresponsive on macOS 14+ after being fully occluded by other windowsdrawCanvas()
method now clips to the specified crop size (contributed by @mpaperno #179)isPointInPath
andisPointInStroke
now works correctly when called with a Path2D object as the first argumentMisc. Improvements
roundRect
method (contributed by @sandy85625 & @santilema)winit
and replaced the end-of-life’d skulpin-based Vulkan renderer with a new implementation using Vulkano for window-drawing on Windows and Linux..gpu
][canvas_gpu] property tofalse
immediately after creation will prevent any GPU-related resource acquisition from occurring (though rendering speed will be predictably slower).msaa
export argument. If omitted, defaults to 4x MSAA.import {Image} from "skia-canvas"
) when used as an ES Module.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.