Example #1
0
func (self *Matrix) TransformPoint(x, y float64) (float64, float64) {
	C.cairo_matrix_transform_point(self.cairo_matrix_t(),
		(*C.double)(unsafe.Pointer(&x)), (*C.double)(unsafe.Pointer(&y)))
	return x, y
}
Example #2
0
//Transform transforms p by m, returning a new point.
//
//Originally cairo_matrix_transform.
func (p Point) Transform(m Matrix) Point {
	x := C.double(p.X)
	y := C.double(p.Y)
	C.cairo_matrix_transform_point(&m.m, &x, &y)
	return Point{float64(x), float64(y)}
}