LIBRSVG: C library for rendering SVG

LIBRSVG 2.62.3 C library for rendering SVG

Loading...
Searching...
No Matches
librsvg

librsvg is a C library that loads SVG and SVGZ and draws it onto a Cairo surface. The shared library, headers, and pkg-config module are librsvg-2.0. This is the public C API for librsvg 2.62.3.

It handles non-animated SVG, CSS styling, filters, masks, clip paths, and SVG `<image>` rasters (PNG, JPEG, GIF, WebP, BMP; optional AVIF). A gdk-pixbuf loader and `rsvg-convert` are included. See the examples.

# Limits

SVG `<image>` rasters: maximum side 32767, maximum 32×1024×1024 pixels. Very large `data:` payloads or stylesheet buffers may be rejected.

# API groups

- Types — #RsvgHandle, #RsvgRectangle, RsvgLength, RsvgUnit
- Loading — `new_from_file`, `new_from_data`, GIO
- Rendering — `render_document` (prefer this over `render_cairo`)
- Geometry — `get_geometry_for_*`, `get_intrinsic_*`
- Stylesheet — `set_stylesheet`
- Pixbuf — `get_pixbuf_and_error`
- Cancel — `set_cancellable_for_rendering`
- Version — `LIBRSVG_CHECK_VERSION`, `LIBRSVG_VERSION`
- Deprecated — older calls kept for compatibility

The last new public C function is `rsvg_handle_set_cancellable_for_rendering` (2.59). The library version is 2.62.3.

Thank you — the people who built librsvg.

# Licence

The library (`librsvg-2.so`) is licensed under the GNU Library General Public License, version 2 or later. You may link this library from other programs; the library itself stays under this license. The full text is LICENCE-LIB.

The command-line tools (`rsvg-convert` and similar) are licensed under the GNU General Public License, version 2. The full text is LICENCE.

# Building this HTML

Doxygen is required. From the project root:

    doxygen doc/Doxyfile

or `make html`. Either command writes `doc/html/index.html`.