Closed megaboich closed 7 years ago
After some investigation I discovered that floodFill does not like traslated context.
I was able to fix behavior altering fill
method in turtle.js
fill: {value: function() {
this.canvas_ctx.save();
this.canvas_ctx.setTransform(1, 0, 0, 1, 0, 0);
this.canvas_ctx.floodFill(this.x + this.width/2, - this.y + this.height/2);
this.canvas_ctx.restore();
}},
Thanks for the report, and sorry about the regression!
Well, i am not sure why this is happening, but looks like fill operation is not working. Sample program:
I would expect to have filled circle as a result. Instead I have only one pixel at the center of circle.
I played a bit with floodfill.js - looks like something wrong is happening inside
getColorAt
function, but I do not really understand the code, it is quite cryptic because of optimizations. And it is not quite clear why it is not working anymore, that code has not been changed for ages.