Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvas

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

5

History.md
0.7.2 / 2011-08-30
==================
* Changed: prefix some private methods with _
0.7.1 / 2011-08-25

@@ -3,0 +8,0 @@ ==================

2

lib/canvas.js

@@ -31,3 +31,3 @@

exports.version = '0.7.1';
exports.version = '0.7.2';

@@ -34,0 +34,0 @@ /**

@@ -155,5 +155,5 @@

this.lastFillStyle = val;
this.setFillPattern(val);
this._setFillPattern(val);
} else if ('string' == typeof val) {
this.setFillColor(val);
this._setFillColor(val);
}

@@ -182,5 +182,5 @@ });

this.lastStrokeStyle = val;
this.setStrokePattern(val);
this._setStrokePattern(val);
} else if ('string' == typeof val) {
this.setStrokeColor(val);
this._setStrokeColor(val);
}

@@ -213,3 +213,3 @@ });

this.lastFontString = val;
this.setFont(
this._setFont(
font.weight

@@ -244,3 +244,3 @@ , font.style

this.lastBaseline = val;
this.setTextBaseline(n);
this._setTextBaseline(n);
}

@@ -268,3 +268,3 @@ });

case 'center':
this.setTextAlignment(0);
this._setTextAlignment(0);
this.lastTextAlignment = val;

@@ -274,3 +274,3 @@ break;

case 'start':
this.setTextAlignment(-1);
this._setTextAlignment(-1);
this.lastTextAlignment = val;

@@ -280,3 +280,3 @@ break;

case 'end':
this.setTextAlignment(1);
this._setTextAlignment(1);
this.lastTextAlignment = val;

@@ -283,0 +283,0 @@ break;

{ "name": "canvas"
, "description": "Canvas graphics API backed by Cairo"
, "version": "0.7.1"
, "version": "0.7.2"
, "author": "TJ Holowaychuk <tj@learnboost.com>"

@@ -5,0 +5,0 @@ , "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo"]

@@ -12,13 +12,18 @@

var img = new Image;
ctx.font = '20px Helvetica';
ctx.fillText('Testing', 100, 100);
img.onload = function(){
ctx.fillRect(100,100,80,90);
ctx.drawImage(img, 0, 0);
var out = fs.createWriteStream(__dirname + '/../test.png');
canvas.createPNGStream().on('data', function(chunk){
out.write(chunk);
});;
};
fs.writeFile('test.png', canvas.toBuffer());
img.src = __dirname + '/textures/black-marble.png';
// var img = new Image;
//
// img.onload = function(){
// ctx.fillRect(100,100,80,90);
// ctx.drawImage(img, 0, 0);
// var out = fs.createWriteStream(__dirname + '/../test.png');
// canvas.createPNGStream().on('data', function(chunk){
// out.write(chunk);
// });;
// };
//
// img.src = __dirname + '/textures/black-marble.png';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc