mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
447 lines
26 KiB
HTML
447 lines
26 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
|
|
 <span id="projectnumber">v0.15</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&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&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&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> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<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:a974f03b024a8beed5c8bfe32b56ac2c9"><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_1Animation.html#a974f03b024a8beed5c8bfe32b56ac2c9">frame</a> (float no) noexcept</td></tr>
|
|
<tr class="memdesc:a974f03b024a8beed5c8bfe32b56ac2c9"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the current frame in the animation. <a href="classtvg_1_1Animation.html#a974f03b024a8beed5c8bfe32b56ac2c9">More...</a><br /></td></tr>
|
|
<tr class="separator:a974f03b024a8beed5c8bfe32b56ac2c9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a004ba625c58005c931b244fb2515624f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classtvg_1_1Picture.html">Picture</a> * </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"> </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"> </td></tr>
|
|
<tr class="memitem:a45585afc7e6dbab9fb2d5295b67c45ee"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a45585afc7e6dbab9fb2d5295b67c45ee">curFrame</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a45585afc7e6dbab9fb2d5295b67c45ee"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the current frame number of the animation. <a href="classtvg_1_1Animation.html#a45585afc7e6dbab9fb2d5295b67c45ee">More...</a><br /></td></tr>
|
|
<tr class="separator:a45585afc7e6dbab9fb2d5295b67c45ee"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a624e4fdeebf70f286188685e769125f3"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classtvg_1_1Animation.html#a624e4fdeebf70f286188685e769125f3">totalFrame</a> () const noexcept</td></tr>
|
|
<tr class="memdesc:a624e4fdeebf70f286188685e769125f3"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the total number of frames in the animation. <a href="classtvg_1_1Animation.html#a624e4fdeebf70f286188685e769125f3">More...</a><br /></td></tr>
|
|
<tr class="separator:a624e4fdeebf70f286188685e769125f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a90ab38b7a2cb72d6b9de4492ff3e6679"><td class="memItemLeft" align="right" valign="top">float </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"> </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"> </td></tr>
|
|
<tr class="memitem:aa05e5a4df917f934ba9b6233d39b4051"><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_1Animation.html#aa05e5a4df917f934ba9b6233d39b4051">segment</a> (float begin, float end) noexcept</td></tr>
|
|
<tr class="memdesc:aa05e5a4df917f934ba9b6233d39b4051"><td class="mdescLeft"> </td><td class="mdescRight">Specifies the playback segment of the animation. <a href="classtvg_1_1Animation.html#aa05e5a4df917f934ba9b6233d39b4051">More...</a><br /></td></tr>
|
|
<tr class="separator:aa05e5a4df917f934ba9b6233d39b4051"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa972943b6a0d53d9868dcf70915ec0cb"><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_1Animation.html#aa972943b6a0d53d9868dcf70915ec0cb">segment</a> (float *begin, float *end=nullptr) noexcept</td></tr>
|
|
<tr class="memdesc:aa972943b6a0d53d9868dcf70915ec0cb"><td class="mdescLeft"> </td><td class="mdescRight">Gets the current segment. <a href="classtvg_1_1Animation.html#aa972943b6a0d53d9868dcf70915ec0cb">More...</a><br /></td></tr>
|
|
<tr class="separator:aa972943b6a0d53d9868dcf70915ec0cb"><td class="memSeparator" colspan="2"> </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< <a class="el" href="classtvg_1_1Animation.html">Animation</a> > </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"> </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"> </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>
|
|
<dl class="section since"><dt>Since</dt><dd>0.13 </dd></dl>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a45585afc7e6dbab9fb2d5295b67c45ee"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a45585afc7e6dbab9fb2d5295b67c45ee">◆ </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">float 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#a624e4fdeebf70f286188685e769125f3" 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#a974f03b024a8beed5c8bfe32b56ac2c9" title="Specifies the current frame in the animation.">Animation::frame(float no)</a> </dd>
|
|
<dd>
|
|
<a class="el" href="classtvg_1_1Animation.html#a624e4fdeebf70f286188685e769125f3" title="Retrieves the total number of frames in the animation.">Animation::totalFrame()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a90ab38b7a2cb72d6b9de4492ff3e6679"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a90ab38b7a2cb72d6b9de4492ff3e6679">◆ </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>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a974f03b024a8beed5c8bfe32b56ac2c9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a974f03b024a8beed5c8bfe32b56ac2c9">◆ </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">float </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#a624e4fdeebf70f286188685e769125f3" 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#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>if the given <code>no</code> is the same as the current frame value. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported engine features(options).">Result::NonSupport</a></td><td>The current <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 note"><dt>Note</dt><dd>For efficiency, ThorVG ignores updates to the new frame value if the difference from the current frame value is less than 0.001. In such cases, it returns <code><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></code>. Values less than 0.001 may be disregarded and may not be accurately retained by the <a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a>.</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classtvg_1_1Animation.html#a624e4fdeebf70f286188685e769125f3" title="Retrieves the total number of frames in the animation.">totalFrame()</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9f1d09061273b58fff49740abdeb1ddf"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9f1d09061273b58fff49740abdeb1ddf">◆ </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<<a class="el" href="classtvg_1_1Animation.html">Animation</a>> 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>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a004ba625c58005c931b244fb2515624f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a004ba625c58005c931b244fb2515624f">◆ </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>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa972943b6a0d53d9868dcf70915ec0cb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa972943b6a0d53d9868dcf70915ec0cb">◆ </a></span>segment() <span class="overload">[1/2]</span></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> segment </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float * </td>
|
|
<td class="paramname"><em>begin</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float * </td>
|
|
<td class="paramname"><em>end</em> = <code>nullptr</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</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>Gets the current segment. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">begin</td><td>segment start. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">end</td><td>segment end.</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#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>In case the animation is not loaded. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported engine features(options).">Result::NonSupport</a></td><td>When it's not animatable.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>Experimental API </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa05e5a4df917f934ba9b6233d39b4051"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa05e5a4df917f934ba9b6233d39b4051">◆ </a></span>segment() <span class="overload">[2/2]</span></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> segment </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>begin</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>end</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</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 playback segment of the animation. </p>
|
|
<p>The set segment is designated as the play area of the animation. This is useful for playing a specific segment within the entire animation. After setting, the number of animation frames and the playback time are calculated by mapping the playback segment as the entire range.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">begin</td><td>segment start. </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">end</td><td>segment end.</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#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>In case the animation is not loaded. </td></tr>
|
|
<tr><td class="paramname"><a class="el" href="group__ThorVG.html#gga28287671eaf7406afd604bd055ba4066aa0cfd518e4385f31d38720579321ed29" title="The value returned in case of choosing unsupported engine features(options).">Result::NonSupport</a></td><td>When it's not animatable.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classtvg_1_1Animation.html" title="The Animation class enables manipulation of animatable images.">Animation</a> allows a range from 0.0 to 1.0. <code>end</code> should not be higher than <code>begin</code>. </dd>
|
|
<dd>
|
|
If a marker has been specified, its range will be disregarded. </dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>LottieAnimation::segment(const char* marker)</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>Experimental API </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a624e4fdeebf70f286188685e769125f3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a624e4fdeebf70f286188685e769125f3">◆ </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">float 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>
|
|
|
|
</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>
|