28#define __RSVG_RSVG_H_INSIDE__
30#include <glib-object.h>
39#if defined(RSVG_DISABLE_DEPRECATION_WARNINGS) || !GLIB_CHECK_VERSION (2, 31, 0)
40#define RSVG_DEPRECATED RSVG_API
41#define RSVG_DEPRECATED_FOR(f) RSVG_API
43#define RSVG_DEPRECATED G_DEPRECATED RSVG_API
44#define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API
64#define RSVG_ERROR (rsvg_error_quark ())
78#define RSVG_TYPE_ERROR (rsvg_error_get_type())
80#define RSVG_TYPE_HANDLE (rsvg_handle_get_type ())
81#define RSVG_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RSVG_TYPE_HANDLE, RsvgHandle))
82#define RSVG_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RSVG_TYPE_HANDLE, RsvgHandleClass))
83#define RSVG_IS_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RSVG_TYPE_HANDLE))
84#define RSVG_IS_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RSVG_TYPE_HANDLE))
85#define RSVG_HANDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RSVG_TYPE_HANDLE, RsvgHandleClass))
90#ifdef RSVG_COMPILATION
91typedef struct RsvgHandlePrivate RsvgHandlePrivate;
127#ifdef RSVG_COMPILATION
128 RsvgHandlePrivate *priv;
346 RsvgDimensionData *dimension_data,
356 RsvgPositionData *position_data,
395#define RSVG_TYPE_HANDLE_FLAGS (rsvg_handle_flags_get_type())
436 GInputStream *stream,
437 GCancellable *cancellable,
454 GCancellable *cancellable,
468 GCancellable *cancellable,
556 GCancellable *cancellable);
581 gboolean *out_has_width,
583 gboolean *out_has_height,
585 gboolean *out_has_viewbox,
586 RsvgRectangle *out_viewbox);
603 gdouble *out_height);
607#ifndef __GTK_DOC_IGNORE__
609void rsvg_handle_internal_set_testing (RsvgHandle *handle, gboolean testing);
622RSVG_DEPRECATED_FOR(g_type_init)
638RSVG_DEPRECATED_FOR(g_object_unref)
647typedef
void (*
RsvgSizeFunc) (gint *width, gint *height, gpointer user_data);
658 GDestroyNotify user_data_destroy);
688#include "rsvg-version.h"
692#if LIBRSVG_HAVE_PIXBUF
696#undef __RSVG_RSVG_H_INSIDE__
void rsvg_handle_set_cancellable_for_rendering(RsvgHandle *handle, GCancellable *cancellable)
Interrupt rendering from another thread.
const char * rsvg_handle_get_metadata(RsvgHandle *handle)
rsvg_handle_get_metadata:
void rsvg_term(void)
rsvg_term:
void rsvg_handle_set_size_callback(RsvgHandle *handle, RsvgSizeFunc size_func, gpointer user_data, GDestroyNotify user_data_destroy)
rsvg_handle_set_size_callback:
const char * rsvg_handle_get_title(RsvgHandle *handle)
rsvg_handle_get_title:
void rsvg_init(void)
rsvg_init:
void rsvg_set_default_dpi_x_y(double dpi_x, double dpi_y)
rsvg_set_default_dpi_x_y:
void rsvg_cleanup(void)
rsvg_cleanup:
void rsvg_handle_free(RsvgHandle *handle)
rsvg_handle_free:
const char * rsvg_handle_get_desc(RsvgHandle *handle)
rsvg_handle_get_desc:
void(* RsvgSizeFunc)(gint *width, gint *height, gpointer user_data)
RsvgSizeFunc:
Definition rsvg.h:647
void rsvg_set_default_dpi(double dpi)
rsvg_set_default_dpi:
void rsvg_handle_get_dimensions(RsvgHandle *handle, RsvgDimensionData *dimension_data)
rsvg_handle_get_dimensions:
gboolean rsvg_handle_get_dimensions_sub(RsvgHandle *handle, RsvgDimensionData *dimension_data, const char *id)
rsvg_handle_get_dimensions_sub:
void rsvg_handle_get_intrinsic_dimensions(RsvgHandle *handle, gboolean *out_has_width, RsvgLength *out_width, gboolean *out_has_height, RsvgLength *out_height, gboolean *out_has_viewbox, RsvgRectangle *out_viewbox)
rsvg_handle_get_intrinsic_dimensions: @handle: an #RsvgHandle @out_has_width: (out)(optional): whethe...
gboolean rsvg_handle_get_geometry_for_layer(RsvgHandle *handle, const char *id, const RsvgRectangle *viewport, RsvgRectangle *out_ink_rect, RsvgRectangle *out_logical_rect, GError **error)
Geometry of an element (or the whole SVG) as if rendered to @viewport.
gboolean rsvg_handle_get_position_sub(RsvgHandle *handle, RsvgPositionData *position_data, const char *id)
rsvg_handle_get_position_sub:
gboolean rsvg_handle_get_intrinsic_size_in_pixels(RsvgHandle *handle, gdouble *out_width, gdouble *out_height)
rsvg_handle_get_intrinsic_size_in_pixels: @handle: an #RsvgHandle @out_width: (out)(optional): width ...
gboolean rsvg_handle_has_sub(RsvgHandle *handle, const char *id)
rsvg_handle_has_sub: @handle: an #RsvgHandle @id: element id starting with #
RsvgHandle * rsvg_handle_new_from_gfile_sync(GFile *file, RsvgHandleFlags flags, GCancellable *cancellable, GError **error)
rsvg_handle_new_from_gfile_sync: @gfile: a #GFile @flags: RsvgHandleFlags @cancellable: (nullable): a...
RsvgHandle * rsvg_handle_new_with_flags(RsvgHandleFlags flags)
rsvg_handle_new_with_flags: @flags: RsvgHandleFlags
RsvgHandle * rsvg_handle_new_from_data(const guint8 *data, gsize data_len, GError **error)
rsvg_handle_new_from_data: @data: SVG bytes @data_len: length of @data @error: return location for a ...
RsvgHandle * rsvg_handle_new(void)
rsvg_handle_new:
gboolean rsvg_handle_read_stream_sync(RsvgHandle *handle, GInputStream *stream, GCancellable *cancellable, GError **error)
rsvg_handle_read_stream_sync: @handle: an #RsvgHandle @stream: SVG data @cancellable: (nullable): a #...
const char * rsvg_handle_get_base_uri(RsvgHandle *handle)
rsvg_handle_get_base_uri:
void rsvg_handle_set_base_gfile(RsvgHandle *handle, GFile *base_file)
rsvg_handle_set_base_gfile: @handle: an #RsvgHandle @base_file: a #GFile used as the base for relativ...
RsvgHandle * rsvg_handle_new_from_stream_sync(GInputStream *input_stream, GFile *base_file, RsvgHandleFlags flags, GCancellable *cancellable, GError **error)
rsvg_handle_new_from_stream_sync:
void rsvg_handle_set_dpi_x_y(RsvgHandle *handle, double dpi_x, double dpi_y)
rsvg_handle_set_dpi_x_y: @handle: an #RsvgHandle
gboolean rsvg_handle_write(RsvgHandle *handle, const guchar *buf, gsize count, GError **error)
rsvg_handle_write:
RsvgHandle * rsvg_handle_new_from_file(const gchar *filename, GError **error)
rsvg_handle_new_from_file: @filename: a file name @error: return location for a #GError
void rsvg_handle_set_dpi(RsvgHandle *handle, double dpi)
rsvg_handle_set_dpi: @handle: an #RsvgHandle @dpi: dots per inch (both axes)
void rsvg_handle_set_base_uri(RsvgHandle *handle, const char *base_uri)
rsvg_handle_set_base_uri: @handle: an #RsvgHandle @base_uri: base URI for resolving relative referenc...
gboolean rsvg_handle_close(RsvgHandle *handle, GError **error)
rsvg_handle_close:
gboolean rsvg_handle_set_stylesheet(RsvgHandle *handle, const guint8 *css, gsize css_len, GError **error)
Set a CSS stylesheet for the SVG document.
GType rsvg_error_get_type(void)
RsvgHandleFlags
RsvgHandleFlags: @RSVG_HANDLE_FLAGS_NONE: no flags @RSVG_HANDLE_FLAG_UNLIMITED: no limits on XML size...
Definition rsvg.h:387
GType rsvg_handle_flags_get_type(void)
RsvgUnit
RsvgUnit:
Definition rsvg.h:186
RsvgError
RsvgError: @RSVG_ERROR_FAILED: the request failed.
Definition rsvg.h:60
GType rsvg_handle_get_type(void)
GQuark rsvg_error_quark(void)
rsvg_error_quark:
@ RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA
Definition rsvg.h:390
@ RSVG_HANDLE_FLAGS_NONE
Definition rsvg.h:388
@ RSVG_HANDLE_FLAG_UNLIMITED
Definition rsvg.h:389
@ RSVG_UNIT_PERCENT
Definition rsvg.h:187
@ RSVG_UNIT_CM
Definition rsvg.h:192
@ RSVG_UNIT_CH
Definition rsvg.h:196
@ RSVG_UNIT_MM
Definition rsvg.h:193
@ RSVG_UNIT_IN
Definition rsvg.h:191
@ RSVG_UNIT_EM
Definition rsvg.h:189
@ RSVG_UNIT_PT
Definition rsvg.h:194
@ RSVG_UNIT_PX
Definition rsvg.h:188
@ RSVG_UNIT_PC
Definition rsvg.h:195
@ RSVG_UNIT_EX
Definition rsvg.h:190
@ RSVG_ERROR_FAILED
Definition rsvg.h:61
RsvgLength:
Definition rsvg.h:206
double length
Definition rsvg.h:207
RsvgUnit unit
Definition rsvg.h:208
RsvgDimensionData:
Definition rsvg.h:144
gdouble ex
Definition rsvg.h:148
int width
Definition rsvg.h:145
gdouble em
Definition rsvg.h:147
int height
Definition rsvg.h:146
RsvgHandleClass:
Definition rsvg.h:107
gpointer _abi_padding[15]
Definition rsvg.h:111
GObjectClass parent
Definition rsvg.h:108
RsvgHandle:
Definition rsvg.h:123
GObject parent
Definition rsvg.h:124
gpointer _abi_padding[16]
Definition rsvg.h:131
RsvgPositionData:
Definition rsvg.h:160
int y
Definition rsvg.h:162
int x
Definition rsvg.h:161
RsvgRectangle:
Definition rsvg.h:172
double height
Definition rsvg.h:176
double width
Definition rsvg.h:175
double y
Definition rsvg.h:174
double x
Definition rsvg.h:173