Method
RsvgHandlewrite
deprecated: 2.46.
Declaration [src]
gboolean
rsvg_handle_write (
RsvgHandle* handle,
const guchar* buf,
gsize count,
GError** error
)
Description [src]
Loads the next count
bytes of the image. You can call this function multiple
times until the whole document is consumed; then you must call rsvg_handle_close()
to actually parse the document.
Before calling this function for the first time, you may need to call
rsvg_handle_set_base_uri()
or rsvg_handle_set_base_gfile()
to set the “base
file” for resolving references to external resources. SVG elements like
<image>
which reference external resources will be
resolved relative to the location you specify with those functions.
Deprecated since: 2.46.
Use rsvg_handle_read_stream_sync()
or the constructor
functions rsvg_handle_new_from_gfile_sync()
or
rsvg_handle_new_from_stream_sync()
. This function is deprecated because it
will accumulate data from the buf
in memory until rsvg_handle_close()
gets
called. To avoid a big temporary buffer, use the suggested functions, which
take a GFile
or a GInputStream
and do not require a temporary buffer.
Parameters
buf
-
Type: An array of
guint8
Pointer to svg data.
The length of the array is specified in the count
argument.The data is owned by the caller of the method. count
-
Type:
gsize
Length of the
buf
buffer 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 aNULL
GError*
.The argument will be left initialized to NULL
by the method 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.