NAME

draw - Methods to Draw on an Image


SYNOPSIS

void ColorFloodfillImage( Image *image, const PixelPacket *target, Image *tile, const int x_offset, const int y_offset, const PaintMethod method );

void DrawImage( Image *image, const AnnotateInfo *annotate_info );

void MatteFloodfillImage( Image *image, const PixelPacket *target, const unsigned int matte, const int x_offset, const int y_offset, const PaintMethod method );

void OpaqueImage( Image *image, const char *opaque_color, const char *pen_color );


FUNCTION DESCRIPTIONS


ColorFloodfillImage

Method ColorFloodfillImage floodfills the designated area with a color. The floodfill algorithm is strongly based on a similar algorithm in ``Graphics Gems'' by Paul Heckbert.

The format of the ColorFloodfillImage method is:

void ColorFloodfillImage ( Image *image, const PixelPacket *target, Image *tile, const int x_offset, const int y_offset, const PaintMethod method );

A description of each parameter follows:

image:

The address of a structure of type Image.

target:

A PixelPacket structure. This is the RGB value of the target color.

tile:

An image representing the image to tile onto the floodplane.

x,y:

Unsigned integers representing the current location of the pen.

method:

drawing method of type PrimitiveType: floodfill or fill to border.


DrawImage

Method DrawImage draws a primitive (line, rectangle, ellipse) on the image.

The format of the DrawImage method is:

void DrawImage ( Image *image, const AnnotateInfo *annotate_info );

A description of each parameter follows:

image:

The address of a structure of type Image.

annotate_info:

The address of a DrawInfo structure.


MatteFloodfillImage

Method MatteFloodfillImage floodfills the designated area with a matte value. The floodfill algorithm is strongly based on a similar algorithm in ``Graphics Gems'' by Paul Heckbert.

The format of the MatteFloodfillImage method is:

void MatteFloodfillImage ( Image *image, const PixelPacket *target, const unsigned int matte, const int x_offset, const int y_offset, const PaintMethod method );

A description of each parameter follows:

image:

The address of a structure of type Image.

target:

A PixelPacket structure. This is the RGB value of the target color.

matte:

A integer value representing the amount of transparency.

x,y:

Unsigned integers representing the current location of the pen.

method:

drawing method of type PrimitiveType: floodfill or fill to border.


OpaqueImage

Method OpaqueImage changes the color of an opaque pixel to the pen color.

The format of the OpaqueImage method is:

void OpaqueImage ( Image *image, const char *opaque_color, const char *pen_color );

A description of each parameter follows:

image:

The address of a structure of type Image; returned from ReadImage.

opaque_color, pen_color:

A character string that contain an X11 color string.