// 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/matrix.go:1:1 package cairo // #include // #include // #include import _ "unsafe" import ( "unsafe" ) // Matrix struct type Matrix struct { Xx, Yx float64 Xy, Yy float64 X0, Y0 float64 } // NewMatrix creates a new identiy matrix func NewMatrix(xx, yx, xy, yy, x0, y0 float64) *Matrix { return &Matrix{ Xx: xx, Yx: yx, Xy: xy, Yy: yy, X0: x0, Y0: y0, } } // Native returns native c pointer to a matrix func (m *Matrix) native() * /*line :32:28*/_Ctype_cairo_matrix_t /*line :32:44*/ { return (* /*line :33:11*/_Ctype_cairo_matrix_t /*line :33:27*/)(unsafe.Pointer(m)) } // Native returns native c pointer to a matrix func (m *Matrix) Native() uintptr { return uintptr(unsafe.Pointer(m.native())) } // InitIdentity initializes this matrix to identity matrix func (m *Matrix) InitIdentity() { ( /*line :43:2*/_Cfunc_cairo_matrix_init_identity /*line :43:29*/)(m.native()) } // InitTranslate initializes a matrix with the given translation func (m *Matrix) InitTranslate(tx, ty float64) { ( /*line :48:2*/_Cfunc_cairo_matrix_init_translate /*line :48:30*/)(m.native(), /*line :48:44*/_Ctype_double /*line :48:52*/(tx), /*line :48:58*/_Ctype_double /*line :48:66*/(ty)) } // InitScale initializes a matrix with the give scale func (m *Matrix) InitScale(sx, sy float64) { ( /*line :53:2*/_Cfunc_cairo_matrix_init_scale /*line :53:26*/)(m.native(), /*line :53:40*/_Ctype_double /*line :53:48*/(sx), /*line :53:54*/_Ctype_double /*line :53:62*/(sy)) } // InitRotate initializes a matrix with the given rotation func (m *Matrix) InitRotate(radians float64) { ( /*line :58:2*/_Cfunc_cairo_matrix_init_rotate /*line :58:27*/)(m.native(), /*line :58:41*/_Ctype_double /*line :58:49*/(radians)) } // Translate translates a matrix by the given amount func (m *Matrix) Translate(tx, ty float64) { ( /*line :63:2*/_Cfunc_cairo_matrix_translate /*line :63:25*/)(m.native(), /*line :63:39*/_Ctype_double /*line :63:47*/(tx), /*line :63:53*/_Ctype_double /*line :63:61*/(ty)) } // Scale scales the matrix by the given amounts func (m *Matrix) Scale(sx, sy float64) { ( /*line :68:2*/_Cfunc_cairo_matrix_scale /*line :68:21*/)(m.native(), /*line :68:35*/_Ctype_double /*line :68:43*/(sx), /*line :68:49*/_Ctype_double /*line :68:57*/(sy)) } // Rotate rotates the matrix by the given amount func (m *Matrix) Rotate(radians float64) { ( /*line :73:2*/_Cfunc_cairo_matrix_rotate /*line :73:22*/)(m.native(), /*line :73:36*/_Ctype_double /*line :73:44*/(radians)) } // Invert inverts the matrix func (m *Matrix) Invert() { ( /*line :78:2*/_Cfunc_cairo_matrix_invert /*line :78:22*/)(m.native()) } // Multiply multiplies the matrix by another matrix func (m *Matrix) Multiply(a, b Matrix) { ( /*line :83:2*/_Cfunc_cairo_matrix_multiply /*line :83:24*/)(m.native(), a.native(), b.native()) } // TransformDistance ... func (m *Matrix) TransformDistance(dx, dy float64) (float64, float64) { ( /*line :88:2*/_Cfunc_cairo_matrix_transform_distance /*line :88:34*/)(m.native(), (* /*line :89:5*/_Ctype_double /*line :89:13*/)(unsafe.Pointer(&dx)), (* /*line :89:39*/_Ctype_double /*line :89:47*/)(unsafe.Pointer(&dy))) return dx, dy } // TransformPoint ... func (m *Matrix) TransformPoint(x, y float64) (float64, float64) { ( /*line :95:2*/_Cfunc_cairo_matrix_transform_point /*line :95:31*/)(m.native(), (* /*line :96:5*/_Ctype_double /*line :96:13*/)(unsafe.Pointer(&x)), (* /*line :96:38*/_Ctype_double /*line :96:46*/)(unsafe.Pointer(&y))) return x, y }