// Code generated by cmd/cgo; DO NOT EDIT.

//line /home/josie/.cache/paru/clone/wiiudownloader/src/pkg/mod/github.com/gotk3/gotk3@v0.6.5-0.20240618185848-ff349ae13f56/cairo/translations.go:1:1
package cairo

// #include <stdlib.h>
// #include <cairo.h>
// #include <cairo-gobject.h>
import _ "unsafe"

// Translate is a wrapper around cairo_translate.
func (v *Context) Translate(tx, ty float64) {
	func() { _cgo0 := /*line :10:20*/v.native(); var _cgo1 _Ctype_double = _Ctype_double /*line :10:40*/(tx); var _cgo2 _Ctype_double = _Ctype_double /*line :10:54*/(ty); _cgoCheckPointer(_cgo0, nil); /*line :10:59*/_Cfunc_cairo_translate(_cgo0, _cgo1, _cgo2); }()
}

// Scale is a wrapper around cairo_scale.
func (v *Context) Scale(sx, sy float64) {
	func() { _cgo0 := /*line :15:16*/v.native(); var _cgo1 _Ctype_double = _Ctype_double /*line :15:36*/(sx); var _cgo2 _Ctype_double = _Ctype_double /*line :15:50*/(sy); _cgoCheckPointer(_cgo0, nil); /*line :15:55*/_Cfunc_cairo_scale(_cgo0, _cgo1, _cgo2); }()
}

// Rotate is a wrapper around cairo_rotate.
func (v *Context) Rotate(angle float64) {
	func() { _cgo0 := /*line :20:17*/v.native(); var _cgo1 _Ctype_double = _Ctype_double /*line :20:37*/(angle); _cgoCheckPointer(_cgo0, nil); /*line :20:45*/_Cfunc_cairo_rotate(_cgo0, _cgo1); }()
}

// Transform is a wrapper around cairo_transform.
func (v *Context) Transform(matrix *Matrix) {
	func() { _cgo0 := /*line :25:20*/v.native(); var _cgo1 *_Ctype_struct__cairo_matrix = /*line :25:32*/matrix.native(); _cgoCheckPointer(_cgo0, nil); /*line :25:48*/_Cfunc_cairo_transform(_cgo0, _cgo1); }()
}

// SetMatrix is a wrapper around cairo_set_matrix.
func (v *Context) SetMatrix(matrix *Matrix) {
	func() { _cgo0 := /*line :30:21*/v.native(); var _cgo1 *_Ctype_struct__cairo_matrix = /*line :30:33*/matrix.native(); _cgoCheckPointer(_cgo0, nil); /*line :30:49*/_Cfunc_cairo_set_matrix(_cgo0, _cgo1); }()
}

// GetMatrix is a wrapper around cairo_get_matrix.
func (v *Context) GetMatrix() *Matrix {
	var matrix  /*line :35:13*/_Ctype_cairo_matrix_t /*line :35:29*/
	func() { _cgo0 := /*line :36:21*/v.native(); var _cgo1 *_Ctype_struct__cairo_matrix = /*line :36:33*/&matrix; _cgoCheckPointer(_cgo0, nil); /*line :36:41*/_Cfunc_cairo_get_matrix(_cgo0, _cgo1); }()
	return &Matrix{
		Xx: float64(matrix.xx),
		Yx: float64(matrix.yx),
		Xy: float64(matrix.xy),
		Yy: float64(matrix.yy),
		X0: float64(matrix.x0),
		Y0: float64(matrix.y0),
	}
}

// IdentityMatrix is a wrapper around cairo_identity_matrix().
//
// Resets the current transformation matrix (CTM) by setting it equal to the
// identity matrix. That is, the user-space and device-space axes will be
// aligned and one user-space unit will transform to one device-space unit.
func (v *Context) IdentityMatrix() {
	func() { _cgo0 := /*line :53:26*/v.native(); _cgoCheckPointer(_cgo0, nil); /*line :53:37*/_Cfunc_cairo_identity_matrix(_cgo0); }()
}

// UserToDevice is a wrapper around cairo_user_to_device.
func (v *Context) UserToDevice(x, y float64) (float64, float64) {
	func() { _cgo0 := /*line :58:25*/v.native(); var _cgo1 *_Ctype_double = /*line :58:37*/(*_Ctype_double /*line :58:47*/)(&x); var _cgo2 *_Ctype_double = /*line :58:54*/(*_Ctype_double /*line :58:64*/)(&y); _cgoCheckPointer(_cgo0, nil); /*line :58:70*/_Cfunc_cairo_user_to_device(_cgo0, _cgo1, _cgo2); }()
	return x, y
}

// UserToDeviceDistance is a wrapper around cairo_user_to_device_distance.
func (v *Context) UserToDeviceDistance(dx, dy float64) (float64, float64) {
	func() { _cgo0 := /*line :64:34*/v.native(); var _cgo1 *_Ctype_double = /*line :64:46*/(*_Ctype_double /*line :64:56*/)(&dx); var _cgo2 *_Ctype_double = /*line :64:64*/(*_Ctype_double /*line :64:74*/)(&dy); _cgoCheckPointer(_cgo0, nil); /*line :64:81*/_Cfunc_cairo_user_to_device_distance(_cgo0, _cgo1, _cgo2); }()
	return dx, dy
}

// DeviceToUser  is a wrapper around cairo_device_to_user.
func (v *Context) DeviceToUser(x, y float64) (float64, float64) {
	func() { _cgo0 := /*line :70:25*/v.native(); var _cgo1 *_Ctype_double = /*line :70:37*/(*_Ctype_double /*line :70:47*/)(&x); var _cgo2 *_Ctype_double = /*line :70:54*/(*_Ctype_double /*line :70:64*/)(&y); _cgoCheckPointer(_cgo0, nil); /*line :70:70*/_Cfunc_cairo_device_to_user(_cgo0, _cgo1, _cgo2); }()
	return x, y
}

// DeviceToUserDistance is a wrapper around cairo_device_to_user_distance.
func (v *Context) DeviceToUserDistance(x, y float64) (float64, float64) {
	func() { _cgo0 := /*line :76:34*/v.native(); var _cgo1 *_Ctype_double = /*line :76:46*/(*_Ctype_double /*line :76:56*/)(&x); var _cgo2 *_Ctype_double = /*line :76:63*/(*_Ctype_double /*line :76:73*/)(&y); _cgoCheckPointer(_cgo0, nil); /*line :76:79*/_Cfunc_cairo_device_to_user_distance(_cgo0, _cgo1, _cgo2); }()
	return x, y
}
