Handle


Description:

[ CCode ( has_construct_function = false ) ]
public Handle ()

Returns a new rsvg handle.

Must be freed with [method@GObject.Object.unref]. This handle can be used to load an image.

The preferred way of loading SVG data into the returned [class@Rsvg.Handle] is with [method@Rsvg.Handle.read_stream_sync].

The deprecated way of loading SVG data is with [method@Rsvg.Handle.write] and [method@Rsvg.Handle.close]; note that these require buffering the entire file internally, and for this reason it is better to use the stream functions: [ctor@Rsvg.Handle.new_from_stream_sync], [ method@Rsvg.Handle.read_stream_sync], or [ctor@Rsvg.Handle.new_from_gfile_sync].

After loading the [class@Rsvg.Handle] with data, you can render it using Cairo or get a GdkPixbuf from it. When finished, free the handle with [method@GObject.Object.unref]. No more than one image can be loaded with one handle.

Note that this function creates an [class@Rsvg.Handle] with no flags set. If you require any of [flags@Rsvg.HandleFlags] to be set, use any of [ctor@Rsvg.Handle.new_with_flags], [ctor@Rsvg.Handle.new_from_stream_sync], or [ctor@Rsvg.Handle.new_from_gfile_sync].

Returns:

A new [class@Rsvg.Handle] with no flags set.