MagickWand, C API: Drawing Wand Methods
ClearDrawingWand • CloneDrawingWand • DestroyDrawingWand • DrawAffine • DrawAlpha • DrawAnnotation • DrawArc • DrawBezier • DrawCircle • DrawClearException • DrawCloneExceptionInfo • DrawColor • DrawComposite • DrawComment • DrawEllipse • DrawGetBorderColor • DrawGetClipPath • DrawGetClipRule • DrawGetClipUnits • DrawGetDensity • DrawGetException • DrawGetExceptionType • DrawGetFillColor • DrawGetFillOpacity • DrawGetFillRule • DrawGetFont • DrawGetFontFamily • DrawGetFontResolution • DrawGetFontSize • DrawGetFontStretch • DrawGetFontStyle • DrawGetFontWeight • DrawGetGravity • DrawGetOpacity • DrawGetStrokeAntialias • DrawGetStrokeColor • DrawGetStrokeDashArray • DrawGetStrokeDashOffset • DrawGetStrokeLineCap • DrawGetStrokeLineJoin • DrawGetStrokeMiterLimit • DrawGetStrokeOpacity • DrawGetStrokeWidth • DrawGetTextAlignment • DrawGetTextAntialias • DrawGetTextDecoration • DrawGetTextDirection • DrawGetTextEncoding • DrawGetTextKerning • DrawGetTextInterlineSpacing • DrawGetTextInterwordSpacing • DrawGetTypeMetrics • DrawGetVectorGraphics • DrawGetTextUnderColor • DrawLine • DrawPathClose • DrawPathCurveToAbsolute • DrawPathCurveToRelative • DrawPathCurveToQuadraticBezierAbsolute • DrawPathCurveToQuadraticBezierRelative • DrawPathCurveToQuadraticBezierSmoothAbsolute • DrawPathCurveToQuadraticBezierSmoothRelative • DrawPathCurveToSmoothAbsolute • DrawPathCurveToSmoothRelative • DrawPathEllipticArcAbsolute • DrawPathEllipticArcRelative • DrawPathFinish • DrawPathLineToAbsolute • DrawPathLineToRelative • DrawPathLineToHorizontalAbsolute • DrawPathLineToHorizontalRelative • DrawPathLineToVerticalAbsolute • DrawPathLineToVerticalRelative • DrawPathMoveToAbsolute • DrawPathMoveToRelative • DrawPathStart • DrawPoint • DrawPolygon • DrawPolyline • DrawPopClipPath • DrawPopDefs • DrawPopPattern • DrawPushClipPath • DrawPushDefs • DrawPushPattern • DrawRectangle • DrawResetVectorGraphics • DrawRotate • DrawRoundRectangle • DrawScale • DrawSetBorderColor • DrawSetClipPath • DrawSetClipRule • DrawSetClipUnits • DrawSetDensity • DrawSetFillColor • DrawSetFillOpacity • DrawSetFontResolution • DrawSetOpacity • DrawSetFillPatternURL • DrawSetFillRule • DrawSetFont • DrawSetFontFamily • DrawSetFontSize • DrawSetFontStretch • DrawSetFontStyle • DrawSetFontWeight • DrawSetGravity • DrawSetStrokeColor • DrawSetStrokePatternURL • DrawSetStrokeAntialias • DrawSetStrokeDashArray • DrawSetStrokeDashOffset • DrawSetStrokeLineCap • DrawSetStrokeLineJoin • DrawSetStrokeMiterLimit • DrawSetStrokeOpacity • DrawSetStrokeWidth • DrawSetTextAlignment • DrawSetTextAntialias • DrawSetTextDecoration • DrawSetTextDirection • DrawSetTextEncoding • DrawSetTextKerning • DrawSetTextInterlineSpacing • DrawSetTextInterwordSpacing • DrawSetTextUnderColor • DrawSetVectorGraphics • DrawSkewX • DrawSkewY • DrawTranslate • DrawSetViewbox • IsDrawingWand • NewDrawingWand • PeekDrawingWand • PopDrawingWand • PushDrawingWand
ClearDrawingWand
ClearDrawingWand() clears resources associated with the drawing wand.
The format of the ClearDrawingWand method is:
void ClearDrawingWand(DrawingWand *wand)
A description of each parameter follows:
-
- wand
- the drawing wand to clear.
CloneDrawingWand
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:
- wand
- the magick wand.
DestroyDrawingWand
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:
- wand
- the drawing wand to destroy.
DrawAffine
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:
- wand
- Drawing wand
- affine
- Affine matrix parameters
DrawAlpha
DrawAlpha() paints on the image's alpha channel in order to set effected pixels to transparent. 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 DrawAlpha method is:
void DrawAlpha(DrawingWand *wand,const double x,const double y, const PaintMethod paint_method)
A description of each parameter follows:
- wand
- the drawing wand.
- x
- x ordinate
- y
- y ordinate
- paint_method
- paint method.
DrawAnnotation
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:
- wand
- the drawing wand.
- x
- x ordinate to left of text
- y
- y ordinate to text baseline
- text
- text to draw
DrawArc
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:
- wand
- the drawing wand.
- sx
- starting x ordinate of bounding rectangle
- sy
- starting y ordinate of bounding rectangle
- ex
- ending x ordinate of bounding rectangle
- ey
- ending y ordinate of bounding rectangle
- sd
- starting degrees of rotation
- ed
- ending degrees of rotation
DrawBezier
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 size_t number_coordinates,const PointInfo *coordinates)
A description of each parameter follows:
- wand
- the drawing wand.
- number_coordinates
- number of coordinates
- coordinates
- coordinates
DrawCircle
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:
- wand
- the drawing wand.
- ox
- origin x ordinate
- oy
- origin y ordinate
- px
- perimeter x ordinate
- py
- perimeter y ordinate
DrawClearException
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:
- wand
- the drawing wand.
DrawCloneExceptionInfo
DrawCloneExceptionInfo() clones the ExceptionInfo structure within the wand.
The format of the DrawCloneExceptionInfo method is:
ExceptionInfo *DrawCloneExceptionInfo(DrawWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawColor
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:
- wand
- the drawing wand.
- x
- x ordinate.
- y
- y ordinate.
- paint_method
- paint method.
DrawComposite
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:
- wand
- the drawing wand.
- compose
- composition operator
- x
- x ordinate of top left corner
- y
- y ordinate of top left corner
- width
- Width to resize image to prior to compositing. Specify zero to use existing width.
- height
- Height to resize image to prior to compositing. Specify zero to use existing height.
- magick_wand
- Image to composite is obtained from this wand.
DrawComment
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:
- wand
- the drawing wand.
- comment
- comment text
DrawEllipse
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:
- wand
- the drawing wand.
- ox
- origin x ordinate
- oy
- origin y ordinate
- rx
- radius in x
- ry
- radius in y
- start
- starting rotation in degrees
- end
- ending rotation in degrees
DrawGetBorderColor
DrawGetBorderColor() returns the border color used for drawing bordered objects.
The format of the DrawGetBorderColor method is:
void DrawGetBorderColor(const DrawingWand *wand, PixelWand *border_color)
A description of each parameter follows:
- wand
- the drawing wand.
- border_color
- Return the border color.
DrawGetClipPath
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:
- wand
- the drawing wand.
DrawGetClipRule
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:
- wand
- the drawing wand.
DrawGetClipUnits
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:
- wand
- the drawing wand.
DrawGetDensity
DrawGetDensity() obtains the vertical and horizontal resolution. The value returned must be deallocated by the user when it is no longer needed.
The format of the DrawGetDensity method is:
char *DrawGetDensity(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetException
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:
- wand
- the drawing wand.
- severity
- the severity of the error is returned here.
DrawGetExceptionType
DrawGetExceptionType() the exception type associated with the wand. If no exception has occurred, UndefinedExceptionType is returned.
The format of the DrawGetExceptionType method is:
ExceptionType DrawGetExceptionType(const DrawWand *wand)
A description of each parameter follows:
- wand
- the magick wand.
DrawGetFillColor
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:
- wand
- the drawing wand.
- fill_color
- Return the fill color.
DrawGetFillOpacity
DrawGetFillOpacity() returns the alpha 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 *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetFillRule
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:
- wand
- the drawing wand.
DrawGetFont
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:
- wand
- the drawing wand.
DrawGetFontFamily
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:
- wand
- the drawing wand.
DrawGetFontResolution
DrawGetFontResolution() gets the image X and Y resolution.
The format of the DrawGetFontResolution method is:
MagickBooleanType DrawGetFontResolution(const DrawingWand *wand, double *x,double *y)
A description of each parameter follows:
- wand
- the magick wand.
- x
- the x-resolution.
- y
- the y-resolution.
DrawGetFontSize
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:
- wand
- the drawing wand.
DrawGetFontStretch
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:
- wand
- the drawing wand.
DrawGetFontStyle
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:
- wand
- the drawing wand.
DrawGetFontWeight
DrawGetFontWeight() returns the font weight used when annotating with text.
The format of the DrawGetFontWeight method is:
size_t DrawGetFontWeight(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetGravity
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:
- wand
- the drawing wand.
DrawGetOpacity
DrawGetOpacity() returns the alpha used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.
The format of the DrawGetOpacity method is:
double DrawGetOpacity(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetStrokeAntialias
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:
- wand
- the drawing wand.
DrawGetStrokeColor
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:
- wand
- the drawing wand.
- stroke_color
- Return the stroke color.
DrawGetStrokeDashArray
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, size_t *number_elements)
A description of each parameter follows:
- wand
- the drawing wand.
- number_elements
- address to place number of elements in dash array
DrawGetStrokeDashOffset
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:
- wand
- the drawing wand.
DrawGetStrokeLineCap
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:
- wand
- the drawing wand.
DrawGetStrokeLineJoin
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:
- wand
- the drawing wand.
DrawGetStrokeMiterLimit
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:
size_t DrawGetStrokeMiterLimit(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetStrokeOpacity
DrawGetStrokeOpacity() returns the alpha of stroked object outlines.
The format of the DrawGetStrokeOpacity method is:
double DrawGetStrokeOpacity(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetStrokeWidth
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:
- wand
- the drawing wand.
DrawGetTextAlignment
DrawGetTextAlignment() returns the alignment applied when annotating with text.
The format of the DrawGetTextAlignment method is:
AlignType DrawGetTextAlignment(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextAntialias
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:
- wand
- the drawing wand.
DrawGetTextDecoration
DrawGetTextDecoration() returns the decoration applied when annotating with text.
The format of the DrawGetTextDecoration method is:
DecorationType DrawGetTextDecoration(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextDirection
DrawGetTextDirection() returns the direction that will be used when annotating with text.
The format of the DrawGetTextDirection method is:
DirectionType DrawGetTextDirection(const DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextEncoding
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:
- wand
- the drawing wand.
DrawGetTextKerning
DrawGetTextKerning() gets the spacing between characters in text.
The format of the DrawSetFontKerning method is:
double DrawGetTextKerning(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextInterlineSpacing
DrawGetTextInterlineSpacing() gets the spacing between lines in text.
The format of the DrawGetTextInterlineSpacing method is:
double DrawGetTextInterlineSpacing(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextInterwordSpacing
DrawGetTextInterwordSpacing() gets the spacing between words in text.
The format of the DrawSetFontKerning method is:
double DrawGetTextInterwordSpacing(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTypeMetrics
DrawGetTypeMetrics() returns the following information for the specified font and text:
character width character height ascender descender text width text height maximum horizontal advance bounds: x1 bounds: y1 bounds: x2 bounds: y2 origin: x origin: y underline position underline thickness
The format of the DrawGetTypeMetrics method is:
MagickBooleanType DrawGetTypeMetrics(const DrawingWand *wand, const char *text,MagickBooleanType ignore_newlines, $ TypeMetric *metrics)
A description of each parameter follows:
- wand
- the drawing wand.
- text
- text to draw.
- metrics
- Return the font metrics in this structure.
- ignore_newlines
- indicates whether newlines should be ignored.
- metrics
- Return the font metrics in this structure.
DrawGetVectorGraphics
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(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawGetTextUnderColor
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:
- wand
- the drawing wand.
- under_color
- Return the under color.
DrawLine
DrawLine() draws a line on the image using the current stroke color, stroke alpha, 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:
- wand
- the drawing wand.
- sx
- starting x ordinate
- sy
- starting y ordinate
- ex
- ending x ordinate
- ey
- ending y ordinate
DrawPathClose
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:
- wand
- the drawing wand.
DrawPathCurveToAbsolute
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:
- wand
- the drawing wand.
- x1
- x ordinate of control point for curve beginning
- y1
- y ordinate of control point for curve beginning
- x2
- x ordinate of control point for curve ending
- y2
- y ordinate of control point for curve ending
- x
- x ordinate of the end of the curve
- y
- y ordinate of the end of the curve
DrawPathCurveToRelative
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:
- wand
- the drawing wand.
- x1
- x ordinate of control point for curve beginning
- y1
- y ordinate of control point for curve beginning
- x2
- x ordinate of control point for curve ending
- y2
- y ordinate of control point for curve ending
- x
- x ordinate of the end of the curve
- y
- y ordinate of the end of the curve
DrawPathCurveToQuadraticBezierAbsolute
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:
- wand
- the drawing wand.
- x1
- x ordinate of the control point
- y1
- y ordinate of the control point
- x
- x ordinate of final point
- y
- y ordinate of final point
DrawPathCurveToQuadraticBezierRelative
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:
- wand
- the drawing wand.
- x1
- x ordinate of the control point
- y1
- y ordinate of the control point
- x
- x ordinate of final point
- y
- y ordinate of final point
DrawPathCurveToQuadraticBezierSmoothAbsolute
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 *wand,const double x,const double y)
A description of each parameter follows:
- wand
- the drawing wand.
- x
- x ordinate of final point
- y
- y ordinate of final point
DrawPathCurveToQuadraticBezierSmoothRelative
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 *wand, const double x,const double y)
A description of each parameter follows:
- wand
- the drawing wand.
- x
- x ordinate of final point
- y
- y ordinate of final point
DrawPathCurveToSmoothAbsolute
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 x2,const double y2,const double x,const double y)
A description of each parameter follows:
- wand
- the drawing wand.
- x2
- x ordinate of second control point
- y2
- y ordinate of second control point
- x
- x ordinate of termination point
- y
- y ordinate of termination point
DrawPathCurveToSmoothRelative
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:
- wand
- the drawing wand.
- x2
- x ordinate of second control point
- y2
- y ordinate of second control point
- x
- x ordinate of termination point
- y
- y ordinate of termination point
DrawPathEllipticArcAbsolute
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 automagically 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:
- wand
- the drawing wand.
- rx
- x radius
- ry
- y radius
- x_axis_rotation
- indicates how the ellipse as a whole is rotated relative to the current coordinate system
- large_arc_flag
- If non-zero (true) then draw the larger of the available arcs
- sweep_flag
- If non-zero (true) then draw the arc matching a clock-wise rotation
DrawPathEllipticArcRelative
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 automagically 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:
- wand
- the drawing wand.
- rx
- x radius
- ry
- y radius
- x_axis_rotation
- indicates how the ellipse as a whole is rotated relative to the current coordinate system
- large_arc_flag
- If non-zero (true) then draw the larger of the available arcs
- sweep_flag
- If non-zero (true) then draw the arc matching a clock-wise rotation
DrawPathFinish
DrawPathFinish() terminates the current path.
The format of the DrawPathFinish method is:
void DrawPathFinish(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawPathLineToAbsolute
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:
- wand
- the drawing wand.
- x
- target x ordinate
- y
- target y ordinate
DrawPathLineToRelative
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:
- wand
- the drawing wand.
- x
- target x ordinate
- y
- target y ordinate
DrawPathLineToHorizontalAbsolute
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 double x)
A description of each parameter follows:
- wand
- the drawing wand.
- x
- target x ordinate
DrawPathLineToHorizontalRelative
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:
- wand
- the drawing wand.
- x
- target x ordinate
DrawPathLineToVerticalAbsolute
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:
- wand
- the drawing wand.
- y
- target y ordinate
DrawPathLineToVerticalRelative
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:
- wand
- the drawing wand.
- y
- target y ordinate
DrawPathMoveToAbsolute
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:
- wand
- the drawing wand.
- x
- target x ordinate
- y
- target y ordinate
DrawPathMoveToRelative
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:
- wand
- the drawing wand.
- x
- target x ordinate
- y
- target y ordinate
DrawPathStart
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:
- wand
- the drawing wand.
DrawPoint
DrawPoint() draws a point using the current fill color.
The format of the DrawPoint method is:
void DrawPoint(DrawingWand *wand,const double x,const double y)
A description of each parameter follows:
- wand
- the drawing wand.
- x
- target x coordinate
- y
- target y coordinate
DrawPolygon
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 size_t number_coordinates,const PointInfo *coordinates)
A description of each parameter follows:
- wand
- the drawing wand.
- number_coordinates
- number of coordinates
- coordinates
- coordinate array
DrawPolyline
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 size_t number_coordinates,const PointInfo *coordinates)
A description of each parameter follows:
- wand
- the drawing wand.
- number_coordinates
- number of coordinates
- coordinates
- coordinate array
DrawPopClipPath
DrawPopClipPath() terminates a clip path definition.
The format of the DrawPopClipPath method is:
void DrawPopClipPath(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawPopDefs
DrawPopDefs() terminates a definition list.
The format of the DrawPopDefs method is:
void DrawPopDefs(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawPopPattern
DrawPopPattern() terminates a pattern definition.
The format of the DrawPopPattern method is:
MagickBooleanType DrawPopPattern(DrawingWand *wand)
A description of each parameter follows:
- wand
- the drawing wand.
DrawPushClipPath
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_mask_id)
A description of each parameter follows:
- wand
- the drawing wand.
- clip_mask_id
- string identifier to associate with the clip path for later use.
DrawPushDefs
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: