Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6586

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsvgrenderer.cpp -->
  <title>Qt 4.8: QSvgRenderer Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtsvg.html">QtSvg</a></li>
<li>QSvgRenderer</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QSvgRenderer Class Reference</h1>
<!-- $$$QSvgRenderer-brief -->
<p>The QSvgRenderer class is used to draw the contents of SVG files onto paint devices. <a href="#details">More...</a></p>
<!-- @@@QSvgRenderer -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSvgRenderer&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This class was introduced in Qt 4.1.</p>
<ul>
<li><a href="qsvgrenderer-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qsvgrenderer.html#framesPerSecond-prop">framesPerSecond</a></b> : int</li>
<li class="fn"><b><a href="qsvgrenderer.html#viewBox-prop">viewBox</a></b> : QRectF</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#QSvgRenderer">QSvgRenderer</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#QSvgRenderer-2">QSvgRenderer</a></b> ( const QString &amp; <i>filename</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#QSvgRenderer-3">QSvgRenderer</a></b> ( const QByteArray &amp; <i>contents</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#QSvgRenderer-4">QSvgRenderer</a></b> ( QXmlStreamReader * <i>contents</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#dtor.QSvgRenderer">~QSvgRenderer</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#animated">animated</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#boundsOnElement">boundsOnElement</a></b> ( const QString &amp; <i>id</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#defaultSize">defaultSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#elementExists">elementExists</a></b> ( const QString &amp; <i>id</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#framesPerSecond-prop">framesPerSecond</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QMatrix </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#matrixForElement">matrixForElement</a></b> ( const QString &amp; <i>id</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#framesPerSecond-prop">setFramesPerSecond</a></b> ( int <i>num</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#viewBox-prop">setViewBox</a></b> ( const QRect &amp; <i>viewbox</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#viewBox-prop">setViewBox</a></b> ( const QRectF &amp; <i>viewbox</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#viewBox">viewBox</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#viewBox-prop">viewBoxF</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#load">load</a></b> ( const QString &amp; <i>filename</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#load-2">load</a></b> ( const QByteArray &amp; <i>contents</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#load-3">load</a></b> ( QXmlStreamReader * <i>contents</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#render">render</a></b> ( QPainter * <i>painter</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#render-2">render</a></b> ( QPainter * <i>painter</i>, const QRectF &amp; <i>bounds</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#render-3">render</a></b> ( QPainter * <i>painter</i>, const QString &amp; <i>elementId</i>, const QRectF &amp; <i>bounds</i> = QRectF() )</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsvgrenderer.html#repaintNeeded">repaintNeeded</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QSvgRenderer-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSvgRenderer class is used to draw the contents of SVG files onto paint devices.</p>
<p>Using QSvgRenderer, Scalable Vector Graphics (SVG) can be rendered onto any <a href="qpaintdevice.html">QPaintDevice</a> subclass, including <a href="qwidget.html">QWidget</a>, <a href="qimage.html">QImage</a>, and <a href="qglwidget.html">QGLWidget</a>.</p>
<p>QSvgRenderer provides an API that supports basic features of SVG rendering, such as loading and rendering of static drawings, and more interactive features like animation. Since the rendering is performed using <a href="qpainter.html">QPainter</a>, SVG drawings can be rendered on any subclass of <a href="qpaintdevice.html">QPaintDevice</a>.</p>
<p>SVG drawings are either loaded when an QSvgRenderer is constructed, or loaded later using the <a href="qsvgrenderer.html#load">load</a>() functions. Data is either supplied directly as serialized XML, or indirectly using a file name. If a valid file has been loaded, either when the renderer is constructed or at some later time, <a href="qsvgrenderer.html#isValid">isValid</a>() returns true; otherwise it returns false. QSvgRenderer provides the <a href="qsvgrenderer.html#render">render</a>() slot to render the current document, or the current frame of an animated document, using a given painter.</p>
<p>The <a href="qsvgrenderer.html#defaultSize">defaultSize</a>() function provides information about the amount of space that is required to render the currently loaded SVG file. This is useful for paint devices, such as <a href="qwidget.html">QWidget</a>, that often need to supply a size hint to their parent layout. The default size of a drawing may differ from its visible area, found using the <a href="qsvgrenderer.html#viewBox-prop">viewBox</a> property.</p>
<p>Animated SVG drawings are supported, and can be controlled with a simple collection of functions and properties:</p>
<ul>
<li>The <a href="qsvgrenderer.html#animated">animated</a>() function indicates whether a drawing contains animation information.</li>
<li>The <a href="qsvgrenderer.html#framesPerSecond-prop">framesPerSecond</a> property contains the rate at which the animation plays.</li>
</ul>
<p>Finally, the QSvgRenderer class provides the <a href="qsvgrenderer.html#repaintNeeded">repaintNeeded</a>() signal which is emitted whenever the rendering of the document needs to be updated.</p>
</div>
<p><b>See also </b><a href="qsvgwidget.html">QSvgWidget</a>, <a href="qtsvg.html">QtSvg Module</a>, <a href="painting-svgviewer.html">SVG Viewer Example</a>, and <a href="qpicture.html">QPicture</a>.</p>
<!-- @@@QSvgRenderer -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$framesPerSecond-prop$$$framesPerSecond$$$setFramesPerSecondint -->
<h3 class="fn"><a name="framesPerSecond-prop"></a><span class="name">framesPerSecond</span> : <span class="type">int</span></h3>
<p>This property holds the number of frames per second to be shown.</p>
<p>The number of frames per second is 0 if the current document is not animated.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>framesPerSecond</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFramesPerSecond</b></span> ( int <i>num</i> )</td></tr>
</table>
<p><b>See also </b><a href="qsvgrenderer.html#animated">animated</a>().</p>
<!-- @@@framesPerSecond -->
<!-- $$$viewBox-prop$$$viewBoxF$$$setViewBoxconstQRect&$$$setViewBoxconstQRectF& -->
<h3 class="fn"><a name="viewBox-prop"></a><span class="name">viewBox</span> : <span class="type"><a href="qrectf.html">QRectF</a></span></h3>
<p>This property holds the rectangle specifying the visible area of the document in logical coordinates.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QRectF </td><td class="memItemRight bottomAlign"><span class="name"><b>viewBoxF</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setViewBox</b></span> ( const QRect &amp; <i>viewbox</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setViewBox</b></span> ( const QRectF &amp; <i>viewbox</i> )</td></tr>
</table>
<!-- @@@viewBox -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSvgRenderer[overload1]$$$QSvgRendererQObject* -->
<h3 class="fn"><a name="QSvgRenderer"></a>QSvgRenderer::<span class="name">QSvgRenderer</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a new renderer with the given <i>parent</i>.</p>
<!-- @@@QSvgRenderer -->
<!-- $$$QSvgRenderer$$$QSvgRendererconstQString&QObject* -->
<h3 class="fn"><a name="QSvgRenderer-2"></a>QSvgRenderer::<span class="name">QSvgRenderer</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>filename</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a new renderer with the given <i>parent</i> and loads the contents of the SVG file with the specified <i>filename</i>.</p>
<!-- @@@QSvgRenderer -->
<!-- $$$QSvgRenderer$$$QSvgRendererconstQByteArray&QObject* -->
<h3 class="fn"><a name="QSvgRenderer-3"></a>QSvgRenderer::<span class="name">QSvgRenderer</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>contents</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a new renderer with the given <i>parent</i> and loads the SVG data from the byte array specified by <i>contents</i>.</p>
<!-- @@@QSvgRenderer -->
<!-- $$$QSvgRenderer$$$QSvgRendererQXmlStreamReader*QObject* -->
<h3 class="fn"><a name="QSvgRenderer-4"></a>QSvgRenderer::<span class="name">QSvgRenderer</span> ( <span class="type"><a href="qxmlstreamreader.html">QXmlStreamReader</a></span> * <i>contents</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a new renderer with the given <i>parent</i> and loads the SVG data using the stream reader specified by <i>contents</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@QSvgRenderer -->
<!-- $$$~QSvgRenderer[overload1]$$$~QSvgRenderer -->
<h3 class="fn"><a name="dtor.QSvgRenderer"></a>QSvgRenderer::<span class="name">~QSvgRenderer</span> ()</h3>
<p>Destroys the renderer.</p>
<!-- @@@~QSvgRenderer -->
<!-- $$$animated[overload1]$$$animated -->
<h3 class="fn"><a name="animated"></a><span class="type">bool</span> QSvgRenderer::<span class="name">animated</span> () const</h3>
<p>Returns true if the current document contains animated elements; otherwise returns false.</p>
<p><b>See also </b><a href="qsvgrenderer.html#framesPerSecond-prop">framesPerSecond</a>().</p>
<!-- @@@animated -->
<!-- $$$boundsOnElement[overload1]$$$boundsOnElementconstQString& -->
<h3 class="fn"><a name="boundsOnElement"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QSvgRenderer::<span class="name">boundsOnElement</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>id</i> ) const</h3>
<p>Returns bounding rectangle of the item with the given <i>id</i>. The transformation matrix of parent elements is not affecting the bounds of the element.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qsvgrenderer.html#matrixForElement">matrixForElement</a>().</p>
<!-- @@@boundsOnElement -->
<!-- $$$defaultSize[overload1]$$$defaultSize -->
<h3 class="fn"><a name="defaultSize"></a><span class="type"><a href="qsize.html">QSize</a></span> QSvgRenderer::<span class="name">defaultSize</span> () const</h3>
<p>Returns the default size of the document contents.</p>
<!-- @@@defaultSize -->
<!-- $$$elementExists[overload1]$$$elementExistsconstQString& -->
<h3 class="fn"><a name="elementExists"></a><span class="type">bool</span> QSvgRenderer::<span class="name">elementExists</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>id</i> ) const</h3>
<p>Returns true if the element with the given <i>id</i> exists in the currently parsed SVG file and is a renderable element.</p>
<p>Note: this method returns true only for elements that can be rendered. Which implies that elements that are considered part of the fill/stroke style properties, e.g&#x2e; radialGradients even tough marked with &quot;id&quot; attributes will not be found by this method.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@elementExists -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QSvgRenderer::<span class="name">isValid</span> () const</h3>
<p>Returns true if there is a valid current document; otherwise returns false.</p>
<!-- @@@isValid -->
<!-- $$$load[overload1]$$$loadconstQString& -->
<h3 class="fn"><a name="load"></a><span class="type">bool</span> QSvgRenderer::<span class="name">load</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>filename</i> )<tt> [slot]</tt></h3>
<p>Loads the SVG file specified by <i>filename</i>, returning true if the content was successfully parsed; otherwise returns false.</p>
<!-- @@@load -->
<!-- $$$load$$$loadconstQByteArray& -->
<h3 class="fn"><a name="load-2"></a><span class="type">bool</span> QSvgRenderer::<span class="name">load</span> ( const <span class="type"><a href="qbytearray.html">QByteArray</a></span> &amp; <i>contents</i> )<tt> [slot]</tt></h3>
<p>Loads the specified SVG format <i>contents</i>, returning true if the content was successfully parsed; otherwise returns false.</p>
<!-- @@@load -->
<!-- $$$load$$$loadQXmlStreamReader* -->
<h3 class="fn"><a name="load-3"></a><span class="type">bool</span> QSvgRenderer::<span class="name">load</span> ( <span class="type"><a href="qxmlstreamreader.html">QXmlStreamReader</a></span> * <i>contents</i> )<tt> [slot]</tt></h3>
<p>Loads the specified SVG in <i>contents</i>, returning true if the content was successfully parsed; otherwise returns false.</p>
<p>The reader will be used from where it currently is positioned. If <i>contents</i> is <tt>null</tt>, behavior is undefined.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@load -->
<!-- $$$matrixForElement[overload1]$$$matrixForElementconstQString& -->
<h3 class="fn"><a name="matrixForElement"></a><span class="type"><a href="qmatrix.html">QMatrix</a></span> QSvgRenderer::<span class="name">matrixForElement</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>id</i> ) const</h3>
<p>Returns the transformation matrix for the element with the given <i>id</i>. The matrix is a product of the transformation of the element's parents. The transformation of the element itself is not included.</p>
<p>To find the bounding rectangle of the element in logical coordinates, you can apply the matrix on the rectangle returned from <a href="qsvgrenderer.html#boundsOnElement">boundsOnElement</a>().</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qsvgrenderer.html#boundsOnElement">boundsOnElement</a>().</p>
<!-- @@@matrixForElement -->
<!-- $$$render[overload1]$$$renderQPainter* -->
<h3 class="fn"><a name="render"></a><span class="type">void</span> QSvgRenderer::<span class="name">render</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i> )<tt> [slot]</tt></h3>
<p>Renders the current document, or the current frame of an animated document, using the given <i>painter</i>.</p>
<!-- @@@render -->
<!-- $$$render$$$renderQPainter*constQRectF& -->
<h3 class="fn"><a name="render-2"></a><span class="type">void</span> QSvgRenderer::<span class="name">render</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>bounds</i> )<tt> [slot]</tt></h3>
<p>Renders the current document, or the current frame of an animated document, using the given <i>painter</i> on the specified <i>bounds</i> within the painter. If the bounding rectangle is not specified the SVG file is mapped to the whole paint device.</p>
<!-- @@@render -->
<!-- $$$render$$$renderQPainter*constQString&constQRectF& -->
<h3 class="fn"><a name="render-3"></a><span class="type">void</span> QSvgRenderer::<span class="name">render</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>elementId</i>, const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>bounds</i> = QRectF() )<tt> [slot]</tt></h3>
<p>Renders the given element with <i>elementId</i> using the given <i>painter</i> on the specified <i>bounds</i>. If the bounding rectangle is not specified the SVG element is mapped to the whole paint device.</p>
<!-- @@@render -->
<!-- $$$repaintNeeded[overload1]$$$repaintNeeded -->
<h3 class="fn"><a name="repaintNeeded"></a><span class="type">void</span> QSvgRenderer::<span class="name">repaintNeeded</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the rendering of the document needs to be updated, usually for the purposes of animation.</p>
<!-- @@@repaintNeeded -->
<!-- $$$viewBox[overload1]$$$viewBox -->
<h3 class="fn"><a name="viewBox"></a><span class="type"><a href="qrect.html">QRect</a></span> QSvgRenderer::<span class="name">viewBox</span> () const</h3>
<p>Returns <a href="qsvgrenderer.html#viewBox-prop">viewBoxF</a>().toRect().</p>
<p><b>See also </b><a href="qsvgrenderer.html#viewBox-prop">setViewBox</a>() and <a href="qsvgrenderer.html#viewBox-prop">viewBoxF</a>().</p>
<!-- @@@viewBox -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>