mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Clean-up previous commit.
This commit is contained in:
parent
c6bcf4351a
commit
0a196daa21
1 changed files with 24 additions and 26 deletions
|
@ -3919,13 +3919,12 @@ new function() { // // Scope to inject various item event handlers
|
||||||
// We can access internal properties since we're only using this on
|
// We can access internal properties since we're only using this on
|
||||||
// items without children, where styles would be merged.
|
// items without children, where styles would be merged.
|
||||||
var style = this._style;
|
var style = this._style;
|
||||||
if (style.hasFill())
|
if (style.hasFill()) {
|
||||||
ctx.fillStyle = style.getFillColor().toCanvasStyle(ctx);
|
ctx.fillStyle = style.getFillColor().toCanvasStyle(ctx);
|
||||||
|
}
|
||||||
if (style.hasStroke()) {
|
if (style.hasStroke()) {
|
||||||
var strokeWidth = style.getStrokeWidth();
|
|
||||||
if (strokeWidth > 0) {
|
|
||||||
ctx.strokeStyle = style.getStrokeColor().toCanvasStyle(ctx);
|
ctx.strokeStyle = style.getStrokeColor().toCanvasStyle(ctx);
|
||||||
ctx.lineWidth = strokeWidth;
|
ctx.lineWidth = style.getStrokeWidth();
|
||||||
var strokeJoin = style.getStrokeJoin(),
|
var strokeJoin = style.getStrokeJoin(),
|
||||||
strokeCap = style.getStrokeCap(),
|
strokeCap = style.getStrokeCap(),
|
||||||
miterLimit = style.getMiterLimit();
|
miterLimit = style.getMiterLimit();
|
||||||
|
@ -3949,11 +3948,10 @@ new function() { // // Scope to inject various item event handlers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (style.hasShadow()) {
|
if (style.hasShadow()) {
|
||||||
var offset = this.getShadowOffset();
|
|
||||||
ctx.shadowColor = style.getShadowColor().toCanvasStyle(ctx);
|
ctx.shadowColor = style.getShadowColor().toCanvasStyle(ctx);
|
||||||
ctx.shadowBlur = style.getShadowBlur();
|
ctx.shadowBlur = style.getShadowBlur();
|
||||||
|
var offset = this.getShadowOffset();
|
||||||
ctx.shadowOffsetX = offset.x;
|
ctx.shadowOffsetX = offset.x;
|
||||||
ctx.shadowOffsetY = offset.y;
|
ctx.shadowOffsetY = offset.y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue