Heart-shaped outline causes artifacts

I’m making a Zelda heart container, but using a heart-shaped outlined causes Apple’s rendering to create an artifact. This is because the outer outline renders the top curve of the heart with a little bow, which sticks out of the outline.

Workaround is of course to convert it to paths, but it would be nice if that wasn’t necessary.

Sent you an e-mail with the file.

I think I’ve solved this one now.

The cause was to do with the stroke position outside code. It generates the ‘stroke’ by using the path’s points as one side of the stroke, and offsetting them outwards to form the other side. There’s a general issue where at corners this can cause the stroke to ‘overshoot’. Previously, I’d had code to trim the overshoots at corners made of straight lines. But curved line corners, like the top of your heart, had been overlooked.

I’m currently working on making sure the new code isn’t a performance regression. (Like most of the vector manipulation in McKinley, there’s a ‘solve it mathematically’ correct path, and a ‘solve it by brute force and re-derive the interpolatable nodes afterwards’ fallback path for cases I haven’t anticipated. Both of these need to be fast enough to not hold things up!)