Mask on item over path are not correct.

Author: NanardCreated Jan 23, 2015Updated Aug 22, 2026
LabelsBug
ctx.fillStyle = "#FF0000";
ctx.lineTo(0, 100);
ctx.lineTo(100, 100);
ctx.lineTo(100, 0);
ctx.lineTo(0, 0);
ctx.fill();

ctx.save();
ctx.rect(0,0,50,50);
ctx.clip();

ctx.fillStyle = "#00FF00";
ctx.fillRect(0,0,100,100);
ctx.restore();

With this code, I'm getting this : 2015-01-23 15_30_17-hardcoded 500x500

But if I don't make a mistake, I should get this : 2015-01-23 15_25_35-hardcoded 500x500