func (cr *Context) Rectangle(x, y, width, height float64) {
	C.cairo_rectangle(cr.Ptr, C.double(x), C.double(y), C.double(width), C.double(height))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
See cairo_rectangle().

C API documentation: http://cairographics.org/manual/cairo-Paths.html#cairo-rectangle
package cairo
import (
	"fmt"
	"io"
	"runtime"
	"unsafe"
)
import "C"
func (s Status) Error() string {
	return C.GoString(C.cairo_status_to_string(C.cairo_status_t(s)))
}
func (surface *Surface) WriteToPNG(w io.Writer) error {
	data := writeClosure{w: w}
	key := goPointers.put(data)
	status := C.cairo_surface_write_to_png_stream((*C.cairo_surface_t)(surface.Ptr),
		(C.cairo_write_func_t)(unsafe.Pointer(C.gocairo_write_func)),
		unsafe.Pointer(&key))
	goPointers.clear(key)
	return Status(status).toError()
}
func ImageSurfaceCreateFromPNGStream(r io.Reader) (*ImageSurface, error) {
	data := readClosure{r: r}
	key := goPointers.put(data)
	surf := &ImageSurface{wrapSurface(C.cairo_image_surface_create_from_png_stream(
		(C.cairo_read_func_t)(unsafe.Pointer(C.gocairo_read_func)),
		unsafe.Pointer(&key)))}
	goPointers.clear(key)
	return surf, surf.status()
}
func (p *Path) Iter() *PathIter {
	return &PathIter{path: p, i: 0}
}
type PathIter struct {
	path *Path
	i    C.int
}
func (pi *PathIter) Next() *PathSegment {
	if pi.i >= pi.path.Ptr.num_data {
		return nil
	}
	dataArray := (*[1 << 30]C.cairo_path_data_t)(unsafe.Pointer(pi.path.Ptr.data))
	seg, ofs := decodePathSegment(unsafe.Pointer(&dataArray[pi.i]))
	pi.i += C.int(ofs)
	return seg
}
type ImageSurface struct {
	*Surface
}
type RecordingSurface struct {
	*Surface
}
type SurfaceObserver struct {
	*Surface
}
type ToyFontFace struct {
	*FontFace
}
type MeshPattern struct {
	*Pattern
}
type SVGSurface struct {
	*Surface
}
type XlibSurface struct {
	*Surface
}
type XlibDevice struct {
	*Device
}
func Version() int {
	ret := int(C.cairo_version())
	return ret
}
func VersionString() string {
	ret := C.GoString(C.cairo_version_string())
	return ret
}
type Context struct {
	Ptr *C.cairo_t
}
func freeContext(obj *Context) {
	C.cairo_destroy(obj.Ptr)
}
func wrapContext(p *C.cairo_t) *Context {
	ret := &Context{p}
	runtime.SetFinalizer(ret, freeContext)
	return ret
}
func WrapContext(p unsafe.Pointer) *Context {
	return wrapContext((*C.cairo_t)(p))
}
func BorrowContext(p unsafe.Pointer) *Context {
	return &Context{(*C.cairo_t)(p)}
}
type Surface struct {
	Ptr *C.cairo_surface_t
}
func freeSurface(obj *Surface) {
	C.cairo_surface_destroy(obj.Ptr)
}
func wrapSurface(p *C.cairo_surface_t) *Surface {
	ret := &Surface{p}
	runtime.SetFinalizer(ret, freeSurface)
	return ret
}
func WrapSurface(p unsafe.Pointer) *Surface {
	return wrapSurface((*C.cairo_surface_t)(p))
}
func BorrowSurface(p unsafe.Pointer) *Surface {
	return &Surface{(*C.cairo_surface_t)(p)}
}
type Device struct {
	Ptr *C.cairo_device_t
}
func freeDevice(obj *Device) {
	C.cairo_device_destroy(obj.Ptr)
}
func wrapDevice(p *C.cairo_device_t) *Device {
	ret := &Device{p}
	runtime.SetFinalizer(ret, freeDevice)
	return ret
}
func WrapDevice(p unsafe.Pointer) *Device {
	return wrapDevice((*C.cairo_device_t)(p))
}
func BorrowDevice(p unsafe.Pointer) *Device {
	return &Device{(*C.cairo_device_t)(p)}
}
type Matrix struct {
	Xx float64
	Yx float64
	Xy float64
	Yy float64
	X0 float64
	Y0 float64
}
type Pattern struct {
	Ptr *C.cairo_pattern_t
}
func freePattern(obj *Pattern) {
	C.cairo_pattern_destroy(obj.Ptr)
}
func wrapPattern(p *C.cairo_pattern_t) *Pattern {
	ret := &Pattern{p}
	runtime.SetFinalizer(ret, freePattern)
	return ret
}
func WrapPattern(p unsafe.Pointer) *Pattern {
	return wrapPattern((*C.cairo_pattern_t)(p))
}
func BorrowPattern(p unsafe.Pointer) *Pattern {
	return &Pattern{(*C.cairo_pattern_t)(p)}
}
type Status int
const (
	StatusSuccess                 Status = C.CAIRO_STATUS_SUCCESS
	StatusNoMemory                Status = C.CAIRO_STATUS_NO_MEMORY
	StatusInvalidRestore          Status = C.CAIRO_STATUS_INVALID_RESTORE
	StatusInvalidPopGroup         Status = C.CAIRO_STATUS_INVALID_POP_GROUP
	StatusNoCurrentPoint          Status = C.CAIRO_STATUS_NO_CURRENT_POINT
	StatusInvalidMatrix           Status = C.CAIRO_STATUS_INVALID_MATRIX
	StatusInvalidStatus           Status = C.CAIRO_STATUS_INVALID_STATUS
	StatusNullPointer             Status = C.CAIRO_STATUS_NULL_POINTER
	StatusInvalidString           Status = C.CAIRO_STATUS_INVALID_STRING
	StatusInvalidPathData         Status = C.CAIRO_STATUS_INVALID_PATH_DATA
	StatusReadError               Status = C.CAIRO_STATUS_READ_ERROR
	StatusWriteError              Status = C.CAIRO_STATUS_WRITE_ERROR
	StatusSurfaceFinished         Status = C.CAIRO_STATUS_SURFACE_FINISHED
	StatusSurfaceTypeMismatch     Status = C.CAIRO_STATUS_SURFACE_TYPE_MISMATCH
	StatusPatternTypeMismatch     Status = C.CAIRO_STATUS_PATTERN_TYPE_MISMATCH
	StatusInvalidContent          Status = C.CAIRO_STATUS_INVALID_CONTENT
	StatusInvalidFormat           Status = C.CAIRO_STATUS_INVALID_FORMAT
	StatusInvalidVisual           Status = C.CAIRO_STATUS_INVALID_VISUAL
	StatusFileNotFound            Status = C.CAIRO_STATUS_FILE_NOT_FOUND
	StatusInvalidDash             Status = C.CAIRO_STATUS_INVALID_DASH
	StatusInvalidDscComment       Status = C.CAIRO_STATUS_INVALID_DSC_COMMENT
	StatusInvalidIndex            Status = C.CAIRO_STATUS_INVALID_INDEX
	StatusClipNotRepresentable    Status = C.CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
	StatusTempFileError           Status = C.CAIRO_STATUS_TEMP_FILE_ERROR
	StatusInvalidStride           Status = C.CAIRO_STATUS_INVALID_STRIDE
	StatusFontTypeMismatch        Status = C.CAIRO_STATUS_FONT_TYPE_MISMATCH
	StatusUserFontImmutable       Status = C.CAIRO_STATUS_USER_FONT_IMMUTABLE
	StatusUserFontError           Status = C.CAIRO_STATUS_USER_FONT_ERROR
	StatusNegativeCount           Status = C.CAIRO_STATUS_NEGATIVE_COUNT
	StatusInvalidClusters         Status = C.CAIRO_STATUS_INVALID_CLUSTERS
	StatusInvalidSlant            Status = C.CAIRO_STATUS_INVALID_SLANT
	StatusInvalidWeight           Status = C.CAIRO_STATUS_INVALID_WEIGHT
	StatusInvalidSize             Status = C.CAIRO_STATUS_INVALID_SIZE
	StatusUserFontNotImplemented  Status = C.CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
	StatusDeviceTypeMismatch      Status = C.CAIRO_STATUS_DEVICE_TYPE_MISMATCH
	StatusDeviceError             Status = C.CAIRO_STATUS_DEVICE_ERROR
	StatusInvalidMeshConstruction Status = C.CAIRO_STATUS_INVALID_MESH_CONSTRUCTION
	StatusDeviceFinished          Status = C.CAIRO_STATUS_DEVICE_FINISHED
	StatusJbig2GlobalMissing      Status = C.CAIRO_STATUS_JBIG2_GLOBAL_MISSING
	StatusLastStatus              Status = C.CAIRO_STATUS_LAST_STATUS
)
type Content int
const (
	ContentColor      Content = C.CAIRO_CONTENT_COLOR
	ContentAlpha      Content = C.CAIRO_CONTENT_ALPHA
	ContentColorAlpha Content = C.CAIRO_CONTENT_COLOR_ALPHA
)
func (i Content) String() string {
	switch i {
	case ContentColor:
		return "ContentColor"
	case ContentAlpha:
		return "ContentAlpha"
	case ContentColorAlpha:
		return "ContentColorAlpha"
	default:
		return fmt.Sprintf("Content(%d)", i)
	}
}
type Format int
const (
	FormatInvalid  Format = C.CAIRO_FORMAT_INVALID
	FormatARGB32   Format = C.CAIRO_FORMAT_ARGB32
	FormatRGB24    Format = C.CAIRO_FORMAT_RGB24
	FormatA8       Format = C.CAIRO_FORMAT_A8
	FormatA1       Format = C.CAIRO_FORMAT_A1
	FormatRGB16565 Format = C.CAIRO_FORMAT_RGB16_565
	FormatRGB30    Format = C.CAIRO_FORMAT_RGB30
)
func (i Format) String() string {
	switch i {
	case FormatInvalid:
		return "FormatInvalid"
	case FormatARGB32:
		return "FormatARGB32"
	case FormatRGB24:
		return "FormatRGB24"
	case FormatA8:
		return "FormatA8"
	case FormatA1:
		return "FormatA1"
	case FormatRGB16565:
		return "FormatRGB16565"
	case FormatRGB30:
		return "FormatRGB30"
	default:
		return fmt.Sprintf("Format(%d)", i)
	}
}
func Create(target *Surface) *Context {
	ret := wrapContext(C.cairo_create(target.Ptr))
	if err := ret.status(); err != nil {
		panic(err)
	}
	return ret
}
func (cr *Context) Save() {
	C.cairo_save(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Restore() {
	C.cairo_restore(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) PushGroup() {
	C.cairo_push_group(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) PushGroupWithContent(content Content) {
	C.cairo_push_group_with_content(cr.Ptr, C.cairo_content_t(content))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) PopGroup() *Pattern {
	ret := wrapPattern(C.cairo_pop_group(cr.Ptr))
	if err := cr.status(); err != nil {
		panic(err)
	}
	return ret
}
func (cr *Context) PopGroupToSource() {
	C.cairo_pop_group_to_source(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
type Operator int
const (
	OperatorClear         Operator = C.CAIRO_OPERATOR_CLEAR
	OperatorSource        Operator = C.CAIRO_OPERATOR_SOURCE
	OperatorOver          Operator = C.CAIRO_OPERATOR_OVER
	OperatorIn            Operator = C.CAIRO_OPERATOR_IN
	OperatorOut           Operator = C.CAIRO_OPERATOR_OUT
	OperatorAtop          Operator = C.CAIRO_OPERATOR_ATOP
	OperatorDest          Operator = C.CAIRO_OPERATOR_DEST
	OperatorDestOver      Operator = C.CAIRO_OPERATOR_DEST_OVER
	OperatorDestIn        Operator = C.CAIRO_OPERATOR_DEST_IN
	OperatorDestOut       Operator = C.CAIRO_OPERATOR_DEST_OUT
	OperatorDestAtop      Operator = C.CAIRO_OPERATOR_DEST_ATOP
	OperatorXOR           Operator = C.CAIRO_OPERATOR_XOR
	OperatorAdd           Operator = C.CAIRO_OPERATOR_ADD
	OperatorSaturate      Operator = C.CAIRO_OPERATOR_SATURATE
	OperatorMultiply      Operator = C.CAIRO_OPERATOR_MULTIPLY
	OperatorScreen        Operator = C.CAIRO_OPERATOR_SCREEN
	OperatorOverlay       Operator = C.CAIRO_OPERATOR_OVERLAY
	OperatorDarken        Operator = C.CAIRO_OPERATOR_DARKEN
	OperatorLighten       Operator = C.CAIRO_OPERATOR_LIGHTEN
	OperatorColorDodge    Operator = C.CAIRO_OPERATOR_COLOR_DODGE
	OperatorColorBurn     Operator = C.CAIRO_OPERATOR_COLOR_BURN
	OperatorHardLight     Operator = C.CAIRO_OPERATOR_HARD_LIGHT
	OperatorSoftLight     Operator = C.CAIRO_OPERATOR_SOFT_LIGHT
	OperatorDifference    Operator = C.CAIRO_OPERATOR_DIFFERENCE
	OperatorExclusion     Operator = C.CAIRO_OPERATOR_EXCLUSION
	OperatorHslHue        Operator = C.CAIRO_OPERATOR_HSL_HUE
	OperatorHslSaturation Operator = C.CAIRO_OPERATOR_HSL_SATURATION
	OperatorHslColor      Operator = C.CAIRO_OPERATOR_HSL_COLOR
	OperatorHslLuminosity Operator = C.CAIRO_OPERATOR_HSL_LUMINOSITY
)
func (i Operator) String() string {
	switch i {
	case OperatorClear:
		return "OperatorClear"
	case OperatorSource:
		return "OperatorSource"
	case OperatorOver:
		return "OperatorOver"
	case OperatorIn:
		return "OperatorIn"
	case OperatorOut:
		return "OperatorOut"
	case OperatorAtop:
		return "OperatorAtop"
	case OperatorDest:
		return "OperatorDest"
	case OperatorDestOver:
		return "OperatorDestOver"
	case OperatorDestIn:
		return "OperatorDestIn"
	case OperatorDestOut:
		return "OperatorDestOut"
	case OperatorDestAtop:
		return "OperatorDestAtop"
	case OperatorXOR:
		return "OperatorXOR"
	case OperatorAdd:
		return "OperatorAdd"
	case OperatorSaturate:
		return "OperatorSaturate"
	case OperatorMultiply:
		return "OperatorMultiply"
	case OperatorScreen:
		return "OperatorScreen"
	case OperatorOverlay:
		return "OperatorOverlay"
	case OperatorDarken:
		return "OperatorDarken"
	case OperatorLighten:
		return "OperatorLighten"
	case OperatorColorDodge:
		return "OperatorColorDodge"
	case OperatorColorBurn:
		return "OperatorColorBurn"
	case OperatorHardLight:
		return "OperatorHardLight"
	case OperatorSoftLight:
		return "OperatorSoftLight"
	case OperatorDifference:
		return "OperatorDifference"
	case OperatorExclusion:
		return "OperatorExclusion"
	case OperatorHslHue:
		return "OperatorHslHue"
	case OperatorHslSaturation:
		return "OperatorHslSaturation"
	case OperatorHslColor:
		return "OperatorHslColor"
	case OperatorHslLuminosity:
		return "OperatorHslLuminosity"
	default:
		return fmt.Sprintf("Operator(%d)", i)
	}
}
func (cr *Context) SetOperator(op Operator) {
	C.cairo_set_operator(cr.Ptr, C.cairo_operator_t(op))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetSource(source *Pattern) {
	C.cairo_set_source(cr.Ptr, source.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetSourceRGB(red, green, blue float64) {
	C.cairo_set_source_rgb(cr.Ptr, C.double(red), C.double(green), C.double(blue))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetSourceRGBA(red, green, blue, alpha float64) {
	C.cairo_set_source_rgba(cr.Ptr, C.double(red), C.double(green), C.double(blue), C.double(alpha))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetSourceSurface(surface *Surface, x, y float64) {
	C.cairo_set_source_surface(cr.Ptr, surface.Ptr, C.double(x), C.double(y))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetTolerance(tolerance float64) {
	C.cairo_set_tolerance(cr.Ptr, C.double(tolerance))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
type Antialias int
const (
	AntialiasDefault  Antialias = C.CAIRO_ANTIALIAS_DEFAULT
	AntialiasNone     Antialias = C.CAIRO_ANTIALIAS_NONE
	AntialiasGray     Antialias = C.CAIRO_ANTIALIAS_GRAY
	AntialiasSubpixel Antialias = C.CAIRO_ANTIALIAS_SUBPIXEL
	AntialiasFast     Antialias = C.CAIRO_ANTIALIAS_FAST
	AntialiasGood     Antialias = C.CAIRO_ANTIALIAS_GOOD
	AntialiasBest     Antialias = C.CAIRO_ANTIALIAS_BEST
)
func (i Antialias) String() string {
	switch i {
	case AntialiasDefault:
		return "AntialiasDefault"
	case AntialiasNone:
		return "AntialiasNone"
	case AntialiasGray:
		return "AntialiasGray"
	case AntialiasSubpixel:
		return "AntialiasSubpixel"
	case AntialiasFast:
		return "AntialiasFast"
	case AntialiasGood:
		return "AntialiasGood"
	case AntialiasBest:
		return "AntialiasBest"
	default:
		return fmt.Sprintf("Antialias(%d)", i)
	}
}
func (cr *Context) SetAntialias(antialias Antialias) {
	C.cairo_set_antialias(cr.Ptr, C.cairo_antialias_t(antialias))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
type FillRule int
const (
	FillRuleWinding FillRule = C.CAIRO_FILL_RULE_WINDING
	FillRuleEvenOdd FillRule = C.CAIRO_FILL_RULE_EVEN_ODD
)
func (i FillRule) String() string {
	switch i {
	case FillRuleWinding:
		return "FillRuleWinding"
	case FillRuleEvenOdd:
		return "FillRuleEvenOdd"
	default:
		return fmt.Sprintf("FillRule(%d)", i)
	}
}
func (cr *Context) SetFillRule(fillRule FillRule) {
	C.cairo_set_fill_rule(cr.Ptr, C.cairo_fill_rule_t(fillRule))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetLineWidth(width float64) {
	C.cairo_set_line_width(cr.Ptr, C.double(width))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
type LineCap int
const (
	LineCapButt   LineCap = C.CAIRO_LINE_CAP_BUTT
	LineCapRound  LineCap = C.CAIRO_LINE_CAP_ROUND
	LineCapSquare LineCap = C.CAIRO_LINE_CAP_SQUARE
)
func (i LineCap) String() string {
	switch i {
	case LineCapButt:
		return "LineCapButt"
	case LineCapRound:
		return "LineCapRound"
	case LineCapSquare:
		return "LineCapSquare"
	default:
		return fmt.Sprintf("LineCap(%d)", i)
	}
}
func (cr *Context) SetLineCap(lineCap LineCap) {
	C.cairo_set_line_cap(cr.Ptr, C.cairo_line_cap_t(lineCap))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
type LineJoin int
const (
	LineJoinMiter LineJoin = C.CAIRO_LINE_JOIN_MITER
	LineJoinRound LineJoin = C.CAIRO_LINE_JOIN_ROUND
	LineJoinBevel LineJoin = C.CAIRO_LINE_JOIN_BEVEL
)
func (i LineJoin) String() string {
	switch i {
	case LineJoinMiter:
		return "LineJoinMiter"
	case LineJoinRound:
		return "LineJoinRound"
	case LineJoinBevel:
		return "LineJoinBevel"
	default:
		return fmt.Sprintf("LineJoin(%d)", i)
	}
}
func (cr *Context) SetLineJoin(lineJoin LineJoin) {
	C.cairo_set_line_join(cr.Ptr, C.cairo_line_join_t(lineJoin))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetDash(dashes []float64, offset float64) {
	C.cairo_set_dash(cr.Ptr, (*C.double)(sliceBytes(unsafe.Pointer(&dashes))), C.int(len(dashes)), C.double(offset))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetMiterLimit(limit float64) {
	C.cairo_set_miter_limit(cr.Ptr, C.double(limit))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Translate(tx, ty float64) {
	C.cairo_translate(cr.Ptr, C.double(tx), C.double(ty))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Scale(sx, sy float64) {
	C.cairo_scale(cr.Ptr, C.double(sx), C.double(sy))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Rotate(angle float64) {
	C.cairo_rotate(cr.Ptr, C.double(angle))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Transform(matrix *Matrix) {
	C.cairo_transform(cr.Ptr, (*C.cairo_matrix_t)(unsafe.Pointer(matrix)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) SetMatrix(matrix *Matrix) {
	C.cairo_set_matrix(cr.Ptr, (*C.cairo_matrix_t)(unsafe.Pointer(matrix)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) IdentityMatrix() {
	C.cairo_identity_matrix(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) UserToDevice(x, y *float64) {
	C.cairo_user_to_device(cr.Ptr, (*C.double)(unsafe.Pointer(x)), (*C.double)(unsafe.Pointer(y)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) UserToDeviceDistance(dx, dy *float64) {
	C.cairo_user_to_device_distance(cr.Ptr, (*C.double)(unsafe.Pointer(dx)), (*C.double)(unsafe.Pointer(dy)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) DeviceToUser(x, y *float64) {
	C.cairo_device_to_user(cr.Ptr, (*C.double)(unsafe.Pointer(x)), (*C.double)(unsafe.Pointer(y)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) DeviceToUserDistance(dx, dy *float64) {
	C.cairo_device_to_user_distance(cr.Ptr, (*C.double)(unsafe.Pointer(dx)), (*C.double)(unsafe.Pointer(dy)))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) NewPath() {
	C.cairo_new_path(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) MoveTo(x, y float64) {
	C.cairo_move_to(cr.Ptr, C.double(x), C.double(y))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) NewSubPath() {
	C.cairo_new_sub_path(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) LineTo(x, y float64) {
	C.cairo_line_to(cr.Ptr, C.double(x), C.double(y))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64) {
	C.cairo_curve_to(cr.Ptr, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x3), C.double(y3))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) Arc(xc, yc, radius, angle1, angle2 float64) {
	C.cairo_arc(cr.Ptr, C.double(xc), C.double(yc), C.double(radius), C.double(angle1), C.double(angle2))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) ArcNegative(xc, yc, radius, angle1, angle2 float64) {
	C.cairo_arc_negative(cr.Ptr, C.double(xc), C.double(yc), C.double(radius), C.double(angle1), C.double(angle2))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) RelMoveTo(dx, dy float64) {
	C.cairo_rel_move_to(cr.Ptr, C.double(dx), C.double(dy))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) RelLineTo(dx, dy float64) {
	C.cairo_rel_line_to(cr.Ptr, C.double(dx), C.double(dy))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
func (cr *Context) RelCurveTo(dx1, dy1, dx2, dy2, dx3, dy3 float64) {
	C.cairo_rel_curve_to(cr.Ptr, C.double(dx1), C.double(dy1), C.double(dx2), C.double(dy2), C.double(dx3), C.double(dy3))
	if err := cr.status(); err != nil {
		panic(err)
	}
}