Exemple #1
0
//Clone returns a new matrix that is the same as m.
func (m Matrix) Clone() Matrix {
	var n C.cairo_matrix_t
	C.cairo_matrix_init(&n, m.m.xx, m.m.yx, m.m.xy, m.m.yy, m.m.x0, m.m.y0)
	return Matrix{n}
}
Exemple #2
0
//NewMatrix creates the affine transformation matrix given by
//xx, yx, xy, yy, x0, y0.
//
//Originally cairo_matrix_init
func NewMatrix(xx, yx, xy, yy, x0, y0 float64) Matrix {
	var m C.cairo_matrix_t
	C.cairo_matrix_init(&m, C.double(xx), C.double(yx), C.double(xy), C.double(yy), C.double(x0), C.double(y0))
	return Matrix{m}
}