Closed kwhitefoot closed 2 years ago
I can reproduce the crash using an internal call:
import pixie/paths {.all.}
block:
let
mask = newMask(100, 100)
mask.fillShapes(@[@[vec2(0, 0), vec2(0, 1)]], EvenOdd, NormalBlend)
Do you have a simple test case that can cause this with just the public API?
Oh I was able to make it happen:
let
mask = newMask(100, 100)
pathStr = "M0 0 L0 1 L0 0 Z"
mask.fillPath(pathStr)```
Sorry about not providing a test for it. I discovered it by inspection while browsing the code.
fillShapes(image: Image, ... checks for pathWidth == 0 and returns early when it is which avoids
"index out of bounds, the container is empty" when attempting to access coverages[0].
fillShapes(mask: Mask, ... should perform the same check.