Skip to content

Commit

Permalink
Merge pull request #1028 from zbjornson/typos
Browse files Browse the repository at this point in the history
Fix two typos in require statements
  • Loading branch information
LinusU authored Nov 2, 2017
2 parents d3cd0c2 + 72f949a commit 9ae8fdc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/image-src.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var fs = require('fs')
var path = require(path)
var path = require('path')
var Canvas = require('..')

var Image = Canvas.Image
Expand Down
2 changes: 1 addition & 1 deletion lib/context2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Context2d = module.exports = bindings.CanvasRenderingContext2d
const CanvasGradient = bindings.CanvasGradient
const CanvasPattern = bindings.CanvasPattern
const ImageData = bindings.ImageData
const DOMMatrix = require('./DOMMatrix')
const DOMMatrix = require('./DOMMatrix').DOMMatrix

/**
* Text baselines.
Expand Down
14 changes: 14 additions & 0 deletions test/canvas.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,20 @@ describe('Canvas', function () {
});
});

it('Context2d#currentTransform', function () {
var canvas = createCanvas(20, 20);
var ctx = canvas.getContext('2d');

ctx.scale(0.1, 0.3);
var actual = ctx.currentTransform;
assert.equal(actual.a, 0.1);
assert.equal(actual.b, 0);
assert.equal(actual.c, 0);
assert.equal(actual.d, 0.3);
assert.equal(actual.e, 0);
assert.equal(actual.f, 0);
});

it('Context2d#createImageData(ImageData)', function () {
var canvas = createCanvas(20, 20)
, ctx = canvas.getContext('2d');
Expand Down

0 comments on commit 9ae8fdc

Please sign in to comment.