NAME

annotate - Methods to Annotate an Image


SYNOPSIS

unsigned int AnnotateImage( Image *image, DrawInfo *draw_info );

unicode= ConvertTextToUnicode( text, count );

unsigned int GetTypeMetrics( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );


FUNCTION DESCRIPTIONS

AnnotateImage

AnnotateImage() annotates an image with text. Optionally you can include any of the following bits of information about the image by embedding the appropriate special characters:

The format of the AnnotateImage method is:

unsigned int AnnotateImage ( Image *image, DrawInfo *draw_info );

A description of each parameter follows:

status:
Method AnnotateImage returns True if the image is annotated otherwise False.

image:
The image.

draw_info:
The draw info.

ConvertTextToUnicode

Method ConvertTextToUnicode converts an ASCII text string to Unicode and returns the Unicode translation and the character count. Normal characters are just copied.

The format of the ConvertTextToUnicode function is:

unicode=ConvertTextToUnicode ( text, count );

A description of each parameter follows:

unicode:
Method ConvertTextToUnicode returns a pointer to an unsigned short array representing the Unicode translation of the ASCII string.

text:
Specifies a pointer to a character array that contains the text to convert.

count:
The number of characters that were translated from ASCII to Unicode is returned in this unsigned integer pointer.

GetTypeMetrics

GetTypeMetrics() returns the following information for the specified font and text:

o
character width o character height o ascent o descent o text width o text height o maximum horizontal advance

The format of the GetTypeMetrics method is:

unsigned int GetTypeMetrics ( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );

A description of each parameter follows:

image:
The image.

draw_info:
The draw info.

metrics:
Return the font metrics in this structure.