Fills

tonyc on 2001-09-03T06:30:25

On Friday my time, lathos asked about doing hatched fills in Imager.

So I implemented hatched fills.

Rather than just implementing hatched versions of the current i_box_filled() and i_arc() functions I created a new Imager object - a fill object. These can currently be used with arcs, boxes and the flood fill, which Addi had implemented, but hadn't written an OO interface for.

So now we have hatched fills, I also added a solid fill object (which could merge alpha values), and took the fountain fill code to build a fountain fill. So now you can flood fill with a fountain (or gradient) fill

Today I realized the combine option could have been more powerful - currently it's just a flag, either to replace the current color, or to do basic alpha merging. When I get time (soon, I hope), I'll implement some of the types of merging you get from software like the GIMP, such as addition, hue only, value only, and so on.