Current File : //proc/self/root/kunden/usr/share/gtk-doc/html/rsvg-2.0/ch01.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Overview of Librsvg's API: Librsvg Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Librsvg Reference Manual">
<link rel="up" href="rsvg.html" title="Part I. API Reference">
<link rel="prev" href="rsvg.html" title="Part I. API Reference">
<link rel="next" href="ch02.html" title="Recommendations for Applications">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rsvg.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="rsvg.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch02.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="id-1.2.3"></a>Overview of Librsvg's API</h2></div></div></div>
<p>
Librsvg's API is divided into two main parts: one for loading SVG
data and one for rendering it. In the <span class="emphasis"><em>loading
stage</em></span>, you create an RsvgHandle object from SVG data,
which can come from a file or from a stream of bytes. In the
<span class="emphasis"><em>rendering stage</em></span>, you take an RsvgHandle and ask
it to render itself to a Cairo context.
</p>
<p><b>Loading. </b>
RsvgHandle is an object that represents SVG data in memory.
Your program creates an RsvgHandle from an SVG file, or from a
memory buffer that contains SVG data, or in the most general
form, from a GIO stream that will provide SVG data. At this
stage you can get either I/O errors or parsing errors. If
loading completes successfully, the RsvgHandle will be ready for
rendering.
</p>
<p><b>Rendering. </b>
Once you have an SVG image loaded into an RsvgHandle, you can
render it to a Cairo context any number of times, or to
different Cairo contexts, as needed. As a convenience, you can
pick a single element in the SVG by its "id" attribute and
render only that element; this is so that sub-elements can be
extracted conveniently out of a larger SVG.
</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>