Beispiel #1
0
func (self *Surface) UserToDevice(x, y float64) (x1, y1 float64) {
	ux, uy := (*C.double)(&x), (*C.double)(&y)
	C.cairo_user_to_device(self.context, ux, uy)
	x1, y1 = float64(*ux), float64(*uy)
	return
}
Beispiel #2
0
func (self *Surface) UserToDevice(x, y float64) (float64, float64) {
	C.cairo_user_to_device(self.context, (*C.double)(&x), (*C.double)(&y))
	return x, y
}
Beispiel #3
0
//UserToDevice takes the point p from user space to the point q in device space
//by multiplication with the current transformation matrix.
//
//Originally cairo_user_to_device.
func (c *Context) UserToDevice(p Point) (q Point) {
	x, y := p.c()
	C.cairo_user_to_device(c.c, &x, &y)
	return cPt(x, y)
}