annotate - Methods to Annotate an Image
unsigned int AnnotateImage( Image *image, DrawInfo *draw_info );
encoding= EncodeSJIS( text, count );
unicode= EncodeUnicode( text, count );
unsigned int GetTypeMetrics( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );
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:
EncodeSJIS() converts an ASCII text string to 2-bytes per character code ( like UCS-2 ) . Returns the translated codes and the character count. Characters under 0x7f are just copied, characters over 0x80 are tied with the next character.
Method contributed by Katsutoshi Shibuya.
The format of the EncodeSJIS function is:
encoding=EncodeSJIS ( text, count );
A description of each parameter follows:
EncodeSJIS()
returns a pointer to an unsigned short array representing the encoded version of the
ASCII string.
EncodeUnicode() 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 EncodeUnicode function is:
unicode=EncodeUnicode ( text, count );
A description of each parameter follows:
EncodeUnicode()
returns a pointer to an unsigned short array array representing the encoded version of the
ASCII string.
GetTypeMetrics() returns the following information for the specified font and text:
The format of the GetTypeMetrics method is:
unsigned int GetTypeMetrics ( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );
A description of each parameter follows: