kyranet / canvas-constructor

An ES6 utility for canvas with built-in functions and chained methods.
https://canvasconstructor.js.org
MIT License
116 stars 23 forks source link

refactor: add `@napi-rs/canvas` support, remove base #480

Closed kyranet closed 2 years ago

kyranet commented 2 years ago

Pending to add the @napi-rs/canvas extensions

Changelog

Breaking changes

Commit body ``` feat: added `/napi-rs` engine feat: added `createImageData()` feat: added `createConicGradient()` feat: added `printConicColorGradient()` feat: added `printConicStrokeGradient()` refactor: renamed `resolveImage` to `loadImage` refactor: renamed `registerFont` to `loadFont` feat(cairo): added `jpeg()` feat(cairo): added `jpegAsync()` feat(cairo): added `pdf()` feat(cairo): added `pdfAsync()` feat(cairo): added `png()` feat(cairo): added `pngAsync()` feat(skia): added `jpegAsync()` feat(skia): added `pdfAsync()` feat(skia): added `pngAsync()` feat(skia): added `svgAsync()` docs: add `@note`s defining which methods are engine-specific BREAKING CHANGE: refactor: removed `cb` parameter in `getImageData()` BREAKING CHANGE: refactor: removed `cb` parameter in `measureText()` BREAKING CHANGE: refactor: removed `cb` parameter in `createPattern()` BREAKING CHANGE: refactor: removed `cb` parameter in `wrapText()` BREAKING CHANGE: refactor(cairo): renamed `createJPEGStream()` to `jpegStream()` BREAKING CHANGE: refactor(cairo): renamed `createPDFStream()` to `pdfStream()` BREAKING CHANGE: refactor(cairo): renamed `createPNGStream()` to `pngStream()` BREAKING CHANGE: refactor(cairo): renamed `setAntiAliasing()` to `setAntialiasMode()` BREAKING CHANGE: refactor(skia): `jpg()` now returns a synchronous response BREAKING CHANGE: refactor(skia): `pdf()` now returns a synchronous response BREAKING CHANGE: refactor(skia): `png()` now returns a synchronous response BREAKING CHANGE: refactor(skia): `svg()` now returns a synchronous response BREAKING CHANGE: refactor(skia): removed `cb` parameter in `getFontVariant()` BREAKING CHANGE: refactor(skia): removed `cb` parameter in `getTextTracking()` BREAKING CHANGE: refactor(skia): removed `cb` parameter in `getTextWrap()` BREAKING CHANGE: refactor(skia): renamed `getPages()` to `get pages` BREAKING CHANGE: refactor(skia): renamed `jpg()` to `jpeg()` BREAKING CHANGE: refactor(skia): renamed `newPages()` to `addPage()` ```