Releases: mpaperno/skia-canvas
Releases · mpaperno/skia-canvas
v1.1.2-mp
Fixes
- Fixed exception in
canvas::draw_path()
when trying to draw a path with an invalid transform which cannot be inverted (fixes samizdatco#149). (4c4ad8b1) - Fixed
this
scope inImage
onload
andonerror
callbacks (the callbacks are now bound to theImage
instance). (81fd8f1f)
Other
- Updated node module dependencies; removed
aws-sdk
ansnodemon
from dev dependencies. - Removed napi version from file name of published binaries.
- Fixed version string in pre-gyp remote path (fixes mp-#1).
- Now published on npmjs.org as @mpaperno/skia-canvas
NOTE: Binaries have GPU disabled by default
v1.1.1-mp
Fixes
- Fixed issue in
Path2D::add_ellipse()
(basis for context and pathellipse()
andarc()
JS API) where trying to draw a complete circle from certain angle combinations produced nothing (eg. -90° to 270° clockwise). (bb99a3ad) - Fixed a missed
get_picture()
call inwindow
class missing required parameter since v1.1.0, breaking those builds. (2f8b175d)
Improvements
CanvasRenderingContext2D.transform()
can now accept aDOMMatrix
instance as the argument (like the similar Path2D method). (b6b31c04)- Minor optimization in
add_ellipse()
as it now skips transform creation if there is no rotation to be applied (as with anyarc()
call). (bb99a3ad) - Added option to "properly" draw ellipses spanning more than 360 degrees. The default method always stops at 360 even if the user wanted the ending point further along the path (eg. 0° to 450°). This option "fixes" that behavior, but is non-standard (not how browsers draw it). The option is settable via an
SKIA_CANVAS_DRAW_ELLIPSE_PAST_FULL_CIRCLE
environment variable ("1" to enable). (f1864b86)
Other
- Released binaries are now built with support for
Window
. - Package name has been scoped to "@mpaperno/skia-canvas".
NOTE: Binaries have GPU disabled by default
v1.1.0-mp
New Features
- Added ability to specify a crop area when rendering/exporting the canvas with
toBuffer()
,saveAs()
, etc. using newleft
,top
,width
, andheight
options. (08128c7e) - Added option to export canvas as raw pixel data. Adds 'raw' as an option to existing methods as well as dedicated
toRaw()
andtoImageData()
methods (both are async only). The color type and pre-multiplied attributes of the generated pixels can be specified as options. (a2dbd258) - Added functionality to load images from decoded pixel buffers. Thanks to @Salmondx for PR #147! (7c5cbcdc)
- Extend the JS lib
ImageData
type withcolorType
,premultiplied
, andbytesPerPixel
properties. (40a50f18) - Added JS lib
colorTypeBytesPerPixel()
utility function to look up channel counts for various image format.
Fixes
- Fix missing return type on
roundRect()
methods in TypeScript definitions. (b959f0a3)
All new features have been documented in the main README.
NOTE: Binaries have GPU disabled by default and NO Window
class support.