示例#1
0
文件: matrix.go 项目: mantyr/go-cairo
func (self *Matrix) InitTranslate(tx, ty float64) {
	C.cairo_matrix_init_translate(self.cairo_matrix_t(), C.double(tx), C.double(ty))
}
示例#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}
}