1# CanvasKit Changelog 2All notable changes to this project will be documented in this file. 3 4The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 7## [Unreleased] 8 9### Added 10 - `SkPath.addRoundRect`, `SkPath.reset`, `SkPath.rewind` exposed. 11 - `SkCanvas.drawArc`, `SkCanvas.drawLine`, `SkCanvas.drawOval`, `SkCanvas.drawRoundRect` exposed. 12 - Can import/export a SkPath to an array of commands. See `CanvasKit.MakePathFromCmds` and 13 `SkPath.toCmds`. 14 - `SkCanvas.drawTextBlob()` and `SkCanvas.SkTextBlob.MakeFromText()` to draw text to a canvas. 15 - `CanvasKit.TextEncoding` enum. For use with `SkTextBlob`. 16 17### Changed 18 - `SkCanvas.drawText()` now requires an `SkFont` object. 19 20### Removed 21 - `SkPaint.setTextSize()`, `SkPaint.getTextSize()`, `SkPaint.setTypeface()` 22 which should be replaced by using `SkFont`. 23 24 25### Fixed 26 - Potential bug in `ready()` if already loaded. 27 28## [0.3.1] - 2019-01-04 29### Added 30 - `SkFont` now exposed. 31 - `MakeCanvasSurface` can now take a canvas element directly. 32 - `MakeWebGLCanvasSurface` can now take a WebGL context as an integer and use it directly. 33 34### Changed 35 - `CanvasKitInit(...).then()` is no longer the recommended way to initialize things. 36It will be removed in 0.4.0. Use `CanvasKitInit(...).ready()`, which returns a real Promise. 37 38### Removed 39- `SkPaint.measureText` - use `SkFont.measureText` instead. 40 41## [0.3.0] - 2018-12-18 42 43### Added 44- Add Canvas2D JS layer. This mirrors the HTML Canvas API. This may be omitted at compile time 45 it by adding `no_canvas` to the `compile.sh` invocation. 46- `CanvasKit.FontMgr.DefaultRef()` and `fontmgr.MakeTypefaceFromData` to load fonts. 47- Exposed `SkPath.setVolatile`. Some animations see performance improvements by setting 48their paths' volatility to true. 49 50### Fixed 51- `SkPath.addRect` now correctly draws counter-clockwise vs clockwise. 52 53### Changed 54- `CanvasKit.MakeImageShader` no longer takes encoded bytes, but an `SkImage`, created from 55 `CanvasKit.MakeImageFromEncoded`. Additionally, the optional parameters `clampIfUnpremul` 56 and `localMatrix` have been exposed. 57- `SkPath.arcTo` now takes `startAngle`, `sweepAngle`, `forceMoveTo` as additional parameters. 58- `SkPath.stroke` has a new option `precision` It defaults to 1.0. 59- CanvasKit comes with one font (NotoMono) instead of the Skia TestTypeface. Clients are encouraged 60 to use the new `fontmgr.MakeTypefaceFromData` for more font variety. 61 62### Removed 63- `CanvasKit.initFonts()` - no longer needed. 64 65 66## [0.2.1] - 2018-11-20 67Beginning of Changelog history