Example #1
0
func (self *Surface) GetDeviceOffset() (x, y float64) {
	C.cairo_surface_get_device_offset(self.surface, (*C.double)(&x), (*C.double)(&y))
	return x, y
}
Example #2
0
//DeviceOffset reports the device offset set by SetDeviceOffset.
//
//Originally cairo_surface_get_device_offset.
func (e *XtensionSurface) DeviceOffset() (vector Point) {
	var x, y C.double
	C.cairo_surface_get_device_offset(e.s, &x, &y)
	return cPt(x, y)
}
Example #3
0
// GetDeviceOffset is a wrapper around cairo_surface_get_device_offset().
func (v *Surface) GetDeviceOffset() (x, y float64) {
	var xOffset, yOffset C.double
	C.cairo_surface_get_device_offset(v.native(), &xOffset, &yOffset)
	return float64(xOffset), float64(yOffset)
}
Example #4
0
func (s *CairoSurface) GetDeviceOffset() (float64, float64, error) {
	var xOffset, yOffset float64
	C.cairo_surface_get_device_offset(s.nativePointer(), (*C.double)(&xOffset), (*C.double)(&yOffset))
	return xOffset, yOffset, s.status()
}