<html> <head> <title>Interface XAnimatedSprite</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XAnimatedSprite-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">rendering</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">interface XAnimatedSprite</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td><dl> <dt><b>Base Interfaces</b></dt> <dd><pre style="font-family:monospace;"><strong>XAnimatedSprite</strong> ┗ <a href="XSprite.html">XSprite</a> </pre></dd> <dd><a name/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="crosstitle"> <tr> <td class="imsum_left"><a href="XSprite.html">XSprite</a></td> <td class="imsum_right"><dl> <dt>(referenced interface's summary:)</dt> <dd>Interface to control a sprite object.</dd> </dl> </td> </tr> </table> </dd> </dl> </td> </tr> <tr> <td><dl> <dt><b>Usage Restrictions</b></dt> <dd><i>not published</i></dd> <dt><b>Description</b></dt> <dd>This interface can be used to control an animated sprite object.</dd> <dd><p> This interface can be used to control an animated sprite object on an XSpriteCanvas. Sprites are moving, animated objects.<p> </dd> <dt><b>Since </b></dt> <dd>OpenOffice 2.0</dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#startAnimation">startAnimation</a></td> <td class="imsum_right">Start animation sequence of this sprite. </td> </tr> <tr> <td class="imsum_left"><a href="#stopAnimation">stopAnimation</a></td> <td class="imsum_right">Stop the animation sequence. </td> </tr> <tr> <td class="imsum_left"><a href="#resetAnimation">resetAnimation</a></td> <td class="imsum_right">Reset the animation sequence to start with the first frame. </td> </tr> <tr> <td class="imsum_left"><a href="#updateAnimation">updateAnimation</a></td> <td class="imsum_right">Issue an additional render call to this sprite's animation. </td> </tr> <tr> <td class="imsum_left"><a href="#setViewState">setViewState</a></td> <td class="imsum_right">Changes the view state in place for this sprite's animation. </td> </tr> <tr> <td class="imsum_left"><a href="#setAll">setAll</a></td> <td class="imsum_right">Changes all of the sprite's attributes at one atomic instance. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="startAnimation" class="membertitle">startAnimation</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>startAnimation</b>(</td> <td valign="top">[in] double</td> <td valign="bottom"> nSpeed );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Start animation sequence of this sprite.</dd> <dd><p> The speed of the animation is given in cycles per second (where a cycle is defined as one full animation run, i.e. the full [0,1] range of the <a href="XAnimation.html">XAnimation</a>::<a href="XAnimation.html#render">render</a>'s t parameter, or a full sequence of sprite bitmaps drawn). Once an animation is running, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> handles screen updates automatically. That means, changes to position or alpha are reflected on screen automatically. Please note further that sprite visibility and animation are unrelated, i.e. a hidden sprite can have a running animation, which then displays in the middle of the animation sequence, when a show() is called later on.<p> </dd> <dt><b>Parameter nSpeed</b></dt> <dd>The speed of the animation in cycles per second (where a cycle is defined as one full animation run, i.e. the full [0,1] range of the <a href="XAnimation.html">XAnimation</a>::<a href="XAnimation.html#render">render</a>'s t parameter, or a full sequence of sprite bitmaps drawn). </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="stopAnimation" class="membertitle">stopAnimation</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>stopAnimation</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Stop the animation sequence.</dd> <dd><p> A subsequent <a href="XAnimatedSprite.html">XAnimatedSprite</a>::<a href="XAnimatedSprite.html#startAnimation">startAnimation</a> will commence the sequence at the point where it was stopped with here. Once an animation is stopped, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> does not update changed sprites anymore.<p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="resetAnimation" class="membertitle">resetAnimation</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>resetAnimation</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Reset the animation sequence to start with the first frame.</dd> <dd><p> If the animation is currently running, the next frame that is drawn after this method has finished, will be the first one. Please note that if an animation is not started, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> does not update changed sprites automatically.<p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="updateAnimation" class="membertitle">updateAnimation</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>updateAnimation</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Issue an additional render call to this sprite's animation.</dd> <dd><p> This method has no effect when called for a bitmap-sequence sprite. Please note that if an animation is not started, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> does not update changed sprites automatically, but has to be told to do so via <a href="XSpriteCanvas.html">XSpriteCanvas</a>::<a href="XSpriteCanvas.html#updateScreen">updateScreen()</a>.<p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setViewState" class="membertitle">setViewState</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>setViewState</b>(</td> <td valign="top">[in] <a href="ViewState.html">ViewState</a></td> <td valign="bottom"> aViewState )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Changes the view state in place for this sprite's animation.</dd> <dd><p> The state given here is used when calling the <a href="XAnimation.html">XAnimation</a>::<a href="XAnimation.html#render">render()</a> method, or when drawing the sprite's bitmaps, respectively. There's no need to call <a href="XSpriteCanvas.html">XSpriteCanvas</a>::<a href="XSpriteCanvas.html#updateAnimation">updateAnimation()</a> after this method, as it automatically rerenders, if necessary. Please note that if an animation is not started, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> does not update changed sprites automatically, but has to be told to do so via <a href="XSpriteCanvas.html">XSpriteCanvas</a>::<a href="XSpriteCanvas.html#updateScreen">updateScreen()</a>.<p> </dd> <dt><b>Parameter aViewState</b></dt> <dd>The state given here is used when calling the <a href="XAnimation.html">XAnimation</a>::<a href="XAnimation.html#render">render()</a> method, or when drawing the sprite's bitmaps, respectively. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::lang::IllegalArgumentException if the view transformation matrix is singular. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setAll" class="membertitle">setAll</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>setAll</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../geometry/module-ix.html">geometry</a>::<a href="../geometry/RealPoint2D.html">RealPoint2D</a></td> <td valign="bottom"> aNewPos,</td> </tr> <tr> <td/><td valign="top">[in] <a href="ViewState.html">ViewState</a></td> <td valign="bottom"> aViewState,</td> </tr> <tr> <td/><td valign="top">[in] <a href="RenderState.html">RenderState</a></td> <td valign="bottom"> aRenderState,</td> </tr> <tr> <td/><td valign="top">[in] double</td> <td valign="bottom"> nAlpha,</td> </tr> <tr> <td/><td valign="top">[in] boolean</td> <td valign="bottom"> bUpdateAnimation )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Changes all of the sprite's attributes at one atomic instance.</dd> <dd><p> This is useful at times where one does not want multiple redraws for every state change.<p> Please note that if an animation is not started, the associated <a href="XSpriteCanvas.html">XSpriteCanvas</a> does not update changed sprites automatically, but has to be told to do so via <a href="XSpriteCanvas.html">XSpriteCanvas</a>::<a href="XSpriteCanvas.html#updateScreen">updateScreen()</a>.<p> </dd> <dt><b>Parameter aNewPos</b></dt> <dd>New left,top output position of the sprite. This position gets transformed by the view and render state. </dd> <dt><b>Parameter aViewState</b></dt> <dd>New view state of the sprite, and part of the transformation that is applied to aNewPos. The view transformation matrix must not be singular. </dd> <dt><b>Parameter aRenderState</b></dt> <dd>New render state of the sprite, and part of the transformation that is applied to aNewPos. The render transformation matrix must not be singular. </dd> <dt><b>Parameter nAlpha</b></dt> <dd>New alpha value of the sprite. This value must be within the [0,1] range. </dd> <dt><b>Parameter bUpdateAnimation</b></dt> <dd>Whether this method should implicitely call <a href="XSpriteCanvas.html">XSpriteCanvas</a>::<a href="XSpriteCanvas.html#updateAnimation">updateAnimation</a> or not. </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::lang::IllegalArgumentException if one of the passed parameters does not lie in the specified, permissible range. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>