In some case drawing on canvas has unexpected result.
For example let’s draw shape with fill, stroke and opacity.
As stroke are drawn on top of fill. There’s a line of half the size of the stroke inside the shape which is darker
because it’s the intersection of the fill and the stroke.
Probably that is not expected for you. So KonvaJS fix such behaviour with using buffer canvas.
In this case KonvaJS doing this:
- Draw shape on buffer canvas
- Fill and stroke it WITHOUT opacity
- Apply opacity on layer’s canvas
- Then draw on layer canvas result from buffer
But using buffer canvas might drop performace. So you can disable such fixing:
See differens here: