thorvg/docs/html/classtvg_1_1Animation.html
2023-07-29 14:24:37 +09:00

336 lines
19 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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ThorVG: Animation</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>
<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" />
</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.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ThorVG
&#160;<span id="projectnumber">v0.10</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @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&amp;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>
</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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classtvg_1_1Animation.html',''); initResizable(); });
/* @license-end */
</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_1Animation-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Animation<div class="ingroups"><a class="el" href="group__ThorVG.html">ThorVG</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>The <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> class enables manipulation of animatable images.
<a href="classtvg_1_1Animation.html#details">More...</a></p>
<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:ac13e2b8f811686e95f3f22c08ac75f8a"><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_1Animation.html#ac13e2b8f811686e95f3f22c08ac75f8a">frame</a> (uint32_t no) noexcept</td></tr>
<tr class="memdesc:ac13e2b8f811686e95f3f22c08ac75f8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the current frame in the animation. <a href="classtvg_1_1Animation.html#ac13e2b8f811686e95f3f22c08ac75f8a">More...</a><br /></td></tr>
<tr class="separator:ac13e2b8f811686e95f3f22c08ac75f8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004ba625c58005c931b244fb2515624f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtvg_1_1Picture.html">Picture</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a004ba625c58005c931b244fb2515624f">picture</a> () const noexcept</td></tr>
<tr class="memdesc:a004ba625c58005c931b244fb2515624f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves a picture instance associated with this animation instance. <a href="classtvg_1_1Animation.html#a004ba625c58005c931b244fb2515624f">More...</a><br /></td></tr>
<tr class="separator:a004ba625c58005c931b244fb2515624f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e791c8144b0ad30d25f06c042496d27"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a0e791c8144b0ad30d25f06c042496d27">curFrame</a> () const noexcept</td></tr>
<tr class="memdesc:a0e791c8144b0ad30d25f06c042496d27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the current frame number of the animation. <a href="classtvg_1_1Animation.html#a0e791c8144b0ad30d25f06c042496d27">More...</a><br /></td></tr>
<tr class="separator:a0e791c8144b0ad30d25f06c042496d27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91d83102afb1ec5c65f009240b29250c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c">totalFrame</a> () const noexcept</td></tr>
<tr class="memdesc:a91d83102afb1ec5c65f009240b29250c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the total number of frames in the animation. <a href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c">More...</a><br /></td></tr>
<tr class="separator:a91d83102afb1ec5c65f009240b29250c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90ab38b7a2cb72d6b9de4492ff3e6679"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a90ab38b7a2cb72d6b9de4492ff3e6679">duration</a> () const noexcept</td></tr>
<tr class="memdesc:a90ab38b7a2cb72d6b9de4492ff3e6679"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the duration of the animation in seconds. <a href="classtvg_1_1Animation.html#a90ab38b7a2cb72d6b9de4492ff3e6679">More...</a><br /></td></tr>
<tr class="separator:a90ab38b7a2cb72d6b9de4492ff3e6679"><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:a9f1d09061273b58fff49740abdeb1ddf"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="classtvg_1_1Animation.html">Animation</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a9f1d09061273b58fff49740abdeb1ddf">gen</a> () noexcept</td></tr>
<tr class="memdesc:a9f1d09061273b58fff49740abdeb1ddf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> object. <a href="classtvg_1_1Animation.html#a9f1d09061273b58fff49740abdeb1ddf">More...</a><br /></td></tr>
<tr class="separator:a9f1d09061273b58fff49740abdeb1ddf"><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>The <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> class enables manipulation of animatable images. </p>
<p>This class supports the display and control of animation frames.</p>
<p>@BETA_API </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0e791c8144b0ad30d25f06c042496d27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e791c8144b0ad30d25f06c042496d27">&#9670;&nbsp;</a></span>curFrame()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint32_t curFrame </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Retrieves the current frame number of the animation. </p>
<dl class="section return"><dt>Returns</dt><dd>The current frame number of the animation, between 0 and <a class="el" href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c" title="Retrieves the total number of frames in the animation.">totalFrame()</a> - 1.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> is not properly configured, this function will return 0.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Animation.html#ac13e2b8f811686e95f3f22c08ac75f8a" title="Specifies the current frame in the animation.">Animation::frame(uint32_t no)</a> </dd>
<dd>
<a class="el" href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c" title="Retrieves the total number of frames in the animation.">Animation::totalFrame()</a></dd></dl>
<p>@BETA_API </p>
</div>
</div>
<a id="a90ab38b7a2cb72d6b9de4492ff3e6679"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90ab38b7a2cb72d6b9de4492ff3e6679">&#9670;&nbsp;</a></span>duration()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float duration </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Retrieves the duration of the animation in seconds. </p>
<dl class="section return"><dt>Returns</dt><dd>The duration of the animation in seconds.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> is not properly configured, this function will return 0.</dd></dl>
<p>@BETA_API </p>
</div>
</div>
<a id="ac13e2b8f811686e95f3f22c08ac75f8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac13e2b8f811686e95f3f22c08ac75f8a">&#9670;&nbsp;</a></span>frame()</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> frame </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>no</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>Specifies the current frame in the animation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">no</td><td>The index of the animation frame to be displayed. The index should be less than the <a class="el" href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c" title="Retrieves the total number of frames in the animation.">totalFrame()</a>.</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>Successfully set the frame. </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>No animatable data loaded from the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a>. </td></tr>
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported options.">Result::NonSupport</a></td><td>The <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> data does not support animations.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Animation.html#a91d83102afb1ec5c65f009240b29250c" title="Retrieves the total number of frames in the animation.">totalFrame()</a></dd></dl>
<p>@BETA_API </p>
</div>
</div>
<a id="a9f1d09061273b58fff49740abdeb1ddf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f1d09061273b58fff49740abdeb1ddf">&#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_1Animation.html">Animation</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_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> object. </p>
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> object.</dd></dl>
<p>@BETA_API </p>
</div>
</div>
<a id="a004ba625c58005c931b244fb2515624f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a004ba625c58005c931b244fb2515624f">&#9670;&nbsp;</a></span>picture()</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="classtvg_1_1Picture.html">Picture</a>* picture </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Retrieves a picture instance associated with this animation instance. </p>
<p>This function provides access to the picture instance that can be used to load animation formats, such as Lottie(json). After setting up the picture, it can be pushed to the designated canvas, enabling control over animation frames with this <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> instance.</p>
<dl class="section return"><dt>Returns</dt><dd>A picture instance that is tied to this animation.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The picture instance is owned by <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a>. It should not be deleted manually.</dd></dl>
<p>@BETA_API </p>
</div>
</div>
<a id="a91d83102afb1ec5c65f009240b29250c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91d83102afb1ec5c65f009240b29250c">&#9670;&nbsp;</a></span>totalFrame()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint32_t totalFrame </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</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>Retrieves the total number of frames in the animation. </p>
<dl class="section return"><dt>Returns</dt><dd>The total number of frames in the animation.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Frame numbering starts from 0. </dd>
<dd>
If the <a class="el" href="classtvg_1_1Picture.html" title="A class representing an image read in one of the supported formats: raw, svg, png,...">Picture</a> is not properly configured, this function will return 0.</dd></dl>
<p>@BETA_API </p>
</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_1Animation.html">Animation</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>