In general colors can be specified as Imager::Color or Imager::Color::Float objects. The fill object will typically store both types and convert from one to the other. If a fill takes 2 color objects they should have the same type.

hatch - The type of hatch to perform, this can either be the numeric index of the hatch (not recommended), the symbolic name of the hatch, or an array of 8 integers which specify the pattern of the hatch.

Hatches are represented as cells 8x8 arrays of bits, which limits their complexity.

fg, bg - The fg color is rendered where bits are set in the hatch, and the bg where they are clear. If you use a transparent fg or bg, and set combine, you can overlay the hatch onto an existing image.

This fills the given region with a fountain fill. This is exactly the same fill as the fountain filter, but is restricted to the shape you are drawing, and the fountain parameter supplies the fill type, and is required.

A radial fill from white to transparent centered on (50, 50) with a 50 pixel radius:

Fills the given image with a tiled version of the given image. The first non-zero value of xoff or yoff will provide an offset along the given axis between rows or columns of tiles respectively.

The matrix parameter performs a co-ordinate transformation from the co-ordinates in the target image to the fill image co-ordinates. Linear interpolation is used to determine the fill pixel. You can use the Imager::Matrix2d class to create transformation matrices.

This can be used to make a fill that is a more translucent or opaque version of an existing fill. This is intended for use where you receive a fill object as a parameter and need to change the opacity.

Parameters:

type => "opacity" - Required

other - the fill to produce a modified version of. This must be an Imager::Fill object. Required.