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
Appglobal now has aneventLoopproperty 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 (allowingsetIntervalandsetTimeoutto run) and handles GUI events manually every few milliseconds (though note some of the caveats associated with the Winit feature this uses).closedproperty and emit acloseevent when they are closed. Closed windows can later be re-opened by calling the newopen()method.borderlessattribute allows Window titlebars and borders to be hidden (thanks to @hydroperx Window#decorations #230)Imagery
loadImage()andloadImageData()helpers now usenode-fetchto handle web requests and can accept a fetch options object as the final argument.sharpnpm module has been installed):loadImage()&loadImageData()can now be called with a Sharp object as their sole argumentsrcproperty on a new Image object can be set to a Sharp object and it will begin asynchronously loadingRendering
downsampleflag (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)textAlignattribute 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 newidleevent which fires under the same circumstances).inputevent objects now contain aninputTypeproperty to distinguish between insertion, deletion, and IME compositionmousemoveevents)buttonsattributedensityoption passed to saveAs() or toBuffer())SKIA_CANVAS_STRICTenvironment variable to1ortrue.Bugfixes
cursorproperty to "none" now hides the cursormovedwindow 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°lineToon an empty Path2D no longer adds a line from the origin to the specified coordinates: it now acts as if it were amoveTooutlineoption is set totrueBeta Was this translation helpful? Give feedback.
All reactions