Constructor

RsvgHandlenew_from_data

since: 2.14

Declaration [src]

RsvgHandle*
rsvg_handle_new_from_data (
  const guint8* data,
  gsize data_len,
  GError** error
)

Description [src]

Loads the SVG specified by data. Note that this function creates an RsvgHandle without a base URL, and without any RsvgHandleFlags. If you need these, use rsvg_handle_new_from_stream_sync() instead by creating a GMemoryInputStream from your data.

Available since: 2.14

Parameters

data

Type: An array of guint8

The SVG data.

The length of the array is specified in the data_len argument.
The data is owned by the caller of the function.
data_len

Type: gsize

The length of data, in bytes.

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 RsvgHandle or NULL if an error occurs.

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