Comparing version 0.9.0 to 0.10.0
0.10.0 / 2012-01-18 | ||
================== | ||
* Added `ctx.createPattern()` [slaskis] | ||
0.9.0 / 2012-01-13 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -32,3 +32,3 @@ | ||
exports.version = '0.9.0'; | ||
exports.version = '0.10.0'; | ||
@@ -35,0 +35,0 @@ /** |
@@ -15,2 +15,3 @@ | ||
, CanvasGradient = canvas.CanvasGradient | ||
, CanvasPattern = canvas.CanvasPattern | ||
, ImageData = canvas.ImageData | ||
@@ -103,2 +104,16 @@ , PixelArray = canvas.CanvasPixelArray; | ||
/** | ||
* Create a pattern from `Image` or `Canvas`. | ||
* | ||
* @param {Image|Canvas} image | ||
* @param {String} repetition | ||
* @return {CanvasPattern} | ||
* @api public | ||
*/ | ||
Context2d.prototype.createPattern = function(image, repetition){ | ||
// TODO Use repetition (currently always 'repeat') | ||
return new CanvasPattern(image); | ||
}; | ||
/** | ||
* Create a linear gradient at the given point `(x0, y0)` and `(x1, y1)`. | ||
@@ -155,3 +170,4 @@ * | ||
Context2d.prototype.__defineSetter__('fillStyle', function(val){ | ||
if ('CanvasGradient' == val.constructor.name) { | ||
if ('CanvasGradient' == val.constructor.name | ||
|| 'CanvasPattern' == val.constructor.name) { | ||
this.lastFillStyle = val; | ||
@@ -182,3 +198,4 @@ this._setFillPattern(val); | ||
Context2d.prototype.__defineSetter__('strokeStyle', function(val){ | ||
if ('CanvasGradient' == val.constructor.name) { | ||
if ('CanvasGradient' == val.constructor.name | ||
|| 'CanvasPattern' == val.constructor.name) { | ||
this.lastStrokeStyle = val; | ||
@@ -185,0 +202,0 @@ this._setStrokePattern(val); |
{ "name": "canvas" | ||
, "description": "Canvas graphics API backed by Cairo" | ||
, "version": "0.9.0" | ||
, "version": "0.10.0" | ||
, "author": "TJ Holowaychuk <tj@learnboost.com>" | ||
@@ -5,0 +5,0 @@ , "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo", "image", "images"] |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
2
1
150089
37
619