Rsvg.Handle.new_from_stream_sync
Description: Reference for Rsvg.Handle.new_from_stream_sync

### Constructor

# Rsvg Handlenew_from_stream_sync

since: 2.32

#### Declaration [src]

    RsvgHandle*
    rsvg_handle_new_from_stream_sync (
      GInputStream* input_stream,
      GFile* base_file,
      RsvgHandleFlags flags,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Creates a new `RsvgHandle` 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 `G_IO_ERROR_CANCELLED` will be returned in `error`.

Available since: 2.32

#### Parameters

`input_stream`

  Type: `GInputStream`

  A `GInputStream`

  The data is owned by the caller of the function.

`base_file`

  Type: `GFile`

  A `GFile`, or `NULL`

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`flags`

  Type: `RsvgHandleFlags`

  Flags from `RsvgHandleFlags`

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the constructor if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `RsvgHandle`

A new `RsvgHandle` on success, or `NULL` with `error` filled in.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.