Esempio n. 1
0
func (self *Matrix) InitTranslate(tx, ty float64) {
	C.cairo_matrix_init_translate(self.cairo_matrix_t(), C.double(tx), C.double(ty))
}
Esempio n. 2
0
//NewTranslateMatrix matrix creates a matrix that translates by vector.
//
//Originally cairo_init_translate.
func NewTranslateMatrix(vector Point) Matrix {
	var m C.cairo_matrix_t
	C.cairo_matrix_init_translate(&m, C.double(vector.X), C.double(vector.Y))
	return Matrix{m}
}