Fill falls short by 1 pixel
The fill seems to be falling short by 1 pixel in all directions. This could be from the colors mixing along the edge and not being the same color. Either way I'd love it if the fill could be extended by the extra pixel. I threw a screenshot so you know what I am talking about
@jflinter I hacked around and got it to work for me for now, but I probably slowed down the algorithm
@dylangwight - I sadly don't have time to work on this right now, although I'll review a PR if you send it my way (although I won't want to merge anything that slows things down). Have you played with the tolerance parameter?
@dgwight What was the hack you used for this problem?
@dgwight What was the hack you used for this problem?
It isn't due to the fill algorithm, it's due to antialiasing being turned on for the graphics context. A small antialiased strand is being drawn around the paths which remains after the fill operation. Best way to fix it is really just to draw the shapes without antialiasing. This bit of code fixes it: let context = UIGraphicsGetCurrentContext() context?.setShouldAntialias(false)