1draw - Methods to Draw on an Image9/


NAME



"draw - Methods to Draw on an Image




(

SYNOPSIS



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

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

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

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




B

FUNCTION DESCRIPTIONS






>

ColorFloodfillImage



KMethod ColorFloodfillImage floodfills the designated area with a color. TheJfloodfill algorithm is strongly based on a similar algorithm in ``GraphicsGems'' by Paul Heckbert.

0The format of the ColorFloodfillImage method is:C

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:

7

image:


)The address of a structure of type Image.#

target:


:A PixelPacket structure. This is the 3RGB 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:


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






*

DrawImage



KMethod 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



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

0The format of the MatteFloodfillImage method is:1

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 3RGB 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:


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






.

OpaqueImage



IMethod 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:


BThe address of a structure of type Image; returned from ReadImage.4

opaque_color, pen_color:


8A character string that contain an &X11 color string.