[
About ImageMagick
Command-line Tools
Processing
Options
Program Interfaces
MagickWand
MagickCore
PerlMagick
Architecture
] [ Install from Source Unix Windows Binary Releases Unix Windows Resources ] [ Download ] [ Links ] [ Sponsors Free Forum Hosting ] |
ClearDrawingWand() clear resources associated with the drawing wand. The format of the ClearDrawingWand method is: DrawingWand *ClearDrawingWand(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. to destroy CloneDrawingWand() makes an exact copy of the specified wand. The format of the CloneDrawingWand method is: DrawingWand *CloneDrawingWand(const DrawingWand *wand) A description of each parameter follows: wandThe magick wand. DestroyDrawingWand() frees all resources associated with the drawing wand. Once the drawing wand has been freed, it should not be used and further unless it re-allocated. The format of the DestroyDrawingWand method is: DrawingWand *DestroyDrawingWand(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. to destroy 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 *wand,const AffineMatrix *affine) A description of each parameter follows: wandDrawing wand affineAffine matrix parameters DrawAnnotation() draws text on the image. The format of the DrawAnnotation method is: void DrawAnnotation(DrawingWand *wand,const double x, const double y,const unsigned char *text) A description of each parameter follows: wandThe drawing wand. xx ordinate to left of text yy ordinate to text baseline texttext to draw DrawArc() draws an arc falling within a specified bounding rectangle on the image. The format of the DrawArc method is: void DrawArc(DrawingWand *wand,const double sx,const double sy, const double ex,const double ey,const double sd,const double ed) A description of each parameter follows: wandThe drawing wand. sxstarting x ordinate of bounding rectangle systarting y ordinate of bounding rectangle exending x ordinate of bounding rectangle eyending y ordinate of bounding rectangle sdstarting degrees of rotation edending degrees of rotation DrawBezier() draws a bezier curve through a set of points on the image. The format of the DrawBezier method is: void DrawBezier(DrawingWand *wand, const unsigned long number_coordinates,const PointInfo *coordinates) A description of each parameter follows: wandThe drawing wand. number_coordinatesnumber of coordinates coordinatescoordinates DrawCircle() draws a circle on the image. The format of the DrawCircle method is: void DrawCircle(DrawingWand *wand,const double ox, const double oy,const double px, const double py) A description of each parameter follows: wandThe drawing wand. oxorigin x ordinate oyorigin y ordinate pxperimeter x ordinate pyperimeter y ordinate DrawClearException() clear any exceptions associated with the wand. The format of the DrawClearException method is: MagickBooleanType DrawClearException(DrawWand *wand) A description of each parameter follows: wandThe drawing wand. 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: MagickBooleanType DrawComposite(DrawingWand *wand, const CompositeOperator compose,const double x, const double y,const double width,const double height, MagickWand *magick_wand) A description of each parameter follows: wandThe drawing wand. composecomposition operator xx ordinate of top left corner yy ordinate of top left corner widthWidth to resize image to prior to compositing. Specify zero to use existing width. heightHeight to resize image to prior to compositing. Specify zero to use existing height. magick_wandImage to composite is obtained from this wand. 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. ResetMethod: Recolor all pixels. The format of the DrawColor method is: void DrawColor(DrawingWand *wand,const double x,const double y, const PaintMethod paint_method) A description of each parameter follows: wandThe drawing wand. xx ordinate. yy ordinate. paint_methodpaint method. DrawComment() adds a comment to a vector output stream. The format of the DrawComment method is: void DrawComment(DrawingWand *wand,const char *comment) A description of each parameter follows: wandThe drawing wand. commentcomment text DrawEllipse() draws an ellipse on the image. The format of the DrawEllipse method is: void DrawEllipse(DrawingWand *wand,const double ox, const double oy,const double rx,const double ry,const double start, const double end) A description of each parameter follows: wandThe drawing wand. oxorigin x ordinate oyorigin y ordinate rxradius in x ryradius in y startstarting rotation in degrees endending rotation in degrees 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 *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe drawing wand. DrawGetClipUnits() returns the interpretation of clip path units. The format of the DrawGetClipUnits method is: ClipPathUnits DrawGetClipUnits(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API. The format of the DrawGetException method is: char *DrawGetException(const DrawWand *wand, ExceptionType *severity) A description of each parameter follows: wandThe drawing wand. severityThe severity of the error is returned here. DrawGetFillColor() returns the fill color used for drawing filled objects. The format of the DrawGetFillColor method is: void DrawGetFillColor(const DrawingWand *wand, PixelWand *fill_color) A description of each parameter follows: wandThe drawing wand. fill_colorReturn the fill color. DrawGetFillAlpha() returns the opacity used when drawing using the fill color or fill texture. Fully opaque is 1.0. The format of the DrawGetFillAlpha method is: double DrawGetFillAlpha(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetFillRule() returns the fill rule used while drawing polygons. The format of the DrawGetFillRule method is: FillRule DrawGetFillRule(const DrawingWand *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe drawing wand. DrawGetFontSize() returns the font pointsize used when annotating with text. The format of the DrawGetFontSize method is: double DrawGetFontSize(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetFontStretch() returns the font stretch used when annotating with text. The format of the DrawGetFontStretch method is: StretchType DrawGetFontStretch(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetFontStyle() returns the font style used when annotating with text. The format of the DrawGetFontStyle method is: StyleType DrawGetFontStyle(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetFontWeight() returns the font weight used when annotating with text. The format of the DrawGetFontWeight method is: unsigned long DrawGetFontWeight(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetGravity() returns the text placement gravity used when annotating with text. The format of the DrawGetGravity method is: GravityType DrawGetGravity(const DrawingWand *wand) A description of each parameter follows: wandThe 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: MagickBooleanType DrawGetStrokeAntialias(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetStrokeColor() returns the color used for stroking object outlines. The format of the DrawGetStrokeColor method is: void DrawGetStrokeColor(const DrawingWand *wand, $ PixelWand *stroke_color) A description of each parameter follows: wandThe drawing wand. stroke_colorReturn the stroke color. 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 *wand, unsigned long *number_elements) A description of each parameter follows: wandThe drawing wand. number_elementsaddress to place number of elements in dash array DrawGetStrokeDashOffset() returns the offset into the dash pattern to start the dash. The format of the DrawGetStrokeDashOffset method is: double DrawGetStrokeDashOffset(const DrawingWand *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe drawing wand. DrawGetStrokeAlpha() returns the opacity of stroked object outlines. The format of the DrawGetStrokeAlpha method is: double DrawGetStrokeAlpha(const DrawingWand *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe drawing wand. DrawGetTextAlignment() returns the alignment applied when annotating with text. The format of the DrawGetTextAlignment method is: AlignType DrawGetTextAlignment(DrawingWand *wand) A description of each parameter follows: wandThe 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: MagickBooleanType DrawGetTextAntialias(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetTextDecoration() returns the decoration applied when annotating with text. The format of the DrawGetTextDecoration method is: DecorationType DrawGetTextDecoration(DrawingWand *wand) A description of each parameter follows: wandThe 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 *wand) A description of each parameter follows: wandThe drawing wand. DrawGetVectorGraphics() returns a null-terminated string which specifies the vector graphics generated by any graphics calls made since the wand was instantiated. The string must be freed by the user once it is no longer required. The format of the DrawGetVectorGraphics method is: char *DrawGetVectorGraphics(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawGetTextUnderColor() returns the color of a background rectangle to place under text annotations. The format of the DrawGetTextUnderColor method is: void DrawGetTextUnderColor(const DrawingWand *wand, PixelWand *under_color) A description of each parameter follows: wandThe drawing wand. under_colorReturn the under color. 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 *wand,const double sx,const double sy, const double ex,const double ey) A description of each parameter follows: wandThe drawing wand. sxstarting x ordinate systarting y ordinate exending x ordinate eyending y ordinate 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 *wand,const double x,const double y, const PaintMethod paint_method) A description of each parameter follows: wandThe drawing wand. xx ordinate yy ordinate paint_methodpaint method. 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 *wand) A description of each parameter follows: wandThe drawing wand. 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 *wand,const double x1, const double y1,const double x2,const double y2,const double x, const double y) A description of each parameter follows: wandThe drawing wand. x1x ordinate of control point for curve beginning y1y ordinate of control point for curve beginning x2x ordinate of control point for curve ending y2y ordinate of control point for curve ending xx ordinate of the end of the curve yy ordinate of the end of the curve 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 *wand,const double x1, const double y1,const double x2,const double y2,const double x, const double y) A description of each parameter follows: wandThe drawing wand. x1x ordinate of control point for curve beginning y1y ordinate of control point for curve beginning x2x ordinate of control point for curve ending y2y ordinate of control point for curve ending xx ordinate of the end of the curve yy ordinate of the end of the curve 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 *wand, const double x1,const double y1,onst double x,const double y) A description of each parameter follows: wandThe drawing wand. x1x ordinate of the control point y1y ordinate of the control point xx ordinate of final point yy ordinate of final point 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 *wand, const double x1,const double y1,const double x,const double y) A description of each parameter follows: wandThe drawing wand. x1x ordinate of the control point y1y ordinate of the control point xx ordinate of final point yy ordinate of final point 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, DrawPathCurveToQuadraticBezierSmoothAbsolut 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 *wand,const double x,const double y) A description of each parameter follows: wandThe drawing wand. xx ordinate of final point yy ordinate of final point DrawPathCurveToQuadraticBezierSmoothAbsolute() 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, DrawPathCurveToQuadraticBezierSmoothAbsolut 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 *wand,const double x,const double y) A description of each parameter follows: wandThe drawing wand. xx ordinate of final point yy ordinate of final point 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 *wand, const double x2const double y2,const double x,const double y) A description of each parameter follows: wandThe drawing wand. x2x ordinate of second control point y2y ordinate of second control point xx ordinate of termination point yy ordinate of termination point 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 *wand, const double x2,const double y2,const double x,const double y) A description of each parameter follows: wandThe drawing wand. x2x ordinate of second control point y2y ordinate of second control point xx ordinate of termination point yy ordinate of termination point 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 *wand, const double rx,const double ry,const double x_axis_rotation, const MagickBooleanType large_arc_flag, const MagickBooleanType sweep_flag,const double x,const double y) A description of each parameter follows: wandThe drawing wand. rxx radius ryy radius x_axis_rotationindicates how the ellipse as a whole is rotated relative to the current coordinate system large_arc_flagIf non-zero (true) then draw the larger of the available arcs sweep_flagIf non-zero (true) then draw the arc matching a clock-wise rotation 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 *wand, const double rx,const double ry,const double x_axis_rotation, const MagickBooleanType large_arc_flag, const MagickBooleanType sweep_flag,const double x,const double y) A description of each parameter follows: wandThe drawing wand. rxx radius ryy radius x_axis_rotationindicates how the ellipse as a whole is rotated relative to the current coordinate system large_arc_flagIf non-zero (true) then draw the larger of the available arcs sweep_flagIf non-zero (true) then draw the arc matching a clock-wise rotation DrawPathFinish() terminates the current path. The format of the DrawPathFinish method is: void DrawPathFinish(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. 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 *wand,const double x,const double y) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate ytarget y ordinate 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 *wand,const double x, const double y) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate ytarget y ordinate 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 *wand, const PathMode mode,const double x) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate 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 *wand, const double x) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate 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 *wand, const double y) A description of each parameter follows: wandThe drawing wand. ytarget y ordinate 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 *wand, const double y) A description of each parameter follows: wandThe drawing wand. ytarget y ordinate 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 *wand,const double x, const double y) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate ytarget y ordinate 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 *wand,const double x, const double y) A description of each parameter follows: wandThe drawing wand. xtarget x ordinate ytarget y ordinate 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 *wand) A description of each parameter follows: wandThe drawing wand. 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 *wand,const double x,const double y) A description of each parameter follows: wandThe drawing wand. xtarget x coordinate ytarget y coordinate 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 *wand, const unsigned long number_coordinates,const PointInfo *coordinates) A description of each parameter follows: wandThe drawing wand. number_coordinatesnumber of coordinates coordinatescoordinate array 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 *wand, const unsigned long number_coordinates,const PointInfo *coordinates) A description of each parameter follows: wandThe drawing wand. number_coordinatesnumber of coordinates coordinatescoordinate array DrawPopClipPath() terminates a clip path definition. The format of the DrawPopClipPath method is: void DrawPopClipPath(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawPopDefs() terminates a definition list The format of the DrawPopDefs method is: void DrawPopDefs(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawPopPattern() terminates a pattern definition. The format of the DrawPopPattern method is: MagickBooleanType DrawPopPattern(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. 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 *wand,const char *clip_path_id) A description of each parameter follows: wandThe drawing wand. clip_path_idstring identifier to associate with the clip path for later use. 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 *wand) A description of each parameter follows: wandThe drawing wand. 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: MagickBooleanType DrawPushPattern(DrawingWand *wand, const char *pattern_id,const double x,const double y, const double width,const double height) A description of each parameter follows: wandThe drawing wand. pattern_idpattern identification for later reference xx ordinate of top left corner yy ordinate of top left corner widthwidth of pattern space heightheight of pattern space 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 *wand,const double x1, const double y1,const double x2,const double y2) A description of each parameter follows: x1x ordinate of first coordinate y1y ordinate of first coordinate x2x ordinate of second coordinate y2y ordinate of second coordinate DrawRender() renders all preceding drawing commands onto the image. The format of the DrawRender method is: MagickBooleanType DrawRender(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawResetVectorGraphics() resets the vector graphics associated with the specified wand. The format of the DrawResetVectorGraphics method is: void DrawResetVectorGraphics(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. DrawRotate() applies the specified rotation to the current coordinate space. The format of the DrawRotate method is: void DrawRotate(DrawingWand *wand,const double degrees) A description of each parameter follows: wandThe drawing wand. degreesdegrees of rotation 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 *wand,double x1,double y1, double x2,double y2,double rx,double ry) A description of each parameter follows: wandThe drawing wand. x1x ordinate of first coordinate y1y ordinate of first coordinate x2x ordinate of second coordinate y2y ordinate of second coordinate rxradius of corner in horizontal direction ryradius of corner in vertical direction 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 *wand,const double x,const double y) A description of each parameter follows: wandThe drawing wand. xhorizontal scale factor yvertical scale factor 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: MagickBooleanType DrawSetClipPath(DrawingWand *wand, const char *clip_path) A description of each parameter follows: wandThe drawing wand. clip_pathname of clipping path to associate with image DrawSetClipRule() set the polygon fill rule to be used by the clipping path. The format of the DrawSetClipRule method is: void DrawSetClipRule(DrawingWand *wand,const FillRule fill_rule) A description of each parameter follows: wandThe drawing wand. fill_rulefill rule (EvenOddRule or NonZeroRule) DrawSetClipUnits() sets the interpretation of clip path units. The format of the DrawSetClipUnits method is: void DrawSetClipUnits(DrawingWand *wand, const ClipPathUnits clip_units) A description of each parameter follows: wandThe drawing wand. clip_unitsunits to use (UserSpace, UserSpaceOnUse, or ObjectBoundingBox) DrawSetFillColor() sets the fill color to be used for drawing filled objects. The format of the DrawSetFillColor method is: void DrawSetFillColor(DrawingWand *wand,const PixelWand *fill_wand) A description of each parameter follows: wandThe drawing wand. fill_wandfill wand. DrawSetFillAlpha() sets the opacity to use when drawing using the fill color or fill texture. Fully opaque is 1.0. The format of the DrawSetFillAlpha method is: void DrawSetFillAlpha(DrawingWand *wand,const double fill_opacity) A description of each parameter follows: wandThe drawing wand. fill_opacityfill opacity 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: MagickBooleanType DrawSetFillPatternURL(DrawingWand *wand, const char *fill_url) A description of each parameter follows: wandThe drawing wand. fill_urlURL to use to obtain fill pattern. DrawSetFillRule() sets the fill rule to use while drawing polygons. The format of the DrawSetFillRule method is: void DrawSetFillRule(DrawingWand *wand,const FillRule fill_rule) A description of each parameter follows: wandThe drawing wand. fill_rulefill rule (EvenOddRule or NonZeroRule) DrawSetFont() sets the fully-sepecified font to use when annotating with text. The format of the DrawSetFont method is: MagickBooleanType DrawSetFont(DrawingWand *wand,const char *font_name) A description of each parameter follows: wandThe drawing wand. font_namefont name DrawSetFontFamily() sets the font family to use when annotating with text. The format of the DrawSetFontFamily method is: MagickBooleanType DrawSetFontFamily(DrawingWand *wand, const char *font_family) A description of each parameter follows: wandThe drawing wand. font_familyfont family DrawSetFontSize() sets the font pointsize to use when annotating with text. The format of the DrawSetFontSize method is: void DrawSetFontSize(DrawingWand *wand,const double pointsize) A description of each parameter follows: wandThe drawing wand. pointsizetext pointsize 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 *wand, const StretchType font_stretch) A description of each parameter follows: wandThe drawing wand. font_stretchfont stretch (NormalStretch, UltraCondensedStretch, CondensedStretch, SemiCondensedStretch, SemiExpandedStretch, ExpandedStretch, ExtraExpandedStretch, UltraExpandedStretch, AnyStretch) 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 *wand,const StyleType style) A description of each parameter follows: wandThe drawing wand. stylefont style (NormalStyle, ItalicStyle, ObliqueStyle, AnyStyle) DrawSetFontWeight() sets the font weight to use when annotating with text. The format of the DrawSetFontWeight method is: void DrawSetFontWeight(DrawingWand *wand, const unsigned long font_weight) A description of each parameter follows: wandThe drawing wand. font_weightfont weight (valid range 100-900) DrawSetGravity() sets the text placement gravity to use when annotating with text. The format of the DrawSetGravity method is: void DrawSetGravity(DrawingWand *wand,const GravityType gravity) A description of each parameter follows: wandThe drawing wand. gravitypositioning gravity (NorthWestGravity, NorthGravity, NorthEastGravity, WestGravity, CenterGravity, EastGravity, SouthWestGravity, SouthGravity, SouthEastGravity) DrawSetStrokeColor() sets the color used for stroking object outlines. The format of the DrawSetStrokeColor method is: void DrawSetStrokeColor(DrawingWand *wand, const PixelWand *stroke_wand) A description of each parameter follows: wandThe drawing wand. stroke_wandstroke wand. DrawSetStrokePatternURL() sets the pattern used for stroking object outlines. The format of the DrawSetStrokePatternURL method is: MagickBooleanType DrawSetStrokePatternURL(DrawingWand *wand, const char *stroke_url) A description of each parameter follows: wandThe drawing wand. stroke_urlURL specifying pattern ID (e.g. "#pattern_id") 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 *wand, const MagickBooleanType stroke_antialias) A description of each parameter follows: wandThe drawing wand. stroke_antialiasset to false (zero) to disable antialiasing DrawSetStrokeDashArray() specifies the pattern of dashes and gaps used to stroke paths. The strokeDashArray 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 strokeDashArray_ array might contain the members 5 3 2. The format of the DrawSetStrokeDashArray method is: MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand, const unsigned long number_elements,const double *dash_array) A description of each parameter follows: wandThe drawing wand. number_elementsnumber of elements in dash array dash_arraydash array values DrawSetStrokeDashOffset() specifies the offset into the dash pattern to start the dash. The format of the DrawSetStrokeDashOffset method is: void DrawSetStrokeDashOffset(DrawingWand *wand, const double dash_offset) A description of each parameter follows: wandThe drawing wand. dash_offsetdash offset 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 *wand, const LineCap linecap) A description of each parameter follows: wandThe drawing wand. linecaplinecap style 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 *wand, const LineJoin linejoin) A description of each parameter follows: wandThe drawing wand. linejoinline join style 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 *wand, const unsigned long miterlimit) A description of each parameter follows: wandThe drawing wand. miterlimitmiter limit DrawSetStrokeAlpha() specifies the opacity of stroked object outlines. The format of the DrawSetStrokeAlpha method is: void DrawSetStrokeAlpha(DrawingWand *wand, const double stroke_opacity) A description of each parameter follows: wandThe drawing wand. stroke_opacitystroke opacity. The value 1.0 is opaque. DrawSetStrokeWidth() sets the width of the stroke used to draw object outlines. The format of the DrawSetStrokeWidth method is: void DrawSetStrokeWidth(DrawingWand *wand, const double stroke_width) A description of each parameter follows: wandThe drawing wand. stroke_widthstroke width DrawSetTextAlignment() specifies a text alignment to be applied when annotating with text. The format of the DrawSetTextAlignment method is: void DrawSetTextAlignment(DrawingWand *wand,const AlignType alignment) A description of each parameter follows: wandThe drawing wand. alignmenttext alignment. One of UndefinedAlign, LeftAlign, CenterAlign, or RightAlign. DrawSetTextAntialias() controls whether text is antialiased. Text is antialiased by default. The format of the DrawSetTextAntialias method is: void DrawSetTextAntialias(DrawingWand *wand, const MagickBooleanType text_antialias) A description of each parameter follows: wandThe drawing wand. text_antialiasantialias boolean. Set to false (0) to disable antialiasing. DrawSetTextDecoration() specifies a decoration to be applied when annotating with text. The format of the DrawSetTextDecoration method is: void DrawSetTextDecoration(DrawingWand *wand, const DecorationType decoration) A description of each parameter follows: wandThe drawing wand. decorationtext decoration. One of NoDecoration, UnderlineDecoration, OverlineDecoration, or LineThroughDecoration 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 *wand,const char *encoding) A description of each parameter follows: wandThe drawing wand. encodingcharacter string specifying text encoding DrawSetTextUnderColor() specifies the color of a background rectangle to place under text annotations. The format of the DrawSetTextUnderColor method is: void DrawSetTextUnderColor(DrawingWand *wand, const PixelWand *under_wand) A description of each parameter follows: wandThe drawing wand. under_wandtext under wand. DrawSetVectorGraphics() sets the vector graphics associated with the specified wand. Use this method with DrawGetVectorGraphics() as a method to persist the vector graphics state. The format of the DrawSetVectorGraphics method is: MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, const char *xml) A description of each parameter follows: wandThe drawing wand. xmlThe drawing wand XML. DrawSkewX() skews the current coordinate system in the horizontal direction. The format of the DrawSkewX method is: void DrawSkewX(DrawingWand *wand,const double degrees) A description of each parameter follows: wandThe drawing wand. degreesnumber of degrees to skew the coordinates DrawSkewY() skews the current coordinate system in the vertical direction. The format of the DrawSkewY method is: void DrawSkewY(DrawingWand *wand,const double degrees) A description of each parameter follows: wandThe drawing wand. degreesnumber of degrees to skew the coordinates 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 *wand,const double x, const double y) A description of each parameter follows: wandThe drawing wand. xnew x ordinate for coordinate system origin ynew y ordinate for coordinate system origin 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 *wand,unsigned long x1, unsigned long y1,unsigned long x2,unsigned long y2) A description of each parameter follows: wandThe drawing wand. x1left x ordinate y1top y ordinate x2right x ordinate y2bottom y ordinate IsDrawingWand() returns MagickTrue if the wand is verified as a drawing wand. The format of the IsDrawingWand method is: MagickBooleanType IsDrawingWand(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. NewDrawingWand() returns a drawing wand required for all other methods in the API. The format of the NewDrawingWand method is: DrawingWand NewDrawingWand(void) PeekDrawingWand() returns the current drawing wand. The format of the PeekDrawingWand method is: DrawInfo *PeekDrawingWand(const DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. PopDrawingWand() destroys the current drawing wand and returns to the previously pushed drawing wand. Multiple drawing wands 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 PopDrawingWand method is: MagickBooleanType PopDrawingWand(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. PushDrawingWand() clones the current drawing wand to create a new drawing wand. The original drawing drawing wand(s) may be returned to by invoking PopDrawingWand(). 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 PushDrawingWand method is: MagickBooleanType PushDrawingWand(DrawingWand *wand) A description of each parameter follows: wandThe drawing wand. |