Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / rendering / XAnimation.idl
blob0d92dc5b41fc168c34baa3bf996809bdb3010375
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_rendering_XAnimation_idl__
20 #define __com_sun_star_rendering_XAnimation_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/lang/IllegalArgumentException.idl>
24 #include <com/sun/star/rendering/ViewState.idl>
25 #include <com/sun/star/rendering/AnimationAttributes.idl>
26 #include <com/sun/star/rendering/XCanvas.idl>
29 module com { module sun { module star { module rendering {
31 /* TODO: Have a property set here, to easily extend attributes? Think
32 that's advisable, because animations change the most. Implement
33 that with multiple inheritance interface types, please, not with
34 service description.
37 /** This interface defines an animation sequence.<p>
39 This interface must be implemented by every animation object. It
40 is used by the XCanvas interface to render generic
41 animations.<p>
43 @since OOo 2.0
45 interface XAnimation : ::com::sun::star::uno::XInterface
47 /** Render the animation content at time t into the specified
48 canvas.<p>
50 Note that it is perfectly legal to e.g. map t in a nonlinear
51 fashion to internal frames, for example to achieve
52 acceleration or deceleration effects. It is required that the
53 render method has const semantics, i.e. when called with the
54 same parameter set, identical output must be generated. This
55 is because e.g. a Sprite might decide arbitrarily to render an
56 animation once and cache the result, or repaint it via
57 XAnimation::render every time.<p>
59 The rendered content, although, must be exactly the same for
60 identical viewState, canvas and t values. Or, for that
61 matters, must call the same canvas methods in the same order
62 with the same parameter sets, for identical viewState and t
63 values. Furthermore, when viewState has the identity
64 transformation set, rendered output must be contained in a
65 rectangle with upper left corner at (0,0) and width and height
66 given by the AnimationAttributes' untransformedSize
67 member. Any content exceeding this box might get clipped off.<p>
69 @param canvas
70 The target canvas to render this animation to.
72 @param viewState
73 The view state to be used when rendering this animation to the
74 target canvas. The view transformation matrix must not be
75 singular.
77 @param t
78 Time instant for which animation content is requested. The
79 range must always be [0,1], where 0 denotes the very beginning, and
80 1 the end of the animation sequence.
82 @throws com::sun::star::lang::IllegalArgumentException
83 if one of the passed parameters does not lie in the specified,
84 permissible range.
86 void render( [in] XCanvas canvas, [in] ViewState viewState, [in] double t )
87 raises (com::sun::star::lang::IllegalArgumentException);
90 /** Request the attribute information for this animation.<p>
92 This method returns the AnimationAttributes
93 structure, which defines more closely how to play this
94 animation.<p>
96 @returns the requested AnimationAttributes
97 structure.
99 AnimationAttributes getAnimationAttributes();
102 }; }; }; };
104 #endif
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */