Rename Color#getCanvasStyle() to #toCanvasStyle().

This commit is contained in:
Jürg Lehni 2013-03-05 19:58:41 -08:00
parent 52af99de6b
commit 0e72dbd2e0
3 changed files with 4 additions and 4 deletions

View file

@ -507,7 +507,7 @@ var Color = this.Color = Base.extend(new function() {
return css;
},
getCanvasStyle: function() {
toCanvasStyle: function() {
return this.toCss();
}

View file

@ -237,7 +237,7 @@ var GradientColor = this.GradientColor = Color.extend(/** @lends GradientColor#
return this;
},
getCanvasStyle: function(ctx) {
toCanvasStyle: function(ctx) {
var gradient,
stops = this.gradient._stops;
if (this.gradient._type === 'LinearGradient') {

View file

@ -2656,9 +2656,9 @@ var Item = this.Item = Base.extend(Callback, {
if (limit)
ctx.miterLimit = limit;
if (fillColor)
ctx.fillStyle = fillColor.getCanvasStyle(ctx);
ctx.fillStyle = fillColor.toCanvasStyle(ctx);
if (strokeColor) {
ctx.strokeStyle = strokeColor.getCanvasStyle(ctx);
ctx.strokeStyle = strokeColor.toCanvasStyle(ctx);
if (paper.support.nativeDash && dashArray && dashArray.length) {
if ('setLineDash' in ctx) {
ctx.setLineDash(dashArray);