Fix bug in CompoundPath where toCssString was being called instead of getCanvasStyle, resulting in problems when gradients were used.

This commit is contained in:
Jonathan Puckey 2011-05-12 15:30:56 +02:00
parent 2fd1873b1a
commit 032d19b0d2

View file

@ -56,11 +56,11 @@ var CompoundPath = this.CompoundPath = PathItem.extend({
var fillColor = firstChild.getFillColor(),
strokeColor = firstChild.getStrokeColor();
if (fillColor) {
ctx.fillStyle = fillColor.toCssString();
ctx.fillStyle = fillColor.getCanvasStyle(ctx);
ctx.fill();
}
if (strokeColor) {
ctx.strokeStyle = strokeColor.toCssString();
ctx.strokeStyle = strokeColor.getCanvasStyle(ctx);
ctx.stroke();
}
}