render
Low-level methods to draw on an image
Contents
CloneDrawInfo
Synopsis
DrawInfo *CloneDrawInfo( const ImageInfo *image_info, const DrawInfo *draw_info );
Description
CloneDrawInfo() makes a copy of the given draw info structure. If NULL is specified, a new DrawInfo structure is created initialized to default values.
The format of the CloneDrawInfo method is:
DrawInfo *CloneDrawInfo( const ImageInfo *image_info, const DrawInfo *draw_info );
- image_info:
The image info.
- draw_info:
The draw info.
DestroyDrawInfo
Synopsis
void DestroyDrawInfo( DrawInfo *draw_info );
Description
DestroyDrawInfo() deallocates memory associated with an DrawInfo structure. Nothing is done if the pointer passed is NULL.
The format of the DestroyDrawInfo method is:
void DestroyDrawInfo( DrawInfo *draw_info );
A description of each parameter follows:
- draw_info:
The draw info.
DrawAffineImage
Synopsis
unsigned int DrawAffineImage( Image *image, const Image *composite, const AffineMatrix *affine );
Description
DrawAffineImage() composites the source over the destination image as dictated by the affine transform.
The format of the DrawAffineImage method is:
unsigned int DrawAffineImage( Image *image, const Image *composite, const AffineMatrix *affine );
- image:
The image.
- image:
The composite image.
- affine:
The affine transform.
DrawClipPath
Synopsis
MagickPassFail DrawClipPath( Image *image, const DrawInfo *draw_info, const char *name );
Description
DrawClipPath() draws the clip path on the image mask.
The format of the DrawClipPath method is:
MagickPassFail DrawClipPath( Image *image, const DrawInfo *draw_info, const char *name );
- image:
The image.
- draw_info:
The draw info.
- name:
The name of the clip path.
DrawCompositeMask
Synopsis
MagickPassFail DrawCompositeMask( Image *image, const DrawInfo *draw_info, const char *name );
Description
DrawCompositeMask() draws the composite mask on the image mask.
The format of the DrawCompositeMask method is:
MagickPassFail DrawCompositeMask( Image *image, const DrawInfo *draw_info, const char *name );
- image:
The image.
- draw_info:
The draw info.
- name:
The name of the composite mask.
DrawImage
Synopsis
MagickPassFail DrawImage( Image *image, const DrawInfo *draw_info );
Description
Use DrawImage() to draw a graphic primitive on your image. The primitive may be represented as a string or filename. Precede the filename with an "at" sign (@) and the contents of the file are drawn on the image. You can affect how text is drawn by setting one or more members of the draw info structure.
The format of the drawing primitive text is known as "MVG" ("Magick Vector Graphics"), which is a powerful yet simple drawing syntax fronted by the "MVG" coder, and substantially supporting W3C SVG 1.1 (https://www.w3.org/TR/SVG11/) rendering when fronted by the "SVG" coder (which translates SVG into MVG). The parser is non-validating and in fact is designed to attempt to skip over unhandled textual elements which may be passed through from the SVG coder. While being used as the basis of a useful W3C SVG implementation and while SVG is commonly used on the "web" as an untrusted input such as within web browsers, this implementation is not designed to handle arbitrary untrusted inputs delivered from the "Internet". The drawing capabilities are best used under controlled circumstances where drawing inputs can be reasonably trusted.
Note that this is a legacy interface. Authors of new code should consider using the Draw* methods defined by magick/draw.h since they are better documented and less error prone.
The format of the DrawImage method is:
MagickPassFail DrawImage( Image *image, const DrawInfo *draw_info );
A description of each parameter follows:
- image:
The image.
- draw_info:
The draw info.
DrawPatternPath
Synopsis
MagickPassFail DrawPatternPath( Image *image, const DrawInfo *draw_info, const char *name, Image ** pattern );
Description
DrawPatternPath() draws a pattern.
The format of the DrawPatternPath method is:
MagickPassFail DrawPatternPath( Image *image, const DrawInfo *draw_info, const char *name, Image ** pattern );
- image:
The image.
- draw_info:
The draw info.
- name:
The pattern name.
- image:
The image.