Skip to content

Commit

Permalink
ctx.shadow = ''
Browse files Browse the repository at this point in the history
  • Loading branch information
theshock committed Jul 18, 2011
1 parent e233823 commit 9e53303
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 13 additions & 4 deletions Source/Core/Context2D.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,19 @@ LibCanvas.Context2D = atom.Class({
get height() { return this.canvas.height; },
set width (width) { this.canvas.width = width; },
set height(height) { this.canvas.height = height;},


get shadow () {
return [this.shadowOffsetX, this.shadowOffsetY, this.shadowBlur, this.shadowColor].join( ' ' );
},

set shadow (value) {
value = value.join( ' ' );
this.shadowOffsetX = value[0];
this.shadowOffsetY = value[1];
this.shadowBlur = value[2];
this.shadowColor = value[3];
},

_rectangle: null,
get rectangle () {
var rect = this._rectangle;
Expand Down Expand Up @@ -633,9 +645,6 @@ LibCanvas.Context2D = atom.Class({
toString: Function.lambda('[object LibCanvas.Context2D]')
// Such moz* methods wasn't duplicated:
// mozTextStyle, mozDrawText, mozMeasureText, mozPathText, mozTextAlongPath

// is this just properties , that can be used by set ?
// shadowOffsetX shadowOffsetY shadowBlur shadowColor
});

var addColorStop = function () {
Expand Down
17 changes: 13 additions & 4 deletions libcanvas-full-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,19 @@ LibCanvas.Context2D = atom.Class({
get height() { return this.canvas.height; },
set width (width) { this.canvas.width = width; },
set height(height) { this.canvas.height = height;},


get shadow () {
return [this.shadowOffsetX, this.shadowOffsetY, this.shadowBlur, this.shadowColor].join( ' ' );
},

set shadow (value) {
value = value.join( ' ' );
this.shadowOffsetX = value[0];
this.shadowOffsetY = value[1];
this.shadowBlur = value[2];
this.shadowColor = value[3];
},

_rectangle: null,
get rectangle () {
var rect = this._rectangle;
Expand Down Expand Up @@ -4179,9 +4191,6 @@ LibCanvas.Context2D = atom.Class({
toString: Function.lambda('[object LibCanvas.Context2D]')
// Such moz* methods wasn't duplicated:
// mozTextStyle, mozDrawText, mozMeasureText, mozPathText, mozTextAlongPath

// is this just properties , that can be used by set ?
// shadowOffsetX shadowOffsetY shadowBlur shadowColor
});

var addColorStop = function () {
Expand Down

0 comments on commit 9e53303

Please sign in to comment.