|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: SVG Implementation header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _INC_CSVGANIMATETRANSFORMELEMENTIMPL_ |
|
20 #define _INC_CSVGANIMATETRANSFORMELEMENTIMPL_ |
|
21 |
|
22 #include "SVGAnimationBase.h" |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 /** |
|
28 * Class description goes here. |
|
29 * |
|
30 * @lib SVGEngine.lib |
|
31 * @since 1.0 |
|
32 */ |
|
33 class CSvgAnimateTransformElementImpl : public CSvgAnimationBase |
|
34 { |
|
35 public: |
|
36 |
|
37 // Constructor/deconstructor |
|
38 |
|
39 void SetMatrixDataSize(TUint8 aValue); |
|
40 TBool DoAnimProcL(MSvgEvent* aEvent); |
|
41 void SetAccumMatrix(); |
|
42 CGfxGeneralPath* GetPathAttribute(TInt aAttributeId); |
|
43 void SetPathAttribute(TInt aAttributeId, CGfxGeneralPath* aPathHandle); |
|
44 void Reset(MSvgEvent* aEvent); |
|
45 void SetAccumulateValuesForSetMediaTime(); |
|
46 void DeactivateAnimation(); |
|
47 /** |
|
48 |
|
49 * Need method description |
|
50 * |
|
51 * @since 1.0 |
|
52 * @param |
|
53 * @return |
|
54 */ |
|
55 static CSvgAnimateTransformElementImpl* NewL( const TUint8 aElemID, |
|
56 CSvgDocumentImpl* aDoc ); |
|
57 |
|
58 |
|
59 /** |
|
60 * Need method description |
|
61 * |
|
62 * @since 1.0 |
|
63 * @param |
|
64 * @return |
|
65 */ |
|
66 static CSvgAnimateTransformElementImpl* NewLC( const TUint8 aElemID, |
|
67 CSvgDocumentImpl* aDoc ); |
|
68 |
|
69 // Dom Reuse |
|
70 void ReInitializeAnimation(); |
|
71 |
|
72 void SetOriginalValues_DOMReuse(); |
|
73 |
|
74 |
|
75 protected: |
|
76 |
|
77 |
|
78 /** |
|
79 * Need method description |
|
80 * |
|
81 * @since 1.0 |
|
82 * @param |
|
83 * @return |
|
84 */ |
|
85 virtual void ConstructL( const TUint8 aElemID); |
|
86 |
|
87 |
|
88 public: |
|
89 |
|
90 /** |
|
91 * Need method description |
|
92 * |
|
93 * @since 1.0 |
|
94 * @param |
|
95 * @return |
|
96 */ |
|
97 virtual ~CSvgAnimateTransformElementImpl(); |
|
98 |
|
99 protected: |
|
100 |
|
101 |
|
102 |
|
103 /** |
|
104 * Need method description |
|
105 * |
|
106 * @since 1.0 |
|
107 * @param |
|
108 * @return |
|
109 */ |
|
110 CSvgAnimateTransformElementImpl( CSvgDocumentImpl* aDoc ); |
|
111 |
|
112 |
|
113 public: |
|
114 |
|
115 |
|
116 /** |
|
117 * Need method description |
|
118 * |
|
119 * @since 1.0 |
|
120 * @param |
|
121 * @return |
|
122 */ |
|
123 TInt SetAttributeIntL( const TInt aNameId, const TInt32 aValue); |
|
124 /** |
|
125 * Need method description |
|
126 * |
|
127 * @since 1.0 |
|
128 * @param |
|
129 * @return |
|
130 */ |
|
131 |
|
132 TInt GetAttributeIntL( const TInt aNameId, TInt32& aValue ); |
|
133 /** |
|
134 * Need method description |
|
135 * |
|
136 * @since 1.0 |
|
137 * @param |
|
138 * @return |
|
139 */ |
|
140 TInt SetAttributeFloatL(const TInt aNameId, TFloatFixPt aValue ); |
|
141 /** |
|
142 * Need method description |
|
143 * |
|
144 * @since 1.0 |
|
145 * @param |
|
146 * @return |
|
147 */ |
|
148 TInt GetAttributeFloat(const TInt aNameId, TFloatFixPt& aValue ); |
|
149 // From MXmlElement API |
|
150 /** |
|
151 * Need method description |
|
152 * |
|
153 * @since 1.0 |
|
154 * @param |
|
155 * @return |
|
156 */ |
|
157 virtual TInt SetAttributeL( const TDesC& aName, |
|
158 const TDesC& aValue ); |
|
159 |
|
160 // From MEventReceiver |
|
161 |
|
162 /** |
|
163 * Need method description |
|
164 * |
|
165 * @since 1.0 |
|
166 * @param |
|
167 * @return |
|
168 */ |
|
169 TBool ReceiveEventL( MSvgEvent* aEvent ); |
|
170 // From MEventReceiver |
|
171 |
|
172 /** |
|
173 * Need method description |
|
174 * |
|
175 * @since 1.0 |
|
176 * @param |
|
177 * @return |
|
178 */ |
|
179 void ResetReferenceElementL(); |
|
180 |
|
181 /** |
|
182 * Need method description |
|
183 * |
|
184 * @since 1.0 |
|
185 * @param |
|
186 * @return |
|
187 */ |
|
188 MXmlElement* CloneL(MXmlElement* aParentElement); |
|
189 |
|
190 /** |
|
191 * Need method description |
|
192 * |
|
193 * @since 1.0 |
|
194 * @param |
|
195 * @return |
|
196 */ |
|
197 void CopyL( CSvgAnimateTransformElementImpl* aDestElement ); |
|
198 |
|
199 public: |
|
200 class TMatrixData |
|
201 { |
|
202 public: |
|
203 TFloatFixPt iData[3]; |
|
204 }; |
|
205 |
|
206 TBool SetMatrixData( TInt aIndex, TMatrixData& aMatrix); |
|
207 void SetTransformValues(RArray<TMatrixData>*& aValues); |
|
208 // for DOM reusage |
|
209 |
|
210 void SetTransValues_DOMReuse(); |
|
211 |
|
212 void Print( TBool aIsEncodeOn ); |
|
213 |
|
214 protected: |
|
215 TGfxAffineTransform iFillMatrix; |
|
216 RArray<TMatrixData>*iTransformValues; |
|
217 RArray<TMatrixData>* iOrgTransformValues; |
|
218 TUint8 iMatrixDataSize; |
|
219 TGfxAffineTransform iEndMatrix; |
|
220 TMatrixData iAccumMatrixData; |
|
221 |
|
222 // DOM_Reuse |
|
223 TBool iMultipleRendering; |
|
224 |
|
225 |
|
226 protected: |
|
227 |
|
228 /** |
|
229 * Need method description |
|
230 * |
|
231 * @since 1.0 |
|
232 * @param |
|
233 * @return |
|
234 */ |
|
235 void DesToMatrixData( const TDesC& aDes, |
|
236 TMatrixData& aMatrixData ); |
|
237 |
|
238 |
|
239 /** |
|
240 * Need method description |
|
241 * |
|
242 * @since 1.0 |
|
243 * @param |
|
244 * @return |
|
245 */ |
|
246 virtual void InitAnimationL(); |
|
247 |
|
248 /** |
|
249 * Need method description |
|
250 * |
|
251 * @since 1.0 |
|
252 * @param |
|
253 * @return |
|
254 */ |
|
255 virtual void SetAccumulateValues(); |
|
256 |
|
257 protected: |
|
258 // From CSvgAnimationBase |
|
259 |
|
260 /** |
|
261 * Need method description |
|
262 * |
|
263 * @since 1.0 |
|
264 * @param |
|
265 * @return |
|
266 */ |
|
267 |
|
268 virtual TBool AnimProcL( MSvgTimerEvent* aEvent ); |
|
269 |
|
270 |
|
271 |
|
272 /** |
|
273 * Need method description |
|
274 * |
|
275 * @since 1.0 |
|
276 * @param |
|
277 * @return |
|
278 */ |
|
279 virtual void SetToOriginalL(); |
|
280 |
|
281 /** |
|
282 * Need method description |
|
283 * |
|
284 * @since 1.0 |
|
285 * @param |
|
286 * @return |
|
287 */ |
|
288 virtual void SetFillValueL(); |
|
289 |
|
290 /** |
|
291 * Need method description |
|
292 * |
|
293 * @since 1.0 |
|
294 * @param |
|
295 * @return |
|
296 */ |
|
297 virtual void ResetAnimationL(); |
|
298 |
|
299 /** |
|
300 * Need method description |
|
301 * |
|
302 * @since 1.0 |
|
303 * @param |
|
304 * @return |
|
305 */ |
|
306 virtual void SetToInitialValueL(); |
|
307 |
|
308 /** |
|
309 * Need method description |
|
310 * |
|
311 * @since 1.0 |
|
312 * @param |
|
313 * @return |
|
314 */ |
|
315 virtual void SetToEndValueL(); |
|
316 }; |
|
317 |
|
318 |
|
319 #endif /* _INC_CSvgAnimateTransformElementImpl_ */ |