Wand vector drawing interfaces
Contents
DrawingWand *CloneDrawingWand( const DrawingWand *drawing_wand );
CloneDrawingWand() returns a new drawing wand which is a full (deep) copy of an existing drawing wand.
The format of the CloneDrawingWand method is:
DrawingWand *CloneDrawingWand( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand to copy
void DestroyDrawingWand( DrawingWand *drawing_wand );
DestroyDrawingWand() frees all resources associated with the drawing wand. Once the drawing wand has been freed, it should not be used any further unless it re-allocated.
The format of the DestroyDrawingWand method is:
void DestroyDrawingWand( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand to destroy.
void DrawAnnotation( DrawingWand *drawing_wand, const double x, const double y, const unsigned char *text );
DrawAnnotation() draws text on the image.
The format of the DrawAnnotation method is:
void DrawAnnotation( DrawingWand *drawing_wand, const double x, const double y, const unsigned char *text );
The drawing wand.
x ordinate to left of text
y ordinate to text baseline
text to draw
void DrawAffine( DrawingWand *drawing_wand, const AffineMatrix *affine );
DrawAffine() adjusts the current affine transformation matrix with the specified affine transformation matrix. Note that the current affine transform is adjusted rather than replaced.
The format of the DrawAffine method is:
void DrawAffine( DrawingWand *drawing_wand, const AffineMatrix *affine );
A description of each parameter follows:
Drawing drawing_wand
Affine matrix parameters
DrawAllocateWand() allocates an initial drawing wand which is an opaque handle required by the remaining drawing methods.
The format of the DrawAllocateWand method is:
DrawingWand DrawAllocateWand( const DrawInfo *draw_info, Image *image );
A description of each parameter follows:
Initial drawing defaults. Set to NULL to use ImageMagick defaults.
The image to draw on.
void DrawArc( DrawingWand *drawing_wand, const double sx, const double sy, const double ex, const double ey, const double sd, const double ed );
DrawArc() draws an arc falling within a specified bounding rectangle on the image.
The format of the DrawArc method is:
void DrawArc( DrawingWand *drawing_wand, const double sx, const double sy, const double ex, const double ey, const double sd, const double ed );
The drawing wand.
starting x ordinate of bounding rectangle
starting y ordinate of bounding rectangle
ending x ordinate of bounding rectangle
ending y ordinate of bounding rectangle
starting degrees of rotation
ending degrees of rotation
void DrawBezier( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
DrawBezier() draws a bezier curve through a set of points on the image.
The format of the DrawBezier method is:
void DrawBezier( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
The drawing wand.
number of coordinates
coordinates
void DrawCircle( DrawingWand *drawing_wand, const double ox, const double oy, const double px, const double py );
DrawCircle() draws a circle on the image.
The format of the DrawCircle method is:
void DrawCircle( DrawingWand *drawing_wand, const double ox, const double oy, const double px, const double py );
The drawing wand.
origin x ordinate
origin y ordinate
perimeter x ordinate
perimeter y ordinate
MagickPassFail DrawClearException( DrawingWand *drawing_wand );
DrawClearException() clears any existing exception from the drawing wand.
The format of the DrawGetException method is:
MagickPassFail DrawClearException( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
char *DrawGetClipPath( const DrawingWand *drawing_wand );
DrawGetClipPath() obtains the current clipping path ID. The value returned must be deallocated by the user when it is no longer needed.
The format of the DrawGetClipPath method is:
char *DrawGetClipPath( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetClipPath( DrawingWand *drawing_wand, const char *clip_path );
DrawSetClipPath() associates a named clipping path with the image. Only the areas drawn on by the clipping path will be modified as long as it remains in effect.
The format of the DrawSetClipPath method is:
void DrawSetClipPath( DrawingWand *drawing_wand, const char *clip_path );
A description of each parameter follows:
The drawing wand.
name of clipping path to associate with image
FillRule DrawGetClipRule( const DrawingWand *drawing_wand );
DrawGetClipRule() returns the current polygon fill rule to be used by the clipping path.
The format of the DrawGetClipRule method is:
FillRule DrawGetClipRule( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetClipRule( DrawingWand *drawing_wand, const FillRule fill_rule );
DrawSetClipRule() set the polygon fill rule to be used by the clipping path.
The format of the DrawSetClipRule method is:
void DrawSetClipRule( DrawingWand *drawing_wand, const FillRule fill_rule );
A description of each parameter follows:
The drawing wand.
fill rule (EvenOddRule or NonZeroRule)
ClipPathUnits DrawGetClipUnits( const DrawingWand *drawing_wand );
DrawGetClipUnits() returns the interpretation of clip path units.
The format of the DrawGetClipUnits method is:
ClipPathUnits DrawGetClipUnits( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
char *DrawGetException( const DrawingWand *drawing_wand, ExceptionType *severity );
DrawGetException() obtains error information associated with the last exception (if any). If an exception did occur, an allocated text string is returned which contains a detailed description of the exception. This string must be deallocated by the user once it is no longer needed.
The format of the DrawGetException method is:
char *DrawGetException( const DrawingWand *drawing_wand, ExceptionType *severity );
The drawing wand.
Enumeration corresponding to last thrown exception.
void DrawSetClipUnits( DrawingWand *drawing_wand, const ClipPathUnits clip_units );
DrawSetClipUnits() sets the interpretation of clip path units.
The format of the DrawSetClipUnits method is:
void DrawSetClipUnits( DrawingWand *drawing_wand, const ClipPathUnits clip_units );
The drawing wand.
units to use (UserSpace, UserSpaceOnUse, or ObjectBoundingBox)
void DrawColor( DrawingWand *drawing_wand, const double x, const double y, const PaintMethod paintMethod );
DrawColor() draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:
PointMethod: Recolors the target pixel ReplaceMethod: Recolor any pixel that matches the target pixel. FloodfillMethod: Recolors target pixels and matching neighbors. FillToBorderMethod: Recolor target pixels and neighbors not matching ResetMethod: Recolor all pixels.
The format of the DrawColor method is:
void DrawColor( DrawingWand *drawing_wand, const double x, const double y, const PaintMethod paintMethod );
The drawing wand.
x ordinate
y ordinate
paint method
void DrawComment( DrawingWand *drawing_wand, const char *comment );
DrawComment() adds a comment to a vector output stream.
The format of the DrawComment method is:
void DrawComment( DrawingWand *drawing_wand, const char *comment );
A description of each parameter follows:
The drawing wand.
comment text
void DrawEllipse( DrawingWand *drawing_wand, const double ox, const double oy, const double rx, const double ry, const double start, const double end );
DrawEllipse() draws an ellipse on the image.
The format of the DrawEllipse method is:
void DrawEllipse( DrawingWand *drawing_wand, const double ox, const double oy, const double rx, const double ry, const double start, const double end );
The drawing wand.
origin x ordinate
origin y ordinate
radius in x
radius in y
starting rotation in degrees
ending rotation in degrees
void DrawGetFillColor( const DrawingWand *drawing_wand, PixelWand *fill_color );
DrawGetFillColor() returns the fill color used for drawing filled objects.
The format of the DrawGetFillColor method is:
void DrawGetFillColor( const DrawingWand *drawing_wand, PixelWand *fill_color );
The drawing wand.
Return the fill color.
void DrawSetFillColor( DrawingWand *drawing_wand, const PixelWand *fill_wand );
DrawSetFillColor() sets the fill color to be used for drawing filled objects.
The format of the DrawSetFillColor method is:
void DrawSetFillColor( DrawingWand *drawing_wand, const PixelWand *fill_wand );
The drawing wand.
fill wand.
void DrawSetFillPatternURL( DrawingWand *drawing_wand, const char *fill_url );
DrawSetFillPatternURL() sets the URL to use as a fill pattern for filling objects. Only local URLs ("#identifier") are supported at this time. These local URLs are normally created by defining a named fill pattern with DrawPushPattern/DrawPopPattern.
The format of the DrawSetFillPatternURL method is:
void DrawSetFillPatternURL( DrawingWand *drawing_wand, const char *fill_url );
The drawing wand.
URL to use to obtain fill pattern.
double DrawGetFillOpacity( const DrawingWand *drawing_wand );
DrawGetFillOpacity() returns the opacity used when drawing using the fill color or fill texture. Fully opaque is 1.0.
The format of the DrawGetFillOpacity method is:
double DrawGetFillOpacity( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFillOpacity( DrawingWand *drawing_wand, const double fill_opacity );
DrawSetFillOpacity() sets the opacity to use when drawing using the fill color or fill texture. Fully opaque is 1.0.
The format of the DrawSetFillOpacity method is:
void DrawSetFillOpacity( DrawingWand *drawing_wand, const double fill_opacity );
The drawing wand.
fill opacity
FillRule DrawGetFillRule( const DrawingWand *drawing_wand );
DrawGetFillRule() returns the fill rule used while drawing polygons.
The format of the DrawGetFillRule method is:
FillRule DrawGetFillRule( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFillRule( DrawingWand *drawing_wand, const FillRule fill_rule );
DrawSetFillRule() sets the fill rule to use while drawing polygons.
The format of the DrawSetFillRule method is:
void DrawSetFillRule( DrawingWand *drawing_wand, const FillRule fill_rule );
A description of each parameter follows:
The drawing wand.
fill rule (EvenOddRule or NonZeroRule)
char *DrawGetFont( const DrawingWand *drawing_wand );
DrawGetFont() returns a null-terminaged string specifying the font used when annotating with text. The value returned must be freed by the user when no longer needed.
The format of the DrawGetFont method is:
char *DrawGetFont( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFont( DrawingWand *drawing_wand, const char *font_name );
DrawSetFont() sets the fully-sepecified font to use when annotating with text.
The format of the DrawSetFont method is:
void DrawSetFont( DrawingWand *drawing_wand, const char *font_name );
A description of each parameter follows:
The drawing wand.
font name
char *DrawGetFontFamily( const DrawingWand *drawing_wand );
DrawGetFontFamily() returns the font family to use when annotating with text. The value returned must be freed by the user when it is no longer needed.
The format of the DrawGetFontFamily method is:
char *DrawGetFontFamily( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFontFamily( DrawingWand *drawing_wand, const char *font_family );
DrawSetFontFamily() sets the font family to use when annotating with text.
The format of the DrawSetFontFamily method is:
void DrawSetFontFamily( DrawingWand *drawing_wand, const char *font_family );
A description of each parameter follows:
The drawing wand.
font family
double DrawGetFontSize( const DrawingWand *drawing_wand );
DrawGetFontSize() returns the font pointsize used when annotating with text.
The format of the DrawGetFontSize method is:
double DrawGetFontSize( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFontSize( DrawingWand *drawing_wand, const double pointsize );
DrawSetFontSize() sets the font pointsize to use when annotating with text.
The format of the DrawSetFontSize method is:
void DrawSetFontSize( DrawingWand *drawing_wand, const double pointsize );
A description of each parameter follows:
The drawing wand.
text pointsize
StretchType DrawGetFontStretch( const DrawingWand *drawing_wand );
DrawGetFontStretch() returns the font stretch used when annotating with text.
The format of the DrawGetFontStretch method is:
StretchType DrawGetFontStretch( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFontStretch( DrawingWand *drawing_wand, const StretchType font_stretch );
DrawSetFontStretch() sets the font stretch to use when annotating with text. The AnyStretch enumeration acts as a wild-card "don't care" option.
The format of the DrawSetFontStretch method is:
void DrawSetFontStretch( DrawingWand *drawing_wand, const StretchType font_stretch );
The drawing wand.
font stretch (NormalStretch, UltraCondensedStretch, CondensedStretch, SemiCondensedStretch, SemiExpandedStretch, ExpandedStretch, ExtraExpandedStretch, UltraExpandedStretch, AnyStretch)
StyleType DrawGetFontStyle( const DrawingWand *drawing_wand );
DrawGetFontStyle() returns the font style used when annotating with text.
The format of the DrawGetFontStyle method is:
StyleType DrawGetFontStyle( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFontStyle( DrawingWand *drawing_wand, const StyleType style );
DrawSetFontStyle() sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.
The format of the DrawSetFontStyle method is:
void DrawSetFontStyle( DrawingWand *drawing_wand, const StyleType style );
A description of each parameter follows:
The drawing wand.
font style (NormalStyle, ItalicStyle, ObliqueStyle, AnyStyle)
unsigned long DrawGetFontWeight( const DrawingWand *drawing_wand );
DrawGetFontWeight() returns the font weight used when annotating with text.
The format of the DrawGetFontWeight method is:
unsigned long DrawGetFontWeight( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetFontWeight( DrawingWand *drawing_wand, const unsigned long font_weight );
DrawSetFontWeight() sets the font weight to use when annotating with text.
The format of the DrawSetFontWeight method is:
void DrawSetFontWeight( DrawingWand *drawing_wand, const unsigned long font_weight );
The drawing wand.
font weight (valid range 100-900)
GravityType DrawGetGravity( const DrawingWand *drawing_wand );
DrawGetGravity() returns the text placement gravity used when annotating with text.
The format of the DrawGetGravity method is:
GravityType DrawGetGravity( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetGravity( DrawingWand *drawing_wand, const GravityType gravity );
DrawSetGravity() sets the text placement gravity to use when annotating with text.
The format of the DrawSetGravity method is:
void DrawSetGravity( DrawingWand *drawing_wand, const GravityType gravity );
A description of each parameter follows:
The drawing wand.
positioning gravity (NorthWestGravity, NorthGravity, NorthEastGravity, WestGravity, CenterGravity, EastGravity, SouthWestGravity, SouthGravity, SouthEastGravity)
void DrawComposite( DrawingWand *drawing_wand, const CompositeOperator composite_operator, const double x, const double y, const double width, const double height, const Image *image );
DrawComposite() composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.
The format of the DrawComposite method is:
void DrawComposite( DrawingWand *drawing_wand, const CompositeOperator composite_operator, const double x, const double y, const double width, const double height, const Image *image );
The drawing wand.
composition operator
x ordinate of top left corner
y ordinate of top left corner
Width to resize image to prior to compositing. Specify zero to use existing width.
Height to resize image to prior to compositing. Specify zero to use existing height.
Image to composite
void DrawLine( DrawingWand *drawing_wand, const double sx, const double sy, const double ex, const double ey );
DrawLine() draws a line on the image using the current stroke color, stroke opacity, and stroke width.
The format of the DrawLine method is:
void DrawLine( DrawingWand *drawing_wand, const double sx, const double sy, const double ex, const double ey );
The drawing wand.
starting x ordinate
starting y ordinate
ending x ordinate
ending y ordinate
void DrawMatte( DrawingWand *drawing_wand, const double x, const double y, const PaintMethod paint_method );
DrawMatte() paints on the image's opacity channel in order to set effected pixels to transparent. to influence the opacity of pixels. The available paint methods are:
PointMethod: Select the target pixel ReplaceMethod: Select any pixel that matches the target pixel. FloodfillMethod: Select the target pixel and matching neighbors. FillToBorderMethod: Select the target pixel and neighbors not matching border color. ResetMethod: Select all pixels.
The format of the DrawMatte method is:
void DrawMatte( DrawingWand *drawing_wand, const double x, const double y, const PaintMethod paint_method );
The drawing wand.
x ordinate
y ordinate
o paint_method:
void DrawPathClose( DrawingWand *drawing_wand );
DrawPathClose() adds a path element to the current path which closes the current subpath by drawing a straight line from the current point to the current subpath's most recent starting point (usually, the most recent moveto point).
The format of the DrawPathClose method is:
void DrawPathClose( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPathCurveToAbsolute( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2, const double x, const double y );
DrawPathCurveToAbsolute() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToAbsolute method is:
void DrawPathCurveToAbsolute( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2, const double x, const double y );
The drawing wand.
x ordinate of control point for curve beginning
y ordinate of control point for curve beginning
x ordinate of control point for curve ending
y ordinate of control point for curve ending
x ordinate of the end of the curve
y ordinate of the end of the curve
void DrawPathCurveToRelative( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2, const double x, const double y );
DrawPathCurveToRelative() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToRelative method is:
void DrawPathCurveToRelative( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2, const double x, const double y );
The drawing wand.
x ordinate of control point for curve beginning
y ordinate of control point for curve beginning
x ordinate of control point for curve ending
y ordinate of control point for curve ending
x ordinate of the end of the curve
y ordinate of the end of the curve
void DrawPathCurveToQuadraticBezierAbsolute( DrawingWand *drawing_wand, const double x1, const double y1, onst double x, const double y );
DrawPathCurveToQuadraticBezierAbsolute() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToQuadraticBezierAbsolute method is:
void DrawPathCurveToQuadraticBezierAbsolute( DrawingWand *drawing_wand, const double x1, const double y1, onst double x, const double y );
The drawing wand.
x ordinate of the control point
y ordinate of the control point
x ordinate of final point
y ordinate of final point
void DrawPathCurveToQuadraticBezierRelative( DrawingWand *drawing_wand, const double x1, const double y1, const double x, const double y );
DrawPathCurveToQuadraticBezierRelative() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToQuadraticBezierRelative method is:
void DrawPathCurveToQuadraticBezierRelative( DrawingWand *drawing_wand, const double x1, const double y1, const double x, const double y );
The drawing wand.
x ordinate of the control point
y ordinate of the control point
x ordinate of final point
y ordinate of final point
void DrawPathCurveToQuadraticBezierSmoothAbsolute( DrawingWand *drawing_wand, const double x, const double y );
DrawPathCurveToQuadraticBezierSmoothAbsolute() draws a quadratic Bezier curve (using absolute coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToQuadraticBezierSmoothAbsolute method is:
void DrawPathCurveToQuadraticBezierSmoothAbsolute( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
x ordinate of final point
y ordinate of final point
void DrawPathCurveToQuadraticBezierSmoothRelative( DrawingWand *drawing_wand, const double x, const double y );
DrawPathCurveToQuadraticBezierSmoothRelative() draws a quadratic Bezier curve (using relative coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToQuadraticBezierSmoothRelative method is:
void DrawPathCurveToQuadraticBezierSmoothRelative( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
x ordinate of final point
y ordinate of final point
void DrawPathCurveToSmoothAbsolute( DrawingWand *drawing_wand, const double x2const double y2, const double x, const double y );
DrawPathCurveToSmoothAbsolute() draws a cubic Bezier curve from the current point to (x,y) using absolute coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToSmoothAbsolute method is:
void DrawPathCurveToSmoothAbsolute( DrawingWand *drawing_wand, const double x2const double y2, const double x, const double y );
The drawing wand.
x ordinate of second control point
y ordinate of second control point
x ordinate of termination point
y ordinate of termination point
void DrawPathCurveToSmoothRelative( DrawingWand *drawing_wand, const double x2, const double y2, const double x, const double y );
DrawPathCurveToSmoothRelative() draws a cubic Bezier curve from the current point to (x,y) using relative coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
The format of the DrawPathCurveToSmoothRelative method is:
void DrawPathCurveToSmoothRelative( DrawingWand *drawing_wand, const double x2, const double y2, const double x, const double y );
The drawing wand.
x ordinate of second control point
y ordinate of second control point
x ordinate of termination point
y ordinate of termination point
void DrawPathEllipticArcAbsolute( DrawingWand *drawing_wand, const double rx, const double ry, const double x_axis_rotation, unsigned int large_arc_flag, unsigned int sweep_flag, const double x, const double y );
DrawPathEllipticArcAbsolute() draws an elliptical arc from the current point to (x, y) using absolute coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automatically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.
The format of the DrawPathEllipticArcAbsolute method is:
void DrawPathEllipticArcAbsolute( DrawingWand *drawing_wand, const double rx, const double ry, const double x_axis_rotation, unsigned int large_arc_flag, unsigned int sweep_flag, const double x, const double y );
The drawing wand.
x radius
y radius
indicates how the ellipse as a whole is rotated relative to the current coordinate system
If non-zero (true) then draw the larger of the available arcs
If non-zero (true) then draw the arc matching a clock-wise rotation
void DrawPathEllipticArcRelative( DrawingWand *drawing_wand, const double rx, const double ry, const double x_axis_rotation, unsigned int large_arc_flag, unsigned int sweep_flag, const double x, const double y );
DrawPathEllipticArcRelative() draws an elliptical arc from the current point to (x, y) using relative coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automatically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.
The format of the DrawPathEllipticArcRelative method is:
void DrawPathEllipticArcRelative( DrawingWand *drawing_wand, const double rx, const double ry, const double x_axis_rotation, unsigned int large_arc_flag, unsigned int sweep_flag, const double x, const double y );
The drawing wand.
x radius
y radius
indicates how the ellipse as a whole is rotated relative to the current coordinate system
If non-zero (true) then draw the larger of the available arcs
If non-zero (true) then draw the arc matching a clock-wise rotation
void DrawPathFinish( DrawingWand *drawing_wand );
DrawPathFinish() terminates the current path.
The format of the DrawPathFinish method is:
void DrawPathFinish( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPathLineToAbsolute( DrawingWand *drawing_wand, const double x, const double y );
DrawPathLineToAbsolute() draws a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point.
The format of the DrawPathLineToAbsolute method is:
void DrawPathLineToAbsolute( DrawingWand *drawing_wand, const double x, const double y );
A description of each parameter follows:
The drawing wand.
target x ordinate
target y ordinate
void DrawPathLineToRelative( DrawingWand *drawing_wand, const double x, const double y );
DrawPathLineToRelative() draws a line path from the current point to the given coordinate using relative coordinates. The coordinate then becomes the new current point.
The format of the DrawPathLineToRelative method is:
void DrawPathLineToRelative( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
target x ordinate
target y ordinate
void DrawPathLineToHorizontalAbsolute( DrawingWand *drawing_wand, const PathMode mode, const double x );
DrawPathLineToHorizontalAbsolute() draws a horizontal line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.
The format of the DrawPathLineToHorizontalAbsolute method is:
void DrawPathLineToHorizontalAbsolute( DrawingWand *drawing_wand, const PathMode mode, const double x );
The drawing wand.
target x ordinate
void DrawPathLineToHorizontalRelative( DrawingWand *drawing_wand, const double x );
DrawPathLineToHorizontalRelative() draws a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.
The format of the DrawPathLineToHorizontalRelative method is:
void DrawPathLineToHorizontalRelative( DrawingWand *drawing_wand, const double x );
The drawing wand.
target x ordinate
void DrawPathLineToVerticalAbsolute( DrawingWand *drawing_wand, const double y );
DrawPathLineToVerticalAbsolute() draws a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.
The format of the DrawPathLineToVerticalAbsolute method is:
void DrawPathLineToVerticalAbsolute( DrawingWand *drawing_wand, const double y );
The drawing wand.
target y ordinate
void DrawPathLineToVerticalRelative( DrawingWand *drawing_wand, const double y );
DrawPathLineToVerticalRelative() draws a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.
The format of the DrawPathLineToVerticalRelative method is:
void DrawPathLineToVerticalRelative( DrawingWand *drawing_wand, const double y );
The drawing wand.
target y ordinate
void DrawPathMoveToAbsolute( DrawingWand *drawing_wand, const double x, const double y );
DrawPathMoveToAbsolute() starts a new sub-path at the given coordinate using absolute coordinates. The current point then becomes the specified coordinate.
The format of the DrawPathMoveToAbsolute method is:
void DrawPathMoveToAbsolute( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
target x ordinate
target y ordinate
void DrawPathMoveToRelative( DrawingWand *drawing_wand, const double x, const double y );
DrawPathMoveToRelative() starts a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate.
The format of the DrawPathMoveToRelative method is:
void DrawPathMoveToRelative( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
target x ordinate
target y ordinate
void DrawPathStart( DrawingWand *drawing_wand );
DrawPathStart() declares the start of a path drawing list which is terminated by a matching DrawPathFinish() command. All other DrawPath commands must be enclosed between a DrawPathStart() and a DrawPathFinish() command. This is because path drawing commands are subordinate commands and they do not function by themselves.
The format of the DrawPathStart method is:
void DrawPathStart( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
DrawInfo *DrawPeekGraphicContext( const DrawingWand *drawing_wand );
DrawPeekGraphicContext() returns the current graphic drawing_wand.
The format of the DrawPeekGraphicContext method is:
DrawInfo *DrawPeekGraphicContext( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPoint( DrawingWand *drawing_wand, const double x, const double y );
DrawPoint() draws a point using the current stroke color and stroke thickness at the specified coordinates.
The format of the DrawPoint method is:
void DrawPoint( DrawingWand *drawing_wand, const double x, const double y );
A description of each parameter follows:
The drawing wand.
target x coordinate
target y coordinate
void DrawPolygon( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
DrawPolygon() draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
The format of the DrawPolygon method is:
void DrawPolygon( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
The drawing wand.
number of coordinates
coordinate array
void DrawPolyline( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
DrawPolyline() draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
The format of the DrawPolyline method is:
void DrawPolyline( DrawingWand *drawing_wand, const unsigned long number_coordinates, const PointInfo *coordinates );
The drawing wand.
number of coordinates
coordinate array
void DrawPopClipPath( DrawingWand *drawing_wand );
DrawPopClipPath() terminates a clip path definition.
The format of the DrawPopClipPath method is:
void DrawPopClipPath( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPopDefs( DrawingWand *drawing_wand );
DrawPopDefs() terminates a definition list
The format of the DrawPopDefs method is:
void DrawPopDefs( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPopGraphicContext( DrawingWand *drawing_wand );
DrawPopGraphicContext() destroys the current drawing_wand returning to the previously pushed drawing wand. Multiple drawing wand may exist. It is an error to attempt to pop more drawing_wands than have been pushed, and it is proper form to pop all drawing_wands which have been pushed.
The format of the DrawPopGraphicContext method is:
void DrawPopGraphicContext( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPopPattern( DrawingWand *drawing_wand );
DrawPopPattern() terminates a pattern definition.
The format of the DrawPopPattern method is:
void DrawPopPattern( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPushClipPath( DrawingWand *drawing_wand, const char *clip_path_id );
DrawPushClipPath() starts a clip path definition which is comprized of any number of drawing commands and terminated by a DrawPopClipPath() command.
The format of the DrawPushClipPath method is:
void DrawPushClipPath( DrawingWand *drawing_wand, const char *clip_path_id );
A description of each parameter follows:
The drawing wand.
string identifier to associate with the clip path for later use.
void DrawPushDefs( DrawingWand *drawing_wand );
DrawPushDefs() indicates that commands up to a terminating DrawPopDefs() command create named elements (e.g. clip-paths, textures, etc.) which may safely be processed earlier for the sake of efficiency.
The format of the DrawPushDefs method is:
void DrawPushDefs( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPushGraphicContext( DrawingWand *drawing_wand );
DrawPushGraphicContext() clones the current drawing wand to create a new drawing wand. The original drawing drawing_wand(s) may be returned to by invoking DrawPopGraphicContext(). The drawing wands are stored on a drawing wand stack. For every Pop there must have already been an equivalent Push.
The format of the DrawPushGraphicContext method is:
void DrawPushGraphicContext( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawPushPattern( DrawingWand *drawing_wand, const char *pattern_id, const double x, const double y, const double width, const double height );
DrawPushPattern() indicates that subsequent commands up to a DrawPopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.
The format of the DrawPushPattern method is:
void DrawPushPattern( DrawingWand *drawing_wand, const char *pattern_id, const double x, const double y, const double width, const double height );
The drawing wand.
pattern identification for later reference
x ordinate of top left corner
y ordinate of top left corner
width of pattern space
height of pattern space
void DrawRectangle( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2 );
DrawRectangle() draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.
The format of the DrawRectangle method is:
void DrawRectangle( DrawingWand *drawing_wand, const double x1, const double y1, const double x2, const double y2 );
x ordinate of first coordinate
y ordinate of first coordinate
x ordinate of second coordinate
y ordinate of second coordinate
unsigned int DrawRender( const DrawingWand *drawing_wand );
DrawRender() renders all preceding drawing commands onto the image. This function is deprecated. Use MagickDrawImage() instead.
The format of the DrawRender method is:
unsigned int DrawRender( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawRotate( DrawingWand *drawing_wand, const double degrees );
DrawRotate() applies the specified rotation to the current coordinate space.
The format of the DrawRotate method is:
void DrawRotate( DrawingWand *drawing_wand, const double degrees );
A description of each parameter follows:
The drawing wand.
degrees of rotation
void DrawRoundRectangle( DrawingWand *drawing_wand, double x1, double y1, double x2, double y2, double rx, double ry );
DrawRoundRectangle() draws a rounted rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings.
The format of the DrawRoundRectangle method is:
void DrawRoundRectangle( DrawingWand *drawing_wand, double x1, double y1, double x2, double y2, double rx, double ry );
The drawing wand.
x ordinate of first coordinate
y ordinate of first coordinate
x ordinate of second coordinate
y ordinate of second coordinate
radius of corner in horizontal direction
radius of corner in vertical direction
void DrawScale( DrawingWand *drawing_wand, const double x, const double y );
DrawScale() adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.
The format of the DrawScale method is:
void DrawScale( DrawingWand *drawing_wand, const double x, const double y );
A description of each parameter follows:
The drawing wand.
horizontal scale factor
vertical scale factor
void DrawSkewX( DrawingWand *drawing_wand, const double degrees );
DrawSkewX() skews the current coordinate system in the horizontal direction.
The format of the DrawSkewX method is:
void DrawSkewX( DrawingWand *drawing_wand, const double degrees );
A description of each parameter follows:
The drawing wand.
number of degrees to skew the coordinates
void DrawSkewY( DrawingWand *drawing_wand, const double degrees );
DrawSkewY() skews the current coordinate system in the vertical direction.
The format of the DrawSkewY method is:
void DrawSkewY( DrawingWand *drawing_wand, const double degrees );
A description of each parameter follows:
The drawing wand.
number of degrees to skew the coordinates
void DrawSetStopColor( DrawingWand *drawing_wand, const PixelPacket *stop_color, const double offset );
DrawSetStopColor() sets the stop color and offset for gradients
The format of the DrawSetStopColor method is:
void DrawSetStopColor( DrawingWand *drawing_wand, const PixelPacket *stop_color, const double offset );
The drawing wand.
o stop_color:
o offset:
void DrawGetStrokeColor( const DrawingWand *drawing_wand, ;
DrawGetStrokeColor() returns the color used for stroking object outlines.
The format of the DrawGetStrokeColor method is:
void DrawGetStrokeColor( const DrawingWand *drawing_wand, ;
The drawing wand.
Return the stroke color.
void DrawSetStrokeColor( DrawingWand *drawing_wand, const PixelWand *stroke_wand );
DrawSetStrokeColor() sets the color used for stroking object outlines.
The format of the DrawSetStrokeColor method is:
void DrawSetStrokeColor( DrawingWand *drawing_wand, const PixelWand *stroke_wand );
The drawing wand.
stroke wand.
void DrawSetStrokePatternURL( DrawingWand *drawing_wand, const char *stroke_url );
DrawSetStrokePatternURL() sets the pattern used for stroking object outlines.
The format of the DrawSetStrokePatternURL method is:
void DrawSetStrokePatternURL( DrawingWand *drawing_wand, const char *stroke_url );
The drawing wand.
URL specifying pattern ID (e.g. "#pattern_id")
unsigned int DrawGetStrokeAntialias( const DrawingWand *drawing_wand );
DrawGetStrokeAntialias() returns the current stroke antialias setting. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.
The format of the DrawGetStrokeAntialias method is:
unsigned int DrawGetStrokeAntialias( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeAntialias( DrawingWand *drawing_wand, const unsigned int stroke_antialias );
DrawSetStrokeAntialias() controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.
The format of the DrawSetStrokeAntialias method is:
void DrawSetStrokeAntialias( DrawingWand *drawing_wand, const unsigned int stroke_antialias );
The drawing wand.
set to false (zero) to disable antialiasing
double *DrawGetStrokeDashArray( const DrawingWand *drawing_wand, unsigned long *number_elements );
DrawGetStrokeDashArray() returns an array representing the pattern of dashes and gaps used to stroke paths (see DrawSetStrokeDashArray). The array must be freed once it is no longer required by the user.
The format of the DrawGetStrokeDashArray method is:
double *DrawGetStrokeDashArray( const DrawingWand *drawing_wand, unsigned long *number_elements );
The drawing wand.
address to place number of elements in dash array
void DrawSetStrokeDashArray( DrawingWand *drawing_wand, const unsigned long number_elements, const double *dash_array );
DrawSetStrokeDashArray() specifies the pattern of dashes and gaps used to stroke paths. The stroke dash array represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass a zero number_elements argument and null dash_array. A typical stroke dash array might contain the members 5 3 2.
The format of the DrawSetStrokeDashArray method is:
void DrawSetStrokeDashArray( DrawingWand *drawing_wand, const unsigned long number_elements, const double *dash_array );
The drawing wand.
number of elements in dash array
dash array values
double DrawGetStrokeDashOffset( const DrawingWand *drawing_wand );
DrawGetStrokeDashOffset() returns the offset into the dash pattern to start the dash.
The format of the DrawGetStrokeDashOffset method is:
double DrawGetStrokeDashOffset( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeDashOffset( DrawingWand *drawing_wand, const double dash_offset );
DrawSetStrokeDashOffset() specifies the offset into the dash pattern to start the dash.
The format of the DrawSetStrokeDashOffset method is:
void DrawSetStrokeDashOffset( DrawingWand *drawing_wand, const double dash_offset );
The drawing wand.
dash offset
LineCap DrawGetStrokeLineCap( const DrawingWand *drawing_wand );
DrawGetStrokeLineCap() returns the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.
The format of the DrawGetStrokeLineCap method is:
LineCap DrawGetStrokeLineCap( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeLineCap( DrawingWand *drawing_wand, const LineCap linecap );
DrawSetStrokeLineCap() specifies the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.
The format of the DrawSetStrokeLineCap method is:
void DrawSetStrokeLineCap( DrawingWand *drawing_wand, const LineCap linecap );
The drawing wand.
linecap style
LineJoin DrawGetStrokeLineJoin( const DrawingWand *drawing_wand );
DrawGetStrokeLineJoin() returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
The format of the DrawGetStrokeLineJoin method is:
LineJoin DrawGetStrokeLineJoin( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeLineJoin( DrawingWand *drawing_wand, const LineJoin linejoin );
DrawSetStrokeLineJoin() specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
The format of the DrawSetStrokeLineJoin method is:
void DrawSetStrokeLineJoin( DrawingWand *drawing_wand, const LineJoin linejoin );
The drawing wand.
line join style
unsigned long DrawGetStrokeMiterLimit( const DrawingWand *drawing_wand );
DrawGetStrokeMiterLimit() returns the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.
The format of the DrawGetStrokeMiterLimit method is:
unsigned long DrawGetStrokeMiterLimit( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeMiterLimit( DrawingWand *drawing_wand, const unsigned long miterlimit );
DrawSetStrokeMiterLimit() specifies the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.
The format of the DrawSetStrokeMiterLimit method is:
void DrawSetStrokeMiterLimit( DrawingWand *drawing_wand, const unsigned long miterlimit );
The drawing wand.
miter limit
double DrawGetStrokeOpacity( const DrawingWand *drawing_wand );
DrawGetStrokeOpacity() returns the opacity of stroked object outlines.
The format of the DrawGetStrokeOpacity method is:
double DrawGetStrokeOpacity( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeOpacity( DrawingWand *drawing_wand, const double stroke_opacity );
DrawSetStrokeOpacity() specifies the opacity of stroked object outlines.
The format of the DrawSetStrokeOpacity method is:
void DrawSetStrokeOpacity( DrawingWand *drawing_wand, const double stroke_opacity );
The drawing wand.
stroke opacity. The value 1.0 is opaque.
double DrawGetStrokeWidth( const DrawingWand *drawing_wand );
DrawGetStrokeWidth() returns the width of the stroke used to draw object outlines.
The format of the DrawGetStrokeWidth method is:
double DrawGetStrokeWidth( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetStrokeWidth( DrawingWand *drawing_wand, const double stroke_width );
DrawSetStrokeWidth() sets the width of the stroke used to draw object outlines.
The format of the DrawSetStrokeWidth method is:
void DrawSetStrokeWidth( DrawingWand *drawing_wand, const double stroke_width );
The drawing wand.
stroke width
unsigned int DrawGetTextAntialias( const DrawingWand *drawing_wand );
DrawGetTextAntialias() returns the current text antialias setting, which determines whether text is antialiased. Text is antialiased by default.
The format of the DrawGetTextAntialias method is:
unsigned int DrawGetTextAntialias( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetTextAntialias( DrawingWand *drawing_wand, const unsigned int text_antialias );
DrawSetTextAntialias() controls whether text is antialiased. Text is antialiased by default.
The format of the DrawSetTextAntialias method is:
void DrawSetTextAntialias( DrawingWand *drawing_wand, const unsigned int text_antialias );
The drawing wand.
antialias boolean. Set to false (0) to disable antialiasing.
DecorationType DrawGetTextDecoration( DrawingWand *drawing_wand );
DrawGetTextDecoration() returns the decoration applied when annotating with text.
The format of the DrawGetTextDecoration method is:
DecorationType DrawGetTextDecoration( DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetTextDecoration( DrawingWand *drawing_wand, const DecorationType decoration );
DrawSetTextDecoration() specifies a decoration to be applied when annotating with text.
The format of the DrawSetTextDecoration method is:
void DrawSetTextDecoration( DrawingWand *drawing_wand, const DecorationType decoration );
The drawing wand.
text decoration. One of NoDecoration, UnderlineDecoration, OverlineDecoration, or LineThroughDecoration
char *DrawGetTextEncoding( const DrawingWand *drawing_wand );
DrawGetTextEncoding() returns a null-terminated string which specifies the code set used for text annotations. The string must be freed by the user once it is no longer required.
The format of the DrawGetTextEncoding method is:
char *DrawGetTextEncoding( const DrawingWand *drawing_wand );
A description of each parameter follows:
The drawing wand.
void DrawSetTextEncoding( DrawingWand *drawing_wand, const char *encoding );
DrawSetTextEncoding() specifies specifies the code set to use for text annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode.
The format of the DrawSetTextEncoding method is:
void DrawSetTextEncoding( DrawingWand *drawing_wand, const char *encoding );
A description of each parameter follows:
The drawing wand.
character string specifying text encoding
void DrawGetTextUnderColor( const DrawingWand *drawing_wand, PixelWand *under_color );
DrawGetTextUnderColor() returns the color of a background rectangle to place under text annotations.
The format of the DrawGetTextUnderColor method is:
void DrawGetTextUnderColor( const DrawingWand *drawing_wand, PixelWand *under_color );
The drawing wand.
Return the under color.
void DrawSetTextUnderColor( DrawingWand *drawing_wand, const PixelWand *under_wand );
DrawSetTextUnderColor() specifies the color of a background rectangle to place under text annotations.
The format of the DrawSetTextUnderColor method is:
void DrawSetTextUnderColor( DrawingWand *drawing_wand, const PixelWand *under_wand );
The drawing wand.
text under wand.
void DrawTranslate( DrawingWand *drawing_wand, const double x, const double y );
DrawTranslate() applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.
The format of the DrawTranslate method is:
void DrawTranslate( DrawingWand *drawing_wand, const double x, const double y );
The drawing wand.
new x ordinate for coordinate system origin
new y ordinate for coordinate system origin
void DrawSetViewbox( DrawingWand *drawing_wand, unsigned long x1, unsigned long y1, unsigned long x2, unsigned long y2 );
DrawSetViewbox() sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.
The format of the DrawSetViewbox method is:
void DrawSetViewbox( DrawingWand *drawing_wand, unsigned long x1, unsigned long y1, unsigned long x2, unsigned long y2 );
The drawing wand.
left x ordinate
top y ordinate
right x ordinate
bottom y ordinate
DrawingWand *NewDrawingWand( void );
NewDrawingWand() returns a drawing wand required for all other methods in the API.
The format of the NewDrawingWand method is:
DrawingWand *NewDrawingWand( void );
Copyright © GraphicsMagick Group 2002 - 2023