Пример #1
0
// SetDeviceOffset is a wrapper around cairo_surface_set_device_offset().
func (v *Surface) SetDeviceOffset(x, y float64) {
	C.cairo_surface_set_device_offset(v.native(), C.double(x), C.double(y))
}
Пример #2
0
func (self *Surface) SetDeviceOffset(x, y float64) {
	C.cairo_surface_set_device_offset(self.surface, C.double(x), C.double(y))
}
Пример #3
0
//SetDeviceOffset sets the device offset of this surface.
//
//The device offset adds to the device coordinates determined by the coordinate
//transform matrix when drawing to a surface.
//
//One use case for this method is to create a surface that redirects a portion
//of drawing offscreen invisble to users of the Cairo api.
//Setting a transform is insufficent as queries such as DeviceToUser expose
//this offset.
//
//Note that the offset affects drawing to the surface as well
//as using the surface in a source pattern.
//
//The x and y components are in the unit of the surface's underlying device.
//
//Originally cairo_surface_set_device_offset.
func (e *XtensionSurface) SetDeviceOffset(vector Point) {
	C.cairo_surface_set_device_offset(e.s, C.double(vector.X), C.double(vector.Y))
}