示例#1
0
/*
Creates a new pixbuf which represents a sub-region of @src_pixbuf.
The new pixbuf shares its pixels with the original pixbuf, so
writing to one affects both.  The new pixbuf holds a reference to
@src_pixbuf, so @src_pixbuf will not be finalized until the new
pixbuf is finalized.

Note that if @src_pixbuf is read-only, this function will force it
to be mutable.
*/
func (self *TraitPixbuf) NewSubpixbuf(src_x int, src_y int, width int, height int) (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_new_subpixbuf(self.CPointer, C.int(src_x), C.int(src_y), C.int(width), C.int(height))
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}
示例#2
0
func (_self_ *Pixbuf) NewSubpixbuf(src_x C.int, src_y C.int, width C.int, height C.int) (_go__return__ Pixbuf) {
	var _return_ *C.GdkPixbuf
	_return_ = C.gdk_pixbuf_new_subpixbuf((*C.GdkPixbuf)(_self_._value_), src_x, src_y, width, height)
	_go__return__ = ToPixbuf(unsafe.Pointer(_return_))
	return
}