mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Rename Color#getCanvasStyle() to #toCanvasStyle().
This commit is contained in:
parent
52af99de6b
commit
0e72dbd2e0
3 changed files with 4 additions and 4 deletions
|
@ -507,7 +507,7 @@ var Color = this.Color = Base.extend(new function() {
|
|||
return css;
|
||||
},
|
||||
|
||||
getCanvasStyle: function() {
|
||||
toCanvasStyle: function() {
|
||||
return this.toCss();
|
||||
}
|
||||
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue