cairo/surface.go
func (v *Surface) WriteToPNG(fileName string) error {
	cstr := C.CString(fileName)
	defer C.free(unsafe.Pointer(cstr))

	status := Status(C.cairo_surface_write_to_png(v.surface, cstr))

	if status != STATUS_SUCCESS {
		return ErrorStatus(status)
	}

	return nil
}
func (v *Surface) WriteToPNG(fileName string) error {
	cstr := C.CString(fileName)
	defer C.free(unsafe.Pointer(cstr))

	status := Status(C.cairo_surface_write_to_png(v.surface, cstr))

	if status != STATUS_SUCCESS {
		return ErrorStatus(status)
	}

	return nil
}
func ( v * Surface ) WriteToPNG ( fileName string ) error { cstr := C . CString ( fileName ) defer C . free ( unsafe . Pointer ( cstr ) ) status := Status ( C . cairo_surface_write_to_png ( v . surface , cstr ) ) if status != STATUS_SUCCESS { return ErrorStatus ( status ) } return nil }
// WriteToPNG is a wrapper around cairo_surface_write_png(). It writes the Cairo
// surface to the given file in PNG format.
WriteToPNG is a wrapper around cairo_surface_write_png () . It writes the Cairo surface to the given file in PNG format .