func (dw *DrawingWand) SetGravity(gravity GravityType) {
	C.MagickDrawSetGravity(dw.dw, C.GravityType(gravity))
}
Sets the text placement gravity to use when annotating with text.
package gmagick
import (
	"runtime"
	"sync"
	"sync/atomic"
	"unsafe"
)
import "C"
type DrawingWand struct {
	dw   *C.DrawingWand
	init sync.Once
}
func newDrawingWand(cdw *C.DrawingWand) *DrawingWand {
	dw := &DrawingWand{dw: cdw}
	runtime.SetFinalizer(dw, Destroy)
	dw.IncreaseCount()
	return dw
}
func NewDrawingWand() *DrawingWand {
	return newDrawingWand(C.NewDrawingWand())
}
func (dw *DrawingWand) Clone() *DrawingWand {
	return newDrawingWand(C.CloneDrawingWand(dw.dw))
}
func (dw *DrawingWand) Destroy() {
	if dw.dw == nil {
		return
	}
	dw.init.Do(func() {
		C.DestroyDrawingWand(dw.dw)
		dw.dw = nil
		dw.DecreaseCount()
	})
}
func (dw *DrawingWand) IncreaseCount() {
	atomic.AddInt64(&drawingWandCounter, int64(1))
	unsetCanTerminate()
}
func (dw *DrawingWand) DecreaseCount() {
	atomic.AddInt64(&drawingWandCounter, int64(-1))
	setCanTerminate()
}
func (dw *DrawingWand) Affine(affine *AffineMatrix) {
	C.MagickDrawAffine(dw.dw, affine.ptr())
}
func (dw *DrawingWand) Annotation(x, y float64, text string) {
	cstext := (*C.uchar)((unsafe.Pointer)(C.CString(text)))
	defer C.free(unsafe.Pointer(cstext))
	C.MagickDrawAnnotation(dw.dw, C.double(x), C.double(y), cstext)
}
func (dw *DrawingWand) Arc(sx, sy, ex, ey, sd, ed float64) {
	C.MagickDrawArc(dw.dw, C.double(sx), C.double(sy), C.double(ex), C.double(ey), C.double(sd), C.double(ed))
}
func (dw *DrawingWand) Bezier(coordinates []PointInfo) {
	ccoordinates := [1 << 16]C.PointInfo{}
	for k, v := range coordinates {
		ccoordinates[k] = C.PointInfo{C.double(v.X), C.double(v.Y)}
	}
	C.MagickDrawBezier(dw.dw, C.ulong(len(coordinates)), (*C.PointInfo)(&ccoordinates[0]))
}
func (dw *DrawingWand) Circle(ox, oy, px, py float64) {
	C.MagickDrawCircle(dw.dw, C.double(ox), C.double(oy), C.double(px), C.double(py))
}
func (dw *DrawingWand) Composite(compose CompositeOperator, x, y, width, height float64, mw *MagickWand) {
	C.draw_composite(dw.dw, C.CompositeOperator(compose), C.double(x), C.double(y), C.double(width), C.double(height), mw.mw)
}
func (dw *DrawingWand) Color(x, y float64, pm PaintMethod) {
	C.MagickDrawColor(dw.dw, C.double(x), C.double(y), C.PaintMethod(pm))
}
func (dw *DrawingWand) Comment(comment string) {
	cscomment := C.CString(comment)
	defer C.free(unsafe.Pointer(cscomment))
	C.MagickDrawComment(dw.dw, cscomment)
}
func (dw *DrawingWand) Ellipse(ox, oy, rx, ry, start, end float64) {
	C.MagickDrawEllipse(dw.dw, C.double(ox), C.double(oy), C.double(rx), C.double(ry), C.double(start), C.double(end))
}
func (dw *DrawingWand) GetClipPath() string {
	cscp := C.MagickDrawGetClipPath(dw.dw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(cscp))
	return C.GoString(cscp)
}
func (dw *DrawingWand) GetClipRule() FillRule {
	return FillRule(C.MagickDrawGetClipRule(dw.dw))
}
func (dw *DrawingWand) GetClipUnits() ClipPathUnits {
	return ClipPathUnits(C.MagickDrawGetClipUnits(dw.dw))
}
func (dw *DrawingWand) GetFillColor() (pw *PixelWand) {
	pw = NewPixelWand()
	C.MagickDrawGetFillColor(dw.dw, pw.pw)
	return
}
func (dw *DrawingWand) GetFillOpacity() float64 {
	return float64(C.MagickDrawGetFillOpacity(dw.dw))
}
func (dw *DrawingWand) GetFillRule() FillRule {
	return FillRule(C.MagickDrawGetFillRule(dw.dw))
}
func (dw *DrawingWand) GetFont() string {
	csfont := C.DrawGetFont(dw.dw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(csfont))
	return C.GoString(csfont)
}
func (dw *DrawingWand) GetFontFamily() string {
	csfamily := C.MagickDrawGetFontFamily(dw.dw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(csfamily))
	return C.GoString(csfamily)
}
func (dw *DrawingWand) GetFontSize() float64 {
	return float64(C.MagickDrawGetFontSize(dw.dw))
}
func (dw *DrawingWand) GetFontStretch() StretchType {
	return StretchType(C.MagickDrawGetFontStretch(dw.dw))
}
func (dw *DrawingWand) GetFontStyle() StyleType {
	return StyleType(C.MagickDrawGetFontStyle(dw.dw))
}
func (dw *DrawingWand) GetFontWeight() uint {
	return uint(C.MagickDrawGetFontWeight(dw.dw))
}
func (dw *DrawingWand) GetGravity() GravityType {
	return GravityType(C.MagickDrawGetGravity(dw.dw))
}
func (dw *DrawingWand) GetStrokeAntialias() bool {
	return 1 == C.MagickDrawGetStrokeAntialias(dw.dw)
}
func (dw *DrawingWand) GetStrokeColor() (pw *PixelWand) {
	pw = NewPixelWand()
	C.MagickDrawGetStrokeColor(dw.dw, pw.pw)
	return
}
func (dw *DrawingWand) GetStrokeDashArray() (nums []float64) {
	count := C.ulong(0)
	p := C.MagickDrawGetStrokeDashArray(dw.dw, &count)
	nums = sizedDoubleArrayToFloat64Slice(p, count)
	return
}
func (dw *DrawingWand) GetStrokeDashOffset() float64 {
	return float64(C.MagickDrawGetStrokeDashOffset(dw.dw))
}
func (dw *DrawingWand) GetStrokeLineCap() LineCap {
	return LineCap(C.MagickDrawGetStrokeLineCap(dw.dw))
}
func (dw *DrawingWand) GetStrokeLineJoin() LineJoin {
	return LineJoin(C.MagickDrawGetStrokeLineJoin(dw.dw))
}
func (dw *DrawingWand) GetStrokeMiterLimit() uint {
	return uint(C.MagickDrawGetStrokeMiterLimit(dw.dw))
}
func (dw *DrawingWand) GetStrokeOpacity() float64 {
	return float64(C.MagickDrawGetStrokeOpacity(dw.dw))
}
func (dw *DrawingWand) GetStrokeWidth() float64 {
	return float64(C.MagickDrawGetStrokeWidth(dw.dw))
}
func (dw *DrawingWand) GetTextAntialias() bool {
	return 1 == C.MagickDrawGetTextAntialias(dw.dw)
}
func (dw *DrawingWand) GetTextDecoration() DecorationType {
	return DecorationType(C.MagickDrawGetTextDecoration(dw.dw))
}
func (dw *DrawingWand) GetTextEncoding() string {
	cstr := C.MagickDrawGetTextEncoding(dw.dw)
	defer C.MagickRelinquishMemory(unsafe.Pointer(cstr))
	return C.GoString(cstr)
}
func (dw *DrawingWand) GetTextUnderColor() (pw *PixelWand) {
	pw = NewPixelWand()
	C.MagickDrawGetTextUnderColor(dw.dw, pw.pw)
	return
}
func (dw *DrawingWand) Line(sx, sy, ex, ey float64) {
	C.MagickDrawLine(dw.dw, C.double(sx), C.double(sy), C.double(ex), C.double(ey))
}
func (dw *DrawingWand) Matte(x, y float64, pmethod PaintMethod) {
	C.MagickDrawMatte(dw.dw, C.double(x), C.double(y), C.PaintMethod(pmethod))
}
func (dw *DrawingWand) PathClose() {
	C.MagickDrawPathClose(dw.dw)
}
func (dw *DrawingWand) PathCurveToAbsolute(x1, y1, x2, y2, x, y float64) {
	C.MagickDrawPathCurveToAbsolute(dw.dw, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToRelative(x1, y1, x2, y2, x, y float64) {
	C.MagickDrawPathCurveToRelative(dw.dw, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToQuadraticBezierAbsolute(x1, y1, x, y float64) {
	C.MagickDrawPathCurveToQuadraticBezierAbsolute(dw.dw, C.double(x1), C.double(y1), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToQuadraticBezierRelative(x1, y1, x, y float64) {
	C.MagickDrawPathCurveToQuadraticBezierRelative(dw.dw, C.double(x1), C.double(y1), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToQuadraticBezierSmoothAbsolute(x, y float64) {
	C.MagickDrawPathCurveToQuadraticBezierSmoothAbsolute(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToQuadraticBezierSmoothRelative(x, y float64) {
	C.MagickDrawPathCurveToQuadraticBezierSmoothRelative(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToSmoothAbsolute(x2, y2, x, y float64) {
	C.MagickDrawPathCurveToSmoothAbsolute(dw.dw, C.double(x2), C.double(y2), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathCurveToSmoothRelative(x2, y2, x, y float64) {
	C.MagickDrawPathCurveToSmoothRelative(dw.dw, C.double(x2), C.double(y2), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathEllipticArcAbsolute(rx, ry, xAxisRotation float64, largeArcFlag, sweepFlag bool, x, y float64) {
	C.MagickDrawPathEllipticArcAbsolute(dw.dw, C.double(rx), C.double(ry), C.double(xAxisRotation), b2i(largeArcFlag), b2i(sweepFlag), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathEllipticArcRelative(rx, ry, xAxisRotation float64, largeArcFlag, sweepFlag bool, x, y float64) {
	C.MagickDrawPathEllipticArcRelative(dw.dw, C.double(rx), C.double(ry), C.double(xAxisRotation), b2i(largeArcFlag), b2i(sweepFlag), C.double(x), C.double(y))
}
func (dw *DrawingWand) PathFinish() {
	C.MagickDrawPathFinish(dw.dw)
}
func (dw *DrawingWand) PathLineToAbsolute(x, y float64) {
	C.MagickDrawPathLineToAbsolute(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathLineToRelative(x, y float64) {
	C.MagickDrawPathLineToRelative(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathLineToHorizontalAbsolute(x float64) {
	C.MagickDrawPathLineToHorizontalAbsolute(dw.dw, C.double(x))
}
func (dw *DrawingWand) PathLineToHorizontalRelative(x float64) {
	C.MagickDrawPathLineToHorizontalRelative(dw.dw, C.double(x))
}
func (dw *DrawingWand) PathLineToVerticalAbsolute(y float64) {
	C.MagickDrawPathLineToVerticalAbsolute(dw.dw, C.double(y))
}
func (dw *DrawingWand) PathLineToVerticalRelative(y float64) {
	C.MagickDrawPathLineToVerticalRelative(dw.dw, C.double(y))
}
func (dw *DrawingWand) PathMoveToAbsolute(x, y float64) {
	C.MagickDrawPathMoveToAbsolute(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathMoveToRelative(x, y float64) {
	C.MagickDrawPathMoveToRelative(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) PathStart() {
	C.MagickDrawPathStart(dw.dw)
}
func (dw *DrawingWand) Point(x, y float64) {
	C.DrawPoint(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) Polygon(coordinates []PointInfo) {
	ccoordinates := [1 << 16]C.PointInfo{}
	for k, v := range coordinates {
		ccoordinates[k] = C.PointInfo{C.double(v.X), C.double(v.Y)}
	}
	C.MagickDrawPolygon(dw.dw, C.ulong(len(coordinates)), (*C.PointInfo)(&ccoordinates[0]))
}
func (dw *DrawingWand) Polyline(coordinates []PointInfo) {
	ccoordinates := [1 << 16]C.PointInfo{}
	for k, v := range coordinates {
		ccoordinates[k] = C.PointInfo{C.double(v.X), C.double(v.Y)}
	}
	C.MagickDrawPolyline(dw.dw, C.ulong(len(coordinates)), (*C.PointInfo)(&ccoordinates[0]))
}
func (dw *DrawingWand) PopClipPath() {
	C.DrawPopClipPath(dw.dw)
}
func (dw *DrawingWand) PopDefs() {
	C.MagickDrawPopDefs(dw.dw)
}
func (dw *DrawingWand) PopPattern() {
	C.MagickDrawPopPattern(dw.dw)
}
func (dw *DrawingWand) PushClipPath(clipMaskId string) {
	cstr := C.CString(clipMaskId)
	defer C.free(unsafe.Pointer(cstr))
	C.MagickDrawPushClipPath(dw.dw, cstr)
}
func (dw *DrawingWand) PushDefs() {
	C.MagickDrawPushDefs(dw.dw)
}
func (dw *DrawingWand) PushPattern(patternId string, x, y, width, height float64) {
	cstr := C.CString(patternId)
	defer C.free(unsafe.Pointer(cstr))
	C.MagickDrawPushPattern(dw.dw, cstr, C.double(x), C.double(y), C.double(width), C.double(height))
}
func (dw *DrawingWand) Rectangle(x1, y1, x2, y2 float64) {
	C.MagickDrawRectangle(dw.dw, C.double(x1), C.double(y1), C.double(x2), C.double(y2))
}
func (dw *DrawingWand) Rotate(degrees float64) {
	C.MagickDrawRotate(dw.dw, C.double(degrees))
}
func (dw *DrawingWand) RoundRectangle(x1, y1, x2, y2, rx, ry float64) {
	C.MagickDrawRoundRectangle(dw.dw, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(rx), C.double(ry))
}
func (dw *DrawingWand) Scale(x, y float64) {
	C.MagickDrawScale(dw.dw, C.double(x), C.double(y))
}
func (dw *DrawingWand) SetClipPath(clipMaskId string) {
	cstr := C.CString(clipMaskId)
	defer C.free(unsafe.Pointer(cstr))
	C.MagickDrawSetClipPath(dw.dw, cstr)
}
func (dw *DrawingWand) SetClipRule(fillRule FillRule) {
	C.MagickDrawSetClipRule(dw.dw, C.FillRule(fillRule))
}
func (dw *DrawingWand) SetClipUnits(clipUnits ClipPathUnits) {
	C.MagickDrawSetClipUnits(dw.dw, C.ClipPathUnits(clipUnits))
}
func (dw *DrawingWand) SetFillColor(fillWand *PixelWand) {
	C.MagickDrawSetFillColor(dw.dw, fillWand.pw)
}
func (dw *DrawingWand) SetFillOpacity(opacity float64) {
	C.DrawSetFillOpacity(dw.dw, C.double(opacity))
}
func (dw *DrawingWand) SetFillPatternURL(fillUrl string) {
	cstr := C.CString(fillUrl)
	defer C.free(unsafe.Pointer(cstr))
	C.MagickDrawSetFillPatternURL(dw.dw, cstr)
}
func (dw *DrawingWand) SetFillRule(fillRule FillRule) {
	C.MagickDrawSetFillRule(dw.dw, C.FillRule(fillRule))
}
func (dw *DrawingWand) SetFont(fontName string) {
	csFontName := C.CString(fontName)
	defer C.free(unsafe.Pointer(csFontName))
	C.MagickDrawSetFont(dw.dw, csFontName)
}
func (dw *DrawingWand) SetFontFamily(fontFamily string) {
	csFontFamily := C.CString(fontFamily)
	defer C.free(unsafe.Pointer(csFontFamily))
	C.MagickDrawSetFontFamily(dw.dw, csFontFamily)
}
func (dw *DrawingWand) SetFontSize(pointSize float64) {
	C.MagickDrawSetFontSize(dw.dw, C.double(pointSize))
}
func (dw *DrawingWand) SetFontStretch(fontStretch StretchType) {
	C.MagickDrawSetFontStretch(dw.dw, C.StretchType(fontStretch))
}
func (dw *DrawingWand) SetFontStyle(style StyleType) {
	C.MagickDrawSetFontStyle(dw.dw, C.StyleType(style))
}
func (dw *DrawingWand) SetFontWeight(fontWeight uint) {
	C.MagickDrawSetFontWeight(dw.dw, C.ulong(fontWeight))
}