예제 #1
0
파일: surface.go 프로젝트: ungerik/go-cairo
func (self *Surface) GetDeviceOffset() (x, y float64) {
	C.cairo_surface_get_device_offset(self.surface, (*C.double)(&x), (*C.double)(&y))
	return x, y
}
예제 #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)
}
예제 #3
0
파일: cairo.go 프로젝트: raichu/gotk3
// 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)
}
예제 #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()
}