A family of new algorithms for soft filling

Soft filling algorithms change the color of an anti-aliased region, maintaining the anti-aliasing of the region. The two published algorithms for soft filling work only if the foreground region is anti-aliased against a black background. This paper presents three new algorithms. The first fills against a region consisting of any two distinct colors, and is faster than the published algorithms on a pixel-by-pixel basis for an RGB frame buffer; the second fills against a region composed of three distinct colors; and the third fills against a region composed of four distinct colors. As the power of the algorithms increases, so do the number of assumptions they make, and the computational cost.