1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_rendering_XAnimation_idl__ 28#define __com_sun_star_rendering_XAnimation_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 34#include <com/sun/star/lang/IllegalArgumentException.idl> 35#endif 36#ifndef __com_sun_star_rendering_ViewState_idl__ 37#include <com/sun/star/rendering/ViewState.idl> 38#endif 39#ifndef __com_sun_star_rendering_AnimationAttributes_idl__ 40#include <com/sun/star/rendering/AnimationAttributes.idl> 41#endif 42#ifndef __com_sun_star_rendering_XCanvas_idl__ 43#include <com/sun/star/rendering/XCanvas.idl> 44#endif 45 46 47module com { module sun { module star { module rendering { 48 49/* TODO: Have a property set here, to easily extend attributes? Think 50 that's advisable, because animations change the most. Implement 51 that with multiple inheritance interface types, please, not with 52 service description. 53*/ 54 55/** This interface defines an animation sequence.<p> 56 57 This interface must be implemented by every animation object. It 58 is used by the <type>XCanvas</type> interface to render generic 59 animations.<p> 60 61 @since OOo 2.0 62 */ 63published interface XAnimation : ::com::sun::star::uno::XInterface 64{ 65 /** Render the animation content at time t into the specified 66 canvas.<p> 67 68 Note that it is perfectly legal to e.g. map t in a nonlinear 69 fashion to internal frames, for example to achieve 70 acceleration or decceleration effects. It is required that the 71 render method has const semantics, i.e. when called with the 72 same parameter set, identical output must be generated. This 73 is because e.g. a Sprite might decide arbitrarily to render an 74 animation once and cache the result, or repaint it via 75 XAnimation::render everytime.<p> 76 77 The rendered content, although, must be exactly the same for 78 identical viewState, canvas and t values. Or, for that 79 matters, must call the same canvas methods in the same order 80 with the same parameter sets, for identical viewState and t 81 values. Furthermore, when viewState has the identity 82 transformation set, rendered output must be contained in a 83 rectangle with upper left corner at (0,0) and width and height 84 given by the AnimationAttributes' untransformedSize 85 member. Any content exceeding this box might get clipped off.<p> 86 87 @param canvas 88 The target canvas to render this animation to. 89 90 @param viewState 91 The view state to be used when rendering this animation to the 92 target canvas. The view transformation matrix must not be 93 singular. 94 95 @param t 96 Time instant for which animation content is requested. The 97 range must always be [0,1], where 0 denotes the very beginning, and 98 1 the end of the animation sequence. 99 100 @throws <type>com::sun::star::lang::IllegalArgumentException</type> 101 if one of the passed parameters does not lie in the specified, 102 permissible range. 103 */ 104 void render( [in] XCanvas canvas, [in] ViewState viewState, [in] double t ) 105 raises (com::sun::star::lang::IllegalArgumentException); 106 107 //------------------------------------------------------------------------- 108 109 /** Request the attribute information for this animation.<p> 110 111 This method returns the <type>AnimationAttributes</type> 112 structure, which defines more closely how to play this 113 animation.<p> 114 115 @returns the requested <type>AnimationAttributes</type> 116 structure. 117 */ 118 AnimationAttributes getAnimationAttributes(); 119}; 120 121}; }; }; }; 122 123#endif 124