Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6
@@ -11,2 +11,4 @@ const Canvas = require('./lib/canvas') | ||
const JPEGStream = require('./lib/jpegstream') | ||
const DOMMatrix = require('./lib/DOMMatrix').DOMMatrix | ||
const DOMPoint = require('./lib/DOMMatrix').DOMPoint | ||
@@ -54,2 +56,3 @@ function createCanvas (width, height, type) { | ||
CanvasRenderingContext2D, | ||
CanvasGradient: bindings.CanvasGradient, | ||
CanvasPattern: bindings.CanvasPattern, | ||
@@ -61,2 +64,4 @@ Image, | ||
JPEGStream, | ||
DOMMatrix, | ||
DOMPoint, | ||
@@ -63,0 +68,0 @@ registerFont, |
@@ -19,2 +19,3 @@ 'use strict'; | ||
const ImageData = bindings.ImageData | ||
const DOMMatrix = require('./DOMMatrix').DOMMatrix | ||
@@ -107,2 +108,16 @@ /** | ||
Object.defineProperty(Context2d.prototype, 'currentTransform', { | ||
get: function () { | ||
var values = new Float64Array(6) | ||
this._getMatrix(values) | ||
return new DOMMatrix(values) | ||
}, | ||
set: function (m) { | ||
if (!(m instanceof DOMMatrix)) { | ||
throw new TypeError('Expected DOMMatrix') | ||
} | ||
this.setTransform(m.a, m.b, m.c, m.d, m.e, m.f) | ||
} | ||
}) | ||
/** | ||
@@ -109,0 +124,0 @@ * Set the fill style with the given css color string. |
{ | ||
"name": "canvas", | ||
"description": "Canvas graphics API backed by Cairo", | ||
"version": "2.0.0-alpha.5", | ||
"version": "2.0.0-alpha.6", | ||
"author": "TJ Holowaychuk <tj@learnboost.com>", | ||
@@ -6,0 +6,0 @@ "browser": "browser.js", |
@@ -5,5 +5,6 @@ # node-canvas | ||
## This is the documentation for the unreleased version 2.0 | ||
## This is the documentation for version 2.0.0-alpha | ||
Alpha versions of 2.0 can be installed using `npm install canvas@next`. | ||
**For the current version 1.x documentation, see [the v1.x branch](https://github.com/Automattic/node-canvas/tree/v1.x)** | ||
**For version 1.x documentation, see [the v1.x branch](https://github.com/Automattic/node-canvas/tree/v1.x)** | ||
@@ -10,0 +11,0 @@ ----- |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
289183
55
1391
474