thorvg/docs/html/classtvg_1_1Scene.html
2021-05-25 14:21:09 +09:00

299 lines
24 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ThorVG: Scene</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="docs_logo.svg"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ThorVG
&#160;<span id="projectnumber">v0.1</span>
</div>
<div id="projectbrief">ThorVG is a platform-independent portable library for drawing vector-based scene and animation. It&#39;s an open-source software that is freely used by a variety of software platforms and applications. ThorVG provides neat and easy APIs, its library has no dependencies and keeps cheap and super compact size. It serves as the vector graphics engine for Tizen OS that powers many products.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classtvg_1_1Scene.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classtvg_1_1Scene-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Scene<span class="mlabels"><span class="mlabel">final</span></span><div class="ingroups"><a class="el" href="group__ThorVG.html">ThorVG</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>A class to composite children paints.
<a href="classtvg_1_1Scene.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Scene:</div>
<div class="dyncontent">
<div class="center"><img src="classtvg_1_1Scene__inherit__graph.png" border="0" usemap="#Scene_inherit__map" alt="Inheritance graph"/></div>
<map name="Scene_inherit__map" id="Scene_inherit__map">
<area shape="rect" id="node2" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements. " alt="" coords="9,5,61,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a19240cd5b53571da718fabef8afb7103"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Scene.html#a19240cd5b53571da718fabef8afb7103">push</a> (std::unique_ptr&lt; <a class="el" href="classtvg_1_1Paint.html">Paint</a> &gt; paint) noexcept</td></tr>
<tr class="memdesc:a19240cd5b53571da718fabef8afb7103"><td class="mdescLeft">&#160;</td><td class="mdescRight">Passes drawing elements to the <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> using <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements. ">Paint</a> objects. <a href="#a19240cd5b53571da718fabef8afb7103">More...</a><br /></td></tr>
<tr class="separator:a19240cd5b53571da718fabef8afb7103"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e23b9ddc266b5910001174b3c84a485"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Scene.html#a7e23b9ddc266b5910001174b3c84a485">reserve</a> (uint32_t size) noexcept</td></tr>
<tr class="memdesc:a7e23b9ddc266b5910001174b3c84a485"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the container, where all the paints pushed into the <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> are stored. <a href="#a7e23b9ddc266b5910001174b3c84a485">More...</a><br /></td></tr>
<tr class="separator:a7e23b9ddc266b5910001174b3c84a485"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1b298a0aae3e173a984c0bceb2456fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Scene.html#ab1b298a0aae3e173a984c0bceb2456fe">clear</a> () noexcept</td></tr>
<tr class="memdesc:ab1b298a0aae3e173a984c0bceb2456fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the total number of the paints pushed into the scene to be zero. <a href="#ab1b298a0aae3e173a984c0bceb2456fe">More...</a><br /></td></tr>
<tr class="separator:ab1b298a0aae3e173a984c0bceb2456fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classtvg_1_1Paint"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtvg_1_1Paint')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classtvg_1_1Paint.html">Paint</a></td></tr>
<tr class="memitem:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a7841fa0c14643e09735d48042ead68f3">rotate</a> (float degree) noexcept</td></tr>
<tr class="memdesc:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the angle by which the object is rotated. <a href="classtvg_1_1Paint.html#a7841fa0c14643e09735d48042ead68f3">More...</a><br /></td></tr>
<tr class="separator:a7841fa0c14643e09735d48042ead68f3 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a5c057876185525c5723215f95a3984f2">scale</a> (float factor) noexcept</td></tr>
<tr class="memdesc:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scale value of the object. <a href="classtvg_1_1Paint.html#a5c057876185525c5723215f95a3984f2">More...</a><br /></td></tr>
<tr class="separator:a5c057876185525c5723215f95a3984f2 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e">translate</a> (float x, float y) noexcept</td></tr>
<tr class="memdesc:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the values by which the object is moved in a two-dimensional space. <a href="classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e">More...</a><br /></td></tr>
<tr class="separator:ae896f56bfa51c98a50eee3f2bb62e41e inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#ac9f6ba428afe884bcc2861de0a2a96f4">transform</a> (const <a class="el" href="structtvg_1_1Matrix.html">Matrix</a> &amp;m) noexcept</td></tr>
<tr class="memdesc:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the matrix of the affine transformation for the object. <a href="classtvg_1_1Paint.html#ac9f6ba428afe884bcc2861de0a2a96f4">More...</a><br /></td></tr>
<tr class="separator:ac9f6ba428afe884bcc2861de0a2a96f4 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a2f25b71fed3ae390eb8051c7ea65aebf">opacity</a> (uint8_t o) noexcept</td></tr>
<tr class="memdesc:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the opacity of the object. <a href="classtvg_1_1Paint.html#a2f25b71fed3ae390eb8051c7ea65aebf">More...</a><br /></td></tr>
<tr class="separator:a2f25b71fed3ae390eb8051c7ea65aebf inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab93150647927b8f2006b5ae45b7b093 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#aab93150647927b8f2006b5ae45b7b093">composite</a> (std::unique_ptr&lt; <a class="el" href="classtvg_1_1Paint.html">Paint</a> &gt; target, <a class="el" href="group__ThorVG.html#gaabdf94ada64e69d06deabc5aa6576f87">CompositeMethod</a> method) const noexcept</td></tr>
<tr class="memdesc:aab93150647927b8f2006b5ae45b7b093 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the composition target object and the composition method. <a href="classtvg_1_1Paint.html#aab93150647927b8f2006b5ae45b7b093">More...</a><br /></td></tr>
<tr class="separator:aab93150647927b8f2006b5ae45b7b093 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d4e91eeca737b135064caadab4b4dff inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a6d4e91eeca737b135064caadab4b4dff">bounds</a> (float *x, float *y, float *w, float *h) const noexcept</td></tr>
<tr class="memdesc:a6d4e91eeca737b135064caadab4b4dff inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the bounding box of the paint object before any transformation. <a href="classtvg_1_1Paint.html#a6d4e91eeca737b135064caadab4b4dff">More...</a><br /></td></tr>
<tr class="separator:a6d4e91eeca737b135064caadab4b4dff inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtvg_1_1Paint.html">Paint</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a71afac69fe1e7c352460be5878812635">duplicate</a> () const noexcept</td></tr>
<tr class="memdesc:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Duplicates the object. <a href="classtvg_1_1Paint.html#a71afac69fe1e7c352460be5878812635">More...</a><br /></td></tr>
<tr class="separator:a71afac69fe1e7c352460be5878812635 inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Paint.html#a2ee7517b8bfad47e0f999ba3450e0e3e">opacity</a> () const noexcept</td></tr>
<tr class="memdesc:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the opacity value of the object. <a href="classtvg_1_1Paint.html#a2ee7517b8bfad47e0f999ba3450e0e3e">More...</a><br /></td></tr>
<tr class="separator:a2ee7517b8bfad47e0f999ba3450e0e3e inherit pub_methods_classtvg_1_1Paint"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a01a17bb81862d89f2a0feb5d9818a149"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="classtvg_1_1Scene.html">Scene</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Scene.html#a01a17bb81862d89f2a0feb5d9818a149">gen</a> () noexcept</td></tr>
<tr class="memdesc:a01a17bb81862d89f2a0feb5d9818a149"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> object. <a href="#a01a17bb81862d89f2a0feb5d9818a149">More...</a><br /></td></tr>
<tr class="separator:a01a17bb81862d89f2a0feb5d9818a149"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class to composite children paints. </p>
<p>As the traditional graphics rendering method, TVG also enables scene-graph mechanism. This feature supports an array function for managing the multiple paints as one group paint.</p>
<p>As a group, the scene can be transformed, made translucent and composited with other target paints, its children will be affected by the scene world. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ab1b298a0aae3e173a984c0bceb2456fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1b298a0aae3e173a984c0bceb2456fe">&#9670;&nbsp;</a></span>clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the total number of the paints pushed into the scene to be zero. </p>
<dl class="section warning"><dt>Warning</dt><dd>Please do not use it, this API is not official one. It could be modified in the next version.</dd></dl>
</div>
</div>
<a id="a01a17bb81862d89f2a0feb5d9818a149"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01a17bb81862d89f2a0feb5d9818a149">&#9670;&nbsp;</a></span>gen()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::unique_ptr&lt;<a class="el" href="classtvg_1_1Scene.html">Scene</a>&gt; gen </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> object. </p>
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> object. </dd></dl>
</div>
</div>
<a id="a19240cd5b53571da718fabef8afb7103"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19240cd5b53571da718fabef8afb7103">&#9670;&nbsp;</a></span>push()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> push </td>
<td>(</td>
<td class="paramtype">std::unique_ptr&lt; <a class="el" href="classtvg_1_1Paint.html">Paint</a> &gt;&#160;</td>
<td class="paramname"><em>paint</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Passes drawing elements to the <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> using <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements. ">Paint</a> objects. </p>
<p>Only pushed paints in the scene will be drawing targets. They are retained by the scene until you call <a class="el" href="classtvg_1_1Scene.html#ab1b298a0aae3e173a984c0bceb2456fe" title="Sets the total number of the paints pushed into the scene to be zero. ">Scene::clear()</a>. If you know the number of the pushed objects in the advance, please call <a class="el" href="classtvg_1_1Scene.html#a7e23b9ddc266b5910001174b3c84a485" title="Sets the size of the container, where all the paints pushed into the Scene are stored. ">Scene::reserve()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">paint</td><td>A <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements. ">Paint</a> object to be drawn.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution. ">Result::Success</a> when succeed, <a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066ae8c0c653fcac575c31470f0f800991c6" title="The value returned in the event of bad memory handling - e.g. failing in pointer releasing or casting...">Result::MemoryCorruption</a> otherwise.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The rendering order of the paints is the same as the order as they were pushed. Consider sorting the paints before pushing them if you intend to use layering. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Scene.html#a7e23b9ddc266b5910001174b3c84a485" title="Sets the size of the container, where all the paints pushed into the Scene are stored. ">Scene::reserve()</a> </dd></dl>
</div>
</div>
<a id="a7e23b9ddc266b5910001174b3c84a485"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e23b9ddc266b5910001174b3c84a485">&#9670;&nbsp;</a></span>reserve()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> reserve </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the size of the container, where all the paints pushed into the <a class="el" href="classtvg_1_1Scene.html" title="A class to composite children paints. ">Scene</a> are stored. </p>
<p>If the number of objects pushed into the scene is known in advance, calling the function prevents multiple memory reallocation, thus improving the performance.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The number of objects for which the memory is to be reserved.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution. ">Result::Success</a> when succeed. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><b>tvg</b></li><li class="navelem"><a class="el" href="classtvg_1_1Scene.html">Scene</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>