mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
343 lines
24 KiB
HTML
343 lines
24 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>ThorVG: Canvas</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="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="small_logo.svg"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">ThorVG
|
|
 <span id="projectnumber">v0.6</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- 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 id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><b>tvg</b></li><li class="navelem"><a class="el" href="classtvg_1_1Canvas.html">Canvas</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classtvg_1_1Canvas-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Canvas<div class="ingroups"><a class="el" href="group__ThorVG.html">ThorVG</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>An abstract class for drawing graphical elements.
|
|
<a href="classtvg_1_1Canvas.html#details">More...</a></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for Canvas:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classtvg_1_1Canvas__inherit__graph.png" border="0" usemap="#Canvas_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="Canvas_inherit__map" id="Canvas_inherit__map">
|
|
<area shape="rect" title="An abstract class for drawing graphical elements." alt="" coords="67,5,137,32"/>
|
|
<area shape="rect" href="classtvg_1_1GlCanvas.html" title="A class for the rendering graphic elements with a GL raster engine." alt="" coords="5,80,89,107"/>
|
|
<area shape="rect" href="classtvg_1_1SwCanvas.html" title="A class for the rendering graphical elements with a software raster engine." alt="" coords="113,80,203,107"/>
|
|
</map>
|
|
<center><span class="legend">[<a 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:a4cff0ab757e1db9077bbecaf25f012ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#a4cff0ab757e1db9077bbecaf25f012ba">reserve</a> (uint32_t n) noexcept</td></tr>
|
|
<tr class="memdesc:a4cff0ab757e1db9077bbecaf25f012ba"><td class="mdescLeft"> </td><td class="mdescRight">Sets the size of the container, where all the paints pushed into the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> are stored. <a href="classtvg_1_1Canvas.html#a4cff0ab757e1db9077bbecaf25f012ba">More...</a><br /></td></tr>
|
|
<tr class="separator:a4cff0ab757e1db9077bbecaf25f012ba"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a82c5ec1c1ba93cf7671642400074201e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#a82c5ec1c1ba93cf7671642400074201e">push</a> (std::unique_ptr< <a class="el" href="classtvg_1_1Paint.html">Paint</a> > paint) noexcept</td></tr>
|
|
<tr class="memdesc:a82c5ec1c1ba93cf7671642400074201e"><td class="mdescLeft"> </td><td class="mdescRight">Passes drawing elements to the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> using <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> objects. <a href="classtvg_1_1Canvas.html#a82c5ec1c1ba93cf7671642400074201e">More...</a><br /></td></tr>
|
|
<tr class="separator:a82c5ec1c1ba93cf7671642400074201e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a99cdb01cd893f4199b521b754d21aefd"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#a99cdb01cd893f4199b521b754d21aefd">clear</a> (bool free=true) noexcept</td></tr>
|
|
<tr class="memdesc:a99cdb01cd893f4199b521b754d21aefd"><td class="mdescLeft"> </td><td class="mdescRight">Sets the total number of the paints pushed into the canvas to be zero. Depending on the value of the <code>free</code> argument, the paints are freed or not. <a href="classtvg_1_1Canvas.html#a99cdb01cd893f4199b521b754d21aefd">More...</a><br /></td></tr>
|
|
<tr class="separator:a99cdb01cd893f4199b521b754d21aefd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a89ac8a85a8c22723af9fb07c098472b3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#a89ac8a85a8c22723af9fb07c098472b3">update</a> (<a class="el" href="classtvg_1_1Paint.html">Paint</a> *paint=nullptr) noexcept</td></tr>
|
|
<tr class="memdesc:a89ac8a85a8c22723af9fb07c098472b3"><td class="mdescLeft"> </td><td class="mdescRight">Request the canvas to update the paint objects. <a href="classtvg_1_1Canvas.html#a89ac8a85a8c22723af9fb07c098472b3">More...</a><br /></td></tr>
|
|
<tr class="separator:a89ac8a85a8c22723af9fb07c098472b3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aabf9e5a14da3b4bfd5883c2b4459abd0"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#aabf9e5a14da3b4bfd5883c2b4459abd0">draw</a> () noexcept</td></tr>
|
|
<tr class="memdesc:aabf9e5a14da3b4bfd5883c2b4459abd0"><td class="mdescLeft"> </td><td class="mdescRight">Requests the canvas to draw the <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> objects. <a href="classtvg_1_1Canvas.html#aabf9e5a14da3b4bfd5883c2b4459abd0">More...</a><br /></td></tr>
|
|
<tr class="separator:aabf9e5a14da3b4bfd5883c2b4459abd0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adbca600af79f9a0b8e8366e3be7450e9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Canvas.html#adbca600af79f9a0b8e8366e3be7450e9">sync</a> () noexcept</td></tr>
|
|
<tr class="memdesc:adbca600af79f9a0b8e8366e3be7450e9"><td class="mdescLeft"> </td><td class="mdescRight">Guarantees that drawing task is finished. <a href="classtvg_1_1Canvas.html#adbca600af79f9a0b8e8366e3be7450e9">More...</a><br /></td></tr>
|
|
<tr class="separator:adbca600af79f9a0b8e8366e3be7450e9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>An abstract class for drawing graphical elements. </p>
|
|
<p>A canvas is an entity responsible for drawing the target. It sets up the drawing engine and the buffer, which can be drawn on the screen. It also manages given <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> objects.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>A <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> behavior depends on the raster engine though the final content of the buffer is expected to be identical. </dd></dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>The <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> objects belonging to one <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> can't be shared among multiple Canvases. </dd></dl>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a99cdb01cd893f4199b521b754d21aefd"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a99cdb01cd893f4199b521b754d21aefd">◆ </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">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> clear </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>free</em> = <code>true</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets the total number of the paints pushed into the canvas to be zero. Depending on the value of the <code>free</code> argument, the paints are freed or not. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">free</td><td>If <code>true</code>, the memory occupied by paints is deallocated, otherwise it is not.</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#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise.</dd></dl>
|
|
<dl class="section warning"><dt>Warning</dt><dd>If you don't free the paints they become dangled. They are supposed to be reused, otherwise you are responsible for their lives. Thus please use the <code>free</code> argument only when you know how it works, otherwise it's not recommended. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aabf9e5a14da3b4bfd5883c2b4459abd0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aabf9e5a14da3b4bfd5883c2b4459abd0">◆ </a></span>draw()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> draw </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Requests the canvas to draw the <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> objects. </p>
|
|
<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#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>Drawing can be asynchronous if the assigned thread number is greater than zero. To guarantee the drawing is done, call <a class="el" href="classtvg_1_1Canvas.html#adbca600af79f9a0b8e8366e3be7450e9" title="Guarantees that drawing task is finished.">sync()</a> afterwards. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Canvas.html#adbca600af79f9a0b8e8366e3be7450e9" title="Guarantees that drawing task is finished.">Canvas::sync()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a82c5ec1c1ba93cf7671642400074201e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a82c5ec1c1ba93cf7671642400074201e">◆ </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">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> push </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::unique_ptr< <a class="el" href="classtvg_1_1Paint.html">Paint</a> > </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">virtual</span><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_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</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 canvas will be drawing targets. They are retained by the canvas until you call <a class="el" href="classtvg_1_1Canvas.html#a99cdb01cd893f4199b521b754d21aefd" title="Sets the total number of the paints pushed into the canvas to be zero. Depending on the value of the ...">Canvas::clear()</a>. If you know the number of the pushed objects in advance, please call <a class="el" href="classtvg_1_1Canvas.html#a4cff0ab757e1db9077bbecaf25f012ba" title="Sets the size of the container, where all the paints pushed into the Canvas are stored.">Canvas::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="retval"><dt>Return values</dt><dd>
|
|
<table class="retval">
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a505a83f220c02df2f85c3810cd9ceb38" title="The value returned in case of a correct request execution.">Result::Success</a></td><td>When succeed. </td></tr>
|
|
<tr><td class="paramname"><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></td><td>In case a <code>nullptr</code> is passed as the argument. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a></td><td>An internal error.</td></tr>
|
|
</table>
|
|
</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 into the canvas. 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_1Canvas.html#a4cff0ab757e1db9077bbecaf25f012ba" title="Sets the size of the container, where all the paints pushed into the Canvas are stored.">Canvas::reserve()</a> </dd>
|
|
<dd>
|
|
<a class="el" href="classtvg_1_1Canvas.html#a99cdb01cd893f4199b521b754d21aefd" title="Sets the total number of the paints pushed into the canvas to be zero. Depending on the value of the ...">Canvas::clear()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4cff0ab757e1db9077bbecaf25f012ba"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4cff0ab757e1db9077bbecaf25f012ba">◆ </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 </td>
|
|
<td class="paramname"><em>n</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_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> are stored. </p>
|
|
<p>If the number of objects pushed into the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> 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">n</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>
|
|
<a id="adbca600af79f9a0b8e8366e3be7450e9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adbca600af79f9a0b8e8366e3be7450e9">◆ </a></span>sync()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> sync </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Guarantees that drawing task is finished. </p>
|
|
<p>The <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> rendering can be performed asynchronously. To make sure that rendering is finished, the <a class="el" href="classtvg_1_1Canvas.html#adbca600af79f9a0b8e8366e3be7450e9" title="Guarantees that drawing task is finished.">sync()</a> must be called after the <a class="el" href="classtvg_1_1Canvas.html#aabf9e5a14da3b4bfd5883c2b4459abd0" title="Requests the canvas to draw the Paint objects.">draw()</a> regardless of threading.</p>
|
|
<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#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Canvas.html#aabf9e5a14da3b4bfd5883c2b4459abd0" title="Requests the canvas to draw the Paint objects.">Canvas::draw()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a89ac8a85a8c22723af9fb07c098472b3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a89ac8a85a8c22723af9fb07c098472b3">◆ </a></span>update()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="group__ThorVG.html#ga28287671eaf7406afd604bd055ba4066">Result</a> update </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classtvg_1_1Paint.html">Paint</a> * </td>
|
|
<td class="paramname"><em>paint</em> = <code>nullptr</code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Request the canvas to update the paint objects. </p>
|
|
<p>If a <code>nullptr</code> is passed all paint objects retained by the <a class="el" href="classtvg_1_1Canvas.html" title="An abstract class for drawing graphical elements.">Canvas</a> are updated, otherwise only the paint to which the given <code>paint</code> points.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">paint</td><td>A pointer to the <a class="el" href="classtvg_1_1Paint.html" title="An abstract class for managing graphical elements.">Paint</a> object or <code>nullptr</code>.</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#gga28287671eaf7406afd604bd055ba4066a119732ff568bf103d744e930ae2404f1" title="The value returned in case the request cannot be processed - e.g. asking for properties of an object,...">Result::InsufficientCondition</a> otherwise.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The Update behavior can be asynchronous if the assigned thread number is greater than zero. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|