Esempio n. 1
0
func Flip(p *Pixbuf, horizontal bool) *Pixbuf {
	gpixbuf := C.gdk_pixbuf_flip(p.GPixbuf, gbool(horizontal))
	return &Pixbuf{
		GdkPixbuf: &GdkPixbuf{gpixbuf},
		GObject:   glib.ObjectFromNative(unsafe.Pointer(gpixbuf)),
	}
}
Esempio n. 2
0
File: gdk.go Progetto: raichu/gotk3
// Flip is a wrapper around gdk_pixbuf_flip().
func (v *Pixbuf) Flip(horizontal bool) (*Pixbuf, error) {
	c := C.gdk_pixbuf_flip(v.native(), gbool(horizontal))
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
Esempio n. 3
0
/*
Flips a pixbuf horizontally or vertically and returns the
result in a new pixbuf.
*/
func (self *TraitPixbuf) Flip(horizontal bool) (return__ *Pixbuf) {
	__cgo__horizontal := C.gboolean(0)
	if horizontal {
		__cgo__horizontal = C.gboolean(1)
	}
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_flip(self.CPointer, __cgo__horizontal)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}