### Constructor

# Rsvg Handle new

#### Declaration [src]

    RsvgHandle*
    rsvg_handle_new (
      void
    )

#### Description [src]

Returns a new rsvg handle. Must be freed with `g_object_unref()`. This handle can be used to load an image.

The preferred way of loading SVG data into the returned `RsvgHandle` is with `rsvg_handle_read_stream_sync()`.

The deprecated way of loading SVG data is with `rsvg_handle_write()` and `rsvg_handle_close()`; note that these require buffering the entire file internally, and for this reason it is better to use the stream functions: `rsvg_handle_new_from_stream_sync()`, `rsvg_handle_read_stream_sync()`, or `rsvg_handle_new_from_gfile_sync()`.

After loading the `RsvgHandle` with data, you can render it using Cairo or get a GdkPixbuf from it. When finished, free the handle with `g_object_unref()`. No more than one image can be loaded with one handle.

Note that this function creates an `RsvgHandle` with no flags set. If you require any of `RsvgHandleFlags` to be set, use any of `rsvg_handle_new_with_flags()`, `rsvg_handle_new_from_stream_sync()`, or `rsvg_handle_new_from_gfile_sync()`.

#### Return value

Type: `RsvgHandle`

A new `RsvgHandle` with no flags set.

The caller of the function takes ownership of the data, and is responsible for freeing it.