Beta Test: v2.1 #244
samizdatco
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everybody, I've reached the end of my to-do list for Skia Canvas 2.1 and would really appreciate any time you could put into checking it out and helping me find any bugs or details I've missed. You can install the newest pre-release via:
Please post general 👍/👎 experiences here or feel free to open an issue if you want to report something specific.
Thanks!
New Features
GUI
App
global now has aneventLoop
property which can be set to:"native"
(the default) in which case the Node event loop is suspended while the OS handles displaying GUI windows"node"
where the Node event loop maintains control (allowingsetInterval
andsetTimeout
to run) and handles GUI events manually every few milliseconds (though note some of the caveats associated with the Winit feature this uses).closed
property and emit aclose
event when they are closed. Closed windows can later be re-opened by calling the newopen()
method.borderless
attribute allows Window titlebars and borders to be hidden (thanks to @hydroperx Window#decorations #230)Imagery
loadImage()
andloadImageData()
helpers now usenode-fetch
to handle web requests and can accept a fetch options object as the final argument.sharp
npm module has been installed):loadImage()
&loadImageData()
can now be called with a Sharp object as their sole argumentsrc
property on a new Image object can be set to a Sharp object and it will begin asynchronously loadingRendering
downsample
flag (for jpegs only), which enables 4:2:0 chroma-subsampling. By default, no subsampling (a.k.a. 4:4:4) will be performeddensity
,matte
, andmsaa
) which behave the same as their equivalents in the saveAs() method.Typography
textContrast
— a number in the range 0.0–1.0 controlling the amount of additional weight to add (defaults to0.0
)textGamma
— a number in the range 0.0–4.0 controlling how glyph edges are blended with the background (defaults to1.4
)textAlign
attribute can now be set to"justify"
Misc. Improvements
App.launch()
now returns a Promise that resolves when the final window is closed, allowing you to schedule code to run before the process would otherwise exit (see also the newidle
event which fires under the same circumstances).input
event objects now contain aninputType
property to distinguish between insertion, deletion, and IME compositionmousemove
events)buttons
attributedensity
option passed to saveAs() or toBuffer())SKIA_CANVAS_STRICT
environment variable to1
ortrue
.Bugfixes
cursor
property to "none" now hides the cursormoved
window events are no longer emitted during resizesroundRect()
now reflects context's current transform state and accepts plain{x, y}
objects for corner-radii in addition to Numbers and DOMPoints (thanks to @mpaperno Accept any{x:number, y:number}
object when parsing corner radii #223)createConicGradient()
are no longer incorrectly offset by 90°lineTo
on an empty Path2D no longer adds a line from the origin to the specified coordinates: it now acts as if it were amoveTo
outline
option is set totrue
Beta Was this translation helpful? Give feedback.
All reactions