gdk/gdk.go
func PixbufNewFromFileAtScale(filename string, width, height int, preserveAspectRatio bool) (*Pixbuf, error) {
	cstr := C.CString(filename)
	defer C.free(unsafe.Pointer(cstr))

	var err *C.GError = nil
	c := C.gdk_pixbuf_new_from_file_at_scale(cstr, C.int(width), C.int(height),
		gbool(preserveAspectRatio), &err)
	if err != nil {
		defer C.g_error_free(err)
		return nil, errors.New(C.GoString((*C.char)(err.message)))
	}

	if c == nil {
		return nil, nilPtrErr
	}

	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	//obj.Ref()
	runtime.SetFinalizer(p, func(_ interface{}) { obj.Unref() })
	return p, nil
}
func PixbufNewFromFileAtScale(filename string, width, height int, preserveAspectRatio bool) (*Pixbuf, error) {
	cstr := C.CString(filename)
	defer C.free(unsafe.Pointer(cstr))

	var err *C.GError = nil
	c := C.gdk_pixbuf_new_from_file_at_scale(cstr, C.int(width), C.int(height),
		gbool(preserveAspectRatio), &err)
	if err != nil {
		defer C.g_error_free(err)
		return nil, errors.New(C.GoString((*C.char)(err.message)))
	}

	if c == nil {
		return nil, nilPtrErr
	}

	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	//obj.Ref()
	runtime.SetFinalizer(p, func(_ interface{}) { obj.Unref() })
	return p, nil
}
func PixbufNewFromFileAtScale ( filename string , width , height int , preserveAspectRatio bool ) ( * Pixbuf , error ) { cstr := C . CString ( filename ) defer C . free ( unsafe . Pointer ( cstr ) ) var err * C . GError = nil c := C . gdk_pixbuf_new_from_file_at_scale ( cstr , C . int ( width ) , C . int ( height ) , gbool ( preserveAspectRatio ) , & err ) if err != nil { defer C . g_error_free ( err ) return nil , errors . New ( C . GoString ( ( * C . char ) ( err . message ) ) ) } if c == nil { return nil , nilPtrErr } obj := & glib . Object { glib . ToGObject ( unsafe . Pointer ( c ) ) } p := & Pixbuf { obj } //obj.Ref() runtime . SetFinalizer ( p , func ( _ interface { } ) { obj . Unref ( ) } ) return p , nil }
// PixbufNewFromFileAtScale is a wrapper around gdk_pixbuf_new_from_file_at_scale().
PixbufNewFromFileAtScale is a wrapper around gdk_pixbuf_new_from_file_at_scale () .