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

Method AnnotateImage annotates an image with text. Optionally the annotation can include the image filename, type, width, height, or scene

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

Method GetTypeMetrics returns the following information for the specified font and text:

o
character width, expressed in integer pixels o character height, expressed in integer pixels o ascent, expressed in 26.6 fixed point pixels o descent, expressed in 26.6 fixed point pixels o text width, expressed in 26.6 fixed point pixels o text height, expressed in 26.6 fixed point pixels o maximum horizontal advance, expressed in 26.6 fixed point pixels

The format of the GetTypeMetrics method is:

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

A description of each parameter follows:

status:
Method GetTypeMetrics returns True if the metrics are available otherwise False.

image:
The image.

draw_info:
The draw info.

metrics:
Updated with font metrics.