Annotate an image with text
Contents
AnnotateImage() annotates an image with DrawInfo 'text' based on other parameters from DrawInfo such as 'affine', 'align', 'decorate', and 'gravity'.
Originally this function additionally transformed 'text' using TranslateText() but it no longer does so as of GraphicsMagick 1.3.32.
The format of the AnnotateImage method is:
MagickPassFail AnnotateImage( Image *image, DrawInfo *draw_info );
A description of each parameter follows:
Method AnnotateImage returns MagickPass if the image is annotated otherwise MagickFail.
The image.
The draw info.
unsigned int GetTypeMetrics( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );
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 o underline position o underline thickness
The format of the GetTypeMetrics method is:
unsigned int GetTypeMetrics( Image *image, const DrawInfo *draw_info, TypeMetric *metrics );
The image.
The draw info.
Return the font metrics in this structure.
Copyright © GraphicsMagick Group 2002 - 2023