blob: a83513a1b09a454115a3a8c60590d4909828fe8c [file] [log] [blame]
<!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"/>
<title>Skia: SkInterpolator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>SkInterpolator Class Reference</h1><!-- doxytag: class="SkInterpolator" --><!-- doxytag: inherits="SkInterpolatorBase" -->
<p><code>#include &lt;<a class="el" href="_sk_interpolator_8h_source.html">SkInterpolator.h</a>&gt;</code></p>
<p>Inherits <a class="el" href="class_sk_interpolator_base.html">SkInterpolatorBase</a>.</p>
<div class="dynheader">
Collaboration diagram for SkInterpolator:</div>
<div class="dynsection">
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="class_sk_interpolator-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="class_sk_interpolator_base.html">SkInterpolatorBase</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#aee8931908d122327bc8779f3e73dc1b1">INHERITED</a></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#a1973dffd76c1b92e146fdcb5dfe87742">SkInterpolator</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#a6866dc39d9530da8e9def1974cb6f43a">SkInterpolator</a> (int elemCount, int frameCount)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#a2537674ab287baf2351cc9db3e0245a7">reset</a> (int elemCount, int frameCount)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#aaaf2c2caffc9555cea82e6e6d92362e4">setKeyFrame</a> (int index, <a class="el" href="_sk_types_8h.html#ab716f95777751685ac107e3ab3a236c3">SkMSec</a> time, const <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> values[], const <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> blend[4]=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_sk_interpolator_base.html#a6229b1bc4fe2239246d00f93e1f18d14">Result</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#a6ed004901788ea8f6ba878ab092287a1">timeToValues</a> (<a class="el" href="_sk_types_8h.html#ab716f95777751685ac107e3ab3a236c3">SkMSec</a> time, <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a> values[]=NULL) const </td></tr>
<tr><td colspan="2"><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SkDEBUGCODE(static void <br class="typebreak"/>
UnitTest();) private <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sk_interpolator.html#acf8738a76bb98c1f5d85a366ed1c0d3d">fScalarsArray</a> )[10]</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Definition at line <a class="el" href="_sk_interpolator_8h_source.html#l00094">94</a> of file <a class="el" href="_sk_interpolator_8h_source.html">SkInterpolator.h</a>.</p>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="aee8931908d122327bc8779f3e73dc1b1"></a><!-- doxytag: member="SkInterpolator::INHERITED" ref="aee8931908d122327bc8779f3e73dc1b1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef <a class="el" href="class_sk_interpolator_base.html">SkInterpolatorBase</a> <a class="el" href="class_sk_interpolator_base.html">SkInterpolator::INHERITED</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_sk_interpolator_8h_source.html#l00129">129</a> of file <a class="el" href="_sk_interpolator_8h_source.html">SkInterpolator.h</a>.</p>
</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1973dffd76c1b92e146fdcb5dfe87742"></a><!-- doxytag: member="SkInterpolator::SkInterpolator" ref="a1973dffd76c1b92e146fdcb5dfe87742" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SkInterpolator::SkInterpolator </td>
<td>(</td>
<td class="paramname"></td>
<td>&nbsp;)&nbsp;</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a6866dc39d9530da8e9def1974cb6f43a"></a><!-- doxytag: member="SkInterpolator::SkInterpolator" ref="a6866dc39d9530da8e9def1974cb6f43a" args="(int elemCount, int frameCount)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SkInterpolator::SkInterpolator </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>elemCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>frameCount</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2537674ab287baf2351cc9db3e0245a7"></a><!-- doxytag: member="SkInterpolator::reset" ref="a2537674ab287baf2351cc9db3e0245a7" args="(int elemCount, int frameCount)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SkInterpolator::reset </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>elemCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>frameCount</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reimplemented from <a class="el" href="class_sk_interpolator_base.html#a1d5ca091fe5d42de2110e5b8488418f7">SkInterpolatorBase</a>.</p>
</div>
</div>
<a class="anchor" id="aaaf2c2caffc9555cea82e6e6d92362e4"></a><!-- doxytag: member="SkInterpolator::setKeyFrame" ref="aaaf2c2caffc9555cea82e6e6d92362e4" args="(int index, SkMSec time, const SkScalar values[], const SkScalar blend[4]=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool SkInterpolator::setKeyFrame </td>
<td>(</td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_sk_types_8h.html#ab716f95777751685ac107e3ab3a236c3">SkMSec</a>&nbsp;</td>
<td class="paramname"> <em>time</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>&nbsp;</td>
<td class="paramname"> <em>values</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>&nbsp;</td>
<td class="paramname"> <em>blend</em>[4] = <code>NULL</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Add or replace a key frame, copying the values[] data into the interpolator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>The index of this frame (frames must be ordered by time) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>time</em>&nbsp;</td><td>The millisecond time for this frame </td></tr>
<tr><td valign="top"></td><td valign="top"><em>values</em>&nbsp;</td><td>The array of values [elemCount] for this frame. The data is copied into the interpolator. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>blend</em>&nbsp;</td><td>A positive scalar specifying how to blend between this and the next key frame. [0...1) is a cubic lag/log/lag blend (slow to change at the beginning and end) 1 is a linear blend (default) </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a6ed004901788ea8f6ba878ab092287a1"></a><!-- doxytag: member="SkInterpolator::timeToValues" ref="a6ed004901788ea8f6ba878ab092287a1" args="(SkMSec time, SkScalar values[]=NULL) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_sk_interpolator_base.html#a6229b1bc4fe2239246d00f93e1f18d14">Result</a> SkInterpolator::timeToValues </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_sk_types_8h.html#ab716f95777751685ac107e3ab3a236c3">SkMSec</a>&nbsp;</td>
<td class="paramname"> <em>time</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>&nbsp;</td>
<td class="paramname"> <em>values</em>[] = <code>NULL</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Return the computed values given the specified time. Return whether those values are the result of pinning to either the first (kFreezeStart) or last (kFreezeEnd), or from interpolated the two nearest key values (kNormal). </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>time</em>&nbsp;</td><td>The time to sample (in milliseconds) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>(may</em>&nbsp;</td><td>be null) where to write the computed values. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="acf8738a76bb98c1f5d85a366ed1c0d3d"></a><!-- doxytag: member="SkInterpolator::fScalarsArray" ref="acf8738a76bb98c1f5d85a366ed1c0d3d" args=")[10]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SkDEBUGCODE (static void UnitTest();) private <a class="el" href="_sk_scalar_8h.html#a407e363d56d824ed93bd6d1fda2effcf">SkScalar</a>(* <a class="el" href="class_sk_interpolator.html#acf8738a76bb98c1f5d85a366ed1c0d3d">SkInterpolator::fScalarsArray</a>)[10]</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_sk_interpolator_8h_source.html#l00127">127</a> of file <a class="el" href="_sk_interpolator_8h_source.html">SkInterpolator.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Volumes/disk/skia/trunk/include/utils/<a class="el" href="_sk_interpolator_8h_source.html">SkInterpolator.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Oct 20 10:33:04 2009 for Skia by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>