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