Handle.newFromStreamSync

rsvg.handle.Handle newFromStreamSync(gio.input_stream.InputStream inputStream, gio.file.File baseFile, rsvg.types.HandleFlags flags, gio.cancellable.Cancellable cancellable = null)

Creates a new [rsvg.handle.Handle] for stream.

This function sets the "base file" of the handle to be base_file if provided. SVG elements like <image> which reference external resources will be resolved relative to the location of base_file.

If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error [gio.types.IOErrorEnum.Cancelled] will be returned in error.

Parameters

inputStreama [gio.input_stream.InputStream]
baseFilea [gio.file.File], or NULL
flagsflags from [rsvg.types.HandleFlags]
cancellablea [gio.cancellable.Cancellable], or NULL

Returns

a new [rsvg.handle.Handle] on success, or NULL with error filled in

Throws

[ErrorWrap]