Skip to content

Releases: mpaperno/skia-canvas

v1.1.1-mp

25 Sep 14:08
94fb310
Compare
Choose a tag to compare

Fixes

  • Fixed issue in Path2D::add_ellipse() (basis for context and path ellipse() and arc() 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 in window class missing required parameter since v1.1.0, breaking those builds. (2f8b175d)

Improvements

  • CanvasRenderingContext2D.transform() can now accept a DOMMatrix 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 any arc() 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".

Full change log.

NOTE: Binaries have GPU disabled by default

v1.1.0-mp

09 Sep 01:42
a671e2e
Compare
Choose a tag to compare

New Features

  • Added ability to specify a crop area when rendering/exporting the canvas with toBuffer(), saveAs(), etc. using new left, top, width, and height options. (08128c7e)
  • Added option to export canvas as raw pixel data. Adds 'raw' as an option to existing methods as well as dedicated toRaw() and toImageData() 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 with colorType, premultiplied, and bytesPerPixel 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.

v1.0.3

16 Aug 20:30
57adfd4
Compare
Choose a tag to compare
v1.0.3 Pre-release
Pre-release

skia-canvas 1.0.3 - GPU disabled by default - no Window support.

v1.0.2

16 Aug 19:49
2360c06
Compare
Choose a tag to compare
v1.0.2 Pre-release
Pre-release

skia-canvas 1.0.2 binaries - no Window support