Exemplo n.º 1
0
// void cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
func (self *Surface) DeviceToUserDistance(dx, dy float64) (float64, float64) {
	C.cairo_device_to_user_distance(self.context, (*C.double)(unsafe.Pointer(&dx)), (*C.double)(unsafe.Pointer(&dy)))
	return dx, dy
}
Exemplo n.º 2
0
func (self *Surface) DeviceToUserDistance(x, y float64) (float64, float64) {
	C.cairo_device_to_user_distance(self.context, (*C.double)(&x), (*C.double)(&y))
	return x, y
}
Exemplo n.º 3
0
//DeviceToUserDistance transforms a distance vector v from device to user
//space.
//This method is similar to DeviceToUser, except that the translation
//components of the current transformation matrix will be ignored.
//
//Originally cairo_device_to_user_distance.
func (c *Context) DeviceToUserDistance(v Point) Point {
	x, y := v.c()
	C.cairo_device_to_user_distance(c.c, &x, &y)
	return cPt(x, y)
}