1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_rendering_XAnimation_idl__
28 #define __com_sun_star_rendering_XAnimation_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
36 #ifndef __com_sun_star_rendering_ViewState_idl__
37 #include
<com
/sun
/star
/rendering
/ViewState.idl
>
39 #ifndef __com_sun_star_rendering_AnimationAttributes_idl__
40 #include
<com
/sun
/star
/rendering
/AnimationAttributes.idl
>
42 #ifndef __com_sun_star_rendering_XCanvas_idl__
43 #include
<com
/sun
/star
/rendering
/XCanvas.idl
>
47 module com
{ module sun
{ module star
{ module rendering
{
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
55 /** This interface defines an animation sequence.<p>
57 This interface must be implemented by every animation object. It
58 is used by the <type>XCanvas</type> interface to render generic
63 interface XAnimation
: ::com
::sun
::star
::uno
::XInterface
65 /** Render the animation content at time t into the specified
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>
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>
88 The target canvas to render this animation to.
91 The view state to be used when rendering this animation to the
92 target canvas. The view transformation matrix must not be
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.
100 @throws <type>com::sun::star::lang::IllegalArgumentException</type>
101 if one of the passed parameters does not lie in the specified,
104 void render
( [in] XCanvas canvas
, [in] ViewState viewState
, [in] double t
)
105 raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
107 //-------------------------------------------------------------------------
109 /** Request the attribute information for this animation.<p>
111 This method returns the <type>AnimationAttributes</type>
112 structure, which defines more closely how to play this
115 @returns the requested <type>AnimationAttributes</type>
118 AnimationAttributes getAnimationAttributes
();