hooked opacity rendering into the buffer canvas logic used for shadows so that strokes and fill opacities aren't applied separately

This commit is contained in:
Eric Rowell
2013-09-28 20:34:42 -07:00
parent e530a4697a
commit a8cbc2321d
2 changed files with 30 additions and 11 deletions

View File

@@ -1911,12 +1911,22 @@ suite('Node', function() {
radius: 70,
fill: 'green',
stroke: 'black',
strokeWidth: 4
strokeWidth: 20,
draggable: true
});
circle.setOpacity(0.5);
layer.add(circle);
stage.add(layer);
var sceneTrace = layer.getContext().getTrace();
//console.log(sceneTrace);
var bufferTrace = stage.bufferCanvas.getContext().getTrace();
//console.log(bufferTrace);
assert.equal(sceneTrace, 'clearRect(0,0,578,200);save();globalAlpha=0.5;drawImage([object HTMLCanvasElement],0,0);restore();');
assert.equal(bufferTrace, 'clearRect(0,0,578,200);save();transform(1,0,0,1,289,100);beginPath();arc(0,0,70,0,6.283,false);closePath();fillStyle=green;fill();lineWidth=20;strokeStyle=black;stroke();restore();');
});
// ======================================================