LIBRSVG 2.62.3
C library for rendering SVG
Loading...
Searching...
No Matches
rsvg-cairo.h
Go to the documentation of this file.
1/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* vim: set sw=4 sts=4 expandtab: */
3/*
4 rsvg-cairo.h: Cairo rendering for SVG files
5
6 Copyright (C) 2005 Red Hat, Inc.
7 Copyright (C) 2026 Randy Butler
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13*/
14
15#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION)
16#warning "Including <librsvg/rsvg-cairo.h> directly is deprecated."
17#endif
18
19#ifndef RSVG_CAIRO_H
20#define RSVG_CAIRO_H
21
22#include <cairo.h>
23
24G_BEGIN_DECLS
25
42RSVG_DEPRECATED_FOR(rsvg_handle_render_document)
43gboolean rsvg_handle_render_cairo (RsvgHandle *handle, cairo_t *cr);
44
56RSVG_DEPRECATED_FOR(rsvg_handle_render_layer)
57gboolean rsvg_handle_render_cairo_sub (RsvgHandle *handle, cairo_t *cr, const char *id);
58
71RSVG_API
72gboolean rsvg_handle_render_document (RsvgHandle *handle,
73 cairo_t *cr,
74 const RsvgRectangle *viewport,
75 GError **error);
76
91RSVG_API
92gboolean rsvg_handle_render_layer (RsvgHandle *handle,
93 cairo_t *cr,
94 const char *id,
95 const RsvgRectangle *viewport,
96 GError **error);
97
113RSVG_API
114gboolean rsvg_handle_render_element (RsvgHandle *handle,
115 cairo_t *cr,
116 const char *id,
117 const RsvgRectangle *element_viewport,
118 GError **error);
119
141RSVG_API
142gboolean rsvg_handle_get_geometry_for_layer (RsvgHandle *handle,
143 const char *id,
144 const RsvgRectangle *viewport,
145 RsvgRectangle *out_ink_rect,
146 RsvgRectangle *out_logical_rect,
147 GError **error);
148
163RSVG_API
164gboolean rsvg_handle_get_geometry_for_element (RsvgHandle *handle,
165 const char *id,
166 RsvgRectangle *out_ink_rect,
167 RsvgRectangle *out_logical_rect,
168 GError **error);
169
172G_END_DECLS
173
174#endif
gboolean rsvg_handle_get_geometry_for_element(RsvgHandle *handle, const char *id, RsvgRectangle *out_ink_rect, RsvgRectangle *out_logical_rect, GError **error)
rsvg_handle_get_geometry_for_element: @handle: an #RsvgHandle @id: (nullable): element id starting wi...
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_render_cairo_sub(RsvgHandle *handle, cairo_t *cr, const char *id)
rsvg_handle_render_cairo_sub: @handle: an #RsvgHandle @cr: a Cairo context @id: (nullable): element i...
gboolean rsvg_handle_render_document(RsvgHandle *handle, cairo_t *cr, const RsvgRectangle *viewport, GError **error)
Draw the whole SVG into @viewport on @cr.
gboolean rsvg_handle_render_element(RsvgHandle *handle, cairo_t *cr, const char *id, const RsvgRectangle *element_viewport, GError **error)
rsvg_handle_render_element: @handle: an #RsvgHandle @cr: a Cairo context @id: (nullable): element id ...
gboolean rsvg_handle_render_layer(RsvgHandle *handle, cairo_t *cr, const char *id, const RsvgRectangle *viewport, GError **error)
rsvg_handle_render_layer: @handle: an #RsvgHandle @cr: a Cairo context @id: (nullable): element id st...
gboolean rsvg_handle_render_cairo(RsvgHandle *handle, cairo_t *cr)
rsvg_handle_render_cairo: @handle: an #RsvgHandle @cr: a Cairo context