Browse Source

Normalizing strokeStyle and shadowColor

v1.x
Tj Holowaychuk 15 years ago
parent
commit
f738021967
  1. 11
      lib/canvas.js

11
lib/canvas.js

@ -293,11 +293,7 @@ Context2d.prototype.__defineSetter__('strokeStyle', function(val){
* @api public
*/
Context2d.prototype.__defineGetter__('strokeStyle', function(){
var rgba = this.lastStrokeStyle;
return 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';
});
Context2d.prototype.__defineGetter__('strokeStyle', normalizedColor('lastStrokeStyle'));
/**
* Set the shadow color with the given css color string.
*
@ -325,7 +321,4 @@ Context2d.prototype.__defineSetter__('shadowColor', function(val){
* @api public
*/
Context2d.prototype.__defineGetter__('shadowColor', function(){
var rgba = this.lastShadowColor;
return 'rgba(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ',' + rgba[3] + ')';
});
Context2d.prototype.__defineGetter__('shadowColor', normalizedColor('lastShadowColor'));

Loading…
Cancel
Save