# CanvasKit Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Added - `SkPath.addRoundRect`, `SkPath.reset`, `SkPath.rewind` exposed. - `SkCanvas.drawArc`, `SkCanvas.drawLine`, `SkCanvas.drawOval`, `SkCanvas.drawRoundRect` exposed. - Can import/export a SkPath to an array of commands. See `CanvasKit.MakePathFromCmds` and `SkPath.toCmds`. - `SkCanvas.drawTextBlob()` and `SkCanvas.SkTextBlob.MakeFromText()` to draw text to a canvas. - `CanvasKit.TextEncoding` enum. For use with `SkTextBlob`. ### Changed - `SkCanvas.drawText()` now requires an `SkFont` object. ### Removed - `SkPaint.setTextSize()`, `SkPaint.getTextSize()`, `SkPaint.setTypeface()` which should be replaced by using `SkFont`. ### Fixed - Potential bug in `ready()` if already loaded. ## [0.3.1] - 2019-01-04 ### Added - `SkFont` now exposed. - `MakeCanvasSurface` can now take a canvas element directly. - `MakeWebGLCanvasSurface` can now take a WebGL context as an integer and use it directly. ### Changed - `CanvasKitInit(...).then()` is no longer the recommended way to initialize things. It will be removed in 0.4.0. Use `CanvasKitInit(...).ready()`, which returns a real Promise. ### Removed - `SkPaint.measureText` - use `SkFont.measureText` instead. ## [0.3.0] - 2018-12-18 ### Added - Add Canvas2D JS layer. This mirrors the HTML Canvas API. This may be omitted at compile time it by adding `no_canvas` to the `compile.sh` invocation. - `CanvasKit.FontMgr.DefaultRef()` and `fontmgr.MakeTypefaceFromData` to load fonts. - Exposed `SkPath.setVolatile`. Some animations see performance improvements by setting their paths' volatility to true. ### Fixed - `SkPath.addRect` now correctly draws counter-clockwise vs clockwise. ### Changed - `CanvasKit.MakeImageShader` no longer takes encoded bytes, but an `SkImage`, created from `CanvasKit.MakeImageFromEncoded`. Additionally, the optional parameters `clampIfUnpremul` and `localMatrix` have been exposed. - `SkPath.arcTo` now takes `startAngle`, `sweepAngle`, `forceMoveTo` as additional parameters. - `SkPath.stroke` has a new option `precision` It defaults to 1.0. - CanvasKit comes with one font (NotoMono) instead of the Skia TestTypeface. Clients are encouraged to use the new `fontmgr.MakeTypefaceFromData` for more font variety. ### Removed - `CanvasKit.initFonts()` - no longer needed. ## [0.2.1] - 2018-11-20 Beginning of Changelog history