Ejemplo n.º 1
0
func (self *Surface) UserToDeviceDistance(dx, dy float64) (dx1, dy1 float64) {
	ux, uy := (*C.double)(&dx), (*C.double)(&dy)
	C.cairo_user_to_device_distance(self.context, ux, uy)
	dx1, dy1 = float64(*ux), float64(*uy)
	return
}
Ejemplo n.º 2
0
func (self *Surface) UserToDeviceDistance(dx, dy float64) (float64, float64) {
	C.cairo_user_to_device_distance(self.context, (*C.double)(&dx), (*C.double)(&dy))
	return dx, dy
}
Ejemplo n.º 3
0
//UserToDeviceDistance transforms a distance vector v from user to device
//space.
//This method is similar to UserToDevice, except that the translation
//components of the current transformation matrix will be ignored.
//
//Originally cairo_user_to_device_distance.
func (c *Context) UserToDeviceDistance(v Point) Point {
	x, y := v.c()
	C.cairo_user_to_device_distance(c.c, &x, &y)
	return cPt(x, y)
}