|
1 /* |
|
2 * Copyright (c) 2002 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: Anim Data |
|
15 * |
|
16 */ |
|
17 |
|
18 // AknAnimData.CPP |
|
19 // |
|
20 // Copyright (c) 1997-1999 Symbian Ltd. All rights reserved. |
|
21 // |
|
22 |
|
23 // Animation Data class |
|
24 |
|
25 |
|
26 #include "aknanimdata.h" |
|
27 #include "aknanim.hrh" |
|
28 #include "AknPanic.h" |
|
29 #include <barsread.h> |
|
30 #include <eikenv.h> |
|
31 |
|
32 |
|
33 const TInt KAnimStepGranularity=5; |
|
34 |
|
35 |
|
36 |
|
37 EXPORT_C CAknAnimationData::CAknAnimationData() |
|
38 :CArrayFixFlat<TAnimStep>(KAnimStepGranularity) |
|
39 { |
|
40 } |
|
41 |
|
42 EXPORT_C CAknAnimationData::~CAknAnimationData() |
|
43 { |
|
44 delete iDrawStepsPerAnimStep; |
|
45 delete iPendingSteps; |
|
46 } |
|
47 |
|
48 |
|
49 EXPORT_C void CAknAnimationData::ConstructL() |
|
50 { |
|
51 if (!iPendingSteps) |
|
52 { |
|
53 iPendingSteps = new(ELeave)CArrayFixFlat<TAnimMultiStep>(KAnimStepGranularity); |
|
54 } |
|
55 if (!iDrawStepsPerAnimStep) |
|
56 { |
|
57 iDrawStepsPerAnimStep = new(ELeave)CArrayFixFlat<TUint8>(KAnimStepGranularity); |
|
58 } |
|
59 } |
|
60 |
|
61 |
|
62 EXPORT_C void CAknAnimationData::ConstructFromResourceL(TInt aResourceId) |
|
63 { |
|
64 ConstructL(); |
|
65 TResourceReader reader; |
|
66 CEikonEnv::Static()->CreateResourceReaderLC(reader, aResourceId); |
|
67 |
|
68 iFlags = (TUint16)reader.ReadInt16(); |
|
69 iInterval = reader.ReadInt32(); |
|
70 TInt sections = reader.ReadInt16(); |
|
71 TResourceReader sectionReader; |
|
72 for (TInt sectionCount=0; sectionCount<sections; sectionCount++) |
|
73 { |
|
74 CEikonEnv::Static()->CreateResourceReaderLC(sectionReader, reader.ReadInt32()); |
|
75 TInt animSteps = sectionReader.ReadInt16(); |
|
76 for (TInt stepCount=0; stepCount<animSteps; stepCount++) |
|
77 { |
|
78 ReadAnimStepL(sectionReader); |
|
79 } |
|
80 CleanupStack::PopAndDestroy(); //sectionReader |
|
81 if (WaitBetweenSections()) |
|
82 { |
|
83 // Append a wait step between each loaded section |
|
84 TAnimStep drawStep; |
|
85 drawStep.SetType(EAnimWaitUntilComplete); |
|
86 AppendL(drawStep); |
|
87 iDrawStepsPerAnimStep->AppendL(1); |
|
88 } |
|
89 } |
|
90 if (WaitForeverAtEnd()) |
|
91 { |
|
92 // Append a wait-forever step at end of animation |
|
93 // (Wait-forever is set by a wait step with zero steps) |
|
94 TAnimStep drawStep; |
|
95 drawStep.SetType(EAnimWait); |
|
96 (drawStep.WaitStep())->iSteps = 0; |
|
97 AppendL(drawStep); |
|
98 iDrawStepsPerAnimStep->AppendL(1); |
|
99 } |
|
100 |
|
101 CleanupStack::PopAndDestroy(); //reader |
|
102 } |
|
103 |
|
104 void CAknAnimationData::ReadAnimStepL(TResourceReader& aReader) |
|
105 { |
|
106 TInt drawSteps = aReader.ReadInt16(); |
|
107 iDrawStepsPerAnimStep->AppendL((TUint8)drawSteps); |
|
108 for (TInt stepCount=0; stepCount<drawSteps; stepCount++) |
|
109 { |
|
110 TAnimStep drawStep; |
|
111 TUint8 type = (TUint8)aReader.ReadInt8(); |
|
112 drawStep.SetType(type); |
|
113 switch(type) |
|
114 { |
|
115 case EAnimBlitPreviousView: |
|
116 case EAnimBlitNewView: |
|
117 { |
|
118 TAnimBlitStep* step = drawStep.BlitStep(); |
|
119 step->iDestX = (TInt16)aReader.ReadInt16(); |
|
120 step->iDestY = (TInt16)aReader.ReadInt16(); |
|
121 } |
|
122 break; |
|
123 case EAnimBlitPartPreviousView: |
|
124 { |
|
125 TAnimBlitStep* step = drawStep.BlitStep(); |
|
126 step->iSrcX = (TInt16)aReader.ReadInt16(); |
|
127 step->iSrcY = (TInt16)aReader.ReadInt16(); |
|
128 step->iWidth = (TUint16)aReader.ReadInt16(); |
|
129 step->iHeight = (TUint16)aReader.ReadInt16(); |
|
130 step->iDestX = (TInt16)aReader.ReadInt16(); |
|
131 step->iDestY = (TInt16)aReader.ReadInt16(); |
|
132 } |
|
133 case EAnimBlitPartNewView: |
|
134 case EAnimRevealPartNewViewFromLeft: |
|
135 case EAnimRevealPartNewViewFromRight: |
|
136 case EAnimRevealPartNewViewFromTop: |
|
137 case EAnimRevealPartNewViewFromBottom: |
|
138 { |
|
139 TAnimBlitStep* step = drawStep.BlitStep(); |
|
140 step->iSteps = (TUint16)aReader.ReadInt16(); |
|
141 step->iSrcX = (TInt16)aReader.ReadInt16(); |
|
142 step->iSrcY = (TInt16)aReader.ReadInt16(); |
|
143 step->iWidth = (TUint16)aReader.ReadInt16(); |
|
144 step->iHeight = (TUint16)aReader.ReadInt16(); |
|
145 step->iDestX = (TInt16)aReader.ReadInt16(); |
|
146 step->iDestY = (TInt16)aReader.ReadInt16(); |
|
147 if (step->iDestX == -32760) step->iDestX = step->iSrcX; |
|
148 if (step->iDestY == -32760) step->iDestY = step->iSrcY; |
|
149 } |
|
150 break; |
|
151 case EAnimBlitSlideNewView: |
|
152 case EAnimBlitSlideNewViewClearBehind: |
|
153 { |
|
154 TAnimSlideStep* step = drawStep.SlideStep(); |
|
155 step->iSteps = (TUint16)aReader.ReadInt16(); |
|
156 step->iSrcX = (TInt16)aReader.ReadInt16(); |
|
157 step->iSrcY = (TInt16)aReader.ReadInt16(); |
|
158 step->iWidth = (TUint16)aReader.ReadInt16(); |
|
159 step->iHeight = (TUint16)aReader.ReadInt16(); |
|
160 step->iSlideToX = (TInt16)aReader.ReadInt16(); |
|
161 step->iSlideToY = (TInt16)aReader.ReadInt16(); |
|
162 step->iSlideFromX = (TInt16)aReader.ReadInt16(); |
|
163 step->iSlideFromY = (TInt16)aReader.ReadInt16(); |
|
164 } |
|
165 break; |
|
166 case EAnimWait: |
|
167 { |
|
168 TAnimWaitStep* step = drawStep.WaitStep(); |
|
169 step->iSteps = (TUint16)aReader.ReadInt16(); |
|
170 } |
|
171 break; |
|
172 case EAnimSetColor: |
|
173 { |
|
174 TAnimSetColorStep* step = drawStep.SetColorStep(); |
|
175 step->iRed = (TUint8)aReader.ReadUint8(); |
|
176 step->iGreen = (TUint8)aReader.ReadUint8(); |
|
177 step->iBlue = (TUint8)aReader.ReadUint8(); |
|
178 } |
|
179 break; |
|
180 case EAnimDrawLine: |
|
181 case EAnimDrawRect: |
|
182 case EAnimDrawFilledRect: |
|
183 { |
|
184 TAnimLineDrawStep* step = drawStep.LineDrawStep(); |
|
185 step->iSteps = (TUint16)aReader.ReadInt16(); |
|
186 step->iStartX = (TInt16)aReader.ReadInt16(); |
|
187 step->iStartY = (TInt16)aReader.ReadInt16(); |
|
188 step->iEndX = (TInt16)aReader.ReadInt16(); |
|
189 step->iEndY = (TInt16)aReader.ReadInt16(); |
|
190 } |
|
191 break; |
|
192 case EAnimWaitUntilComplete: |
|
193 // No parameters to be read |
|
194 break; |
|
195 default: |
|
196 ConstructUserAnimationStepL(drawStep, aReader); |
|
197 break; |
|
198 } |
|
199 AppendL(drawStep); |
|
200 } |
|
201 } |
|
202 |
|
203 EXPORT_C void CAknAnimationData::ConstructUserAnimationStepL(TAnimStep& /*aAnimStep*/, TResourceReader& /*aReader*/) |
|
204 { |
|
205 Panic(EAknPanicUnknownAnimationType); |
|
206 } |
|
207 |
|
208 |
|
209 |
|
210 EXPORT_C TBool CAknAnimationData::DrawUserAnimationStep(CBitmapContext& /*aGc*/, TAnimMultiStep& /*aAnimStep*/) |
|
211 { |
|
212 Panic(EAknPanicNoUserAnimation); |
|
213 return ETrue; |
|
214 } |
|
215 |
|
216 |
|
217 EXPORT_C void CAknAnimationData::SetScreenSize(TSize aSize) |
|
218 { |
|
219 iScreenSize = aSize; |
|
220 } |
|
221 |
|
222 EXPORT_C void CAknAnimationData::SetViewBitmap(CFbsBitmap* aViewBitmap) |
|
223 { |
|
224 iViewBitmap = aViewBitmap; |
|
225 } |
|
226 |
|
227 EXPORT_C void CAknAnimationData::SetOldBitmap(CFbsBitmap* aOldBitmap) |
|
228 { |
|
229 iOldBitmap = aOldBitmap; |
|
230 } |
|
231 |
|
232 |
|
233 EXPORT_C void CAknAnimationData::SetClearOldView() |
|
234 { |
|
235 iFlags |= EAnimClearScreen; |
|
236 } |
|
237 |
|
238 EXPORT_C TBool CAknAnimationData::ClearOldView() |
|
239 { |
|
240 return iFlags & EAnimClearScreen; |
|
241 } |
|
242 |
|
243 EXPORT_C TBool CAknAnimationData::WaitBetweenSections() |
|
244 { |
|
245 return iFlags & EAnimWaitBetweenSections; |
|
246 } |
|
247 |
|
248 |
|
249 EXPORT_C void CAknAnimationData::SetWaitForeverAtEnd() |
|
250 { |
|
251 iFlags |= EAnimClearScreen; |
|
252 } |
|
253 |
|
254 EXPORT_C TBool CAknAnimationData::WaitForeverAtEnd() |
|
255 { |
|
256 return iFlags & EAnimWaitForeverAtEnd; |
|
257 } |
|
258 |
|
259 EXPORT_C TInt CAknAnimationData::Interval() |
|
260 { |
|
261 return iInterval; |
|
262 } |
|
263 |
|
264 EXPORT_C TBool CAknAnimationData::DrawNextAnimationStep(CBitmapContext& aGc) |
|
265 { |
|
266 if (Count() == 0) |
|
267 { |
|
268 // Call the user animation step |
|
269 TAnimStep step; |
|
270 TAnimMultiStep nullStep(step); |
|
271 nullStep.iDrawStep.SetType(EAnimNullStep); |
|
272 nullStep.iSubStep = (TUint16)iCurrentDrawStep; |
|
273 TBool done = DrawUserAnimationStep(aGc, nullStep); |
|
274 iCurrentDrawStep++; |
|
275 return done; |
|
276 } |
|
277 |
|
278 if (iCurrentDrawStep < Count()) |
|
279 { |
|
280 TInt drawSteps = (*iDrawStepsPerAnimStep)[iCurrentAnimStep]; |
|
281 TInt startingDrawStep = iCurrentDrawStep; |
|
282 TBool repeatAnimStep = EFalse; |
|
283 |
|
284 for (TInt ii=0; ii<drawSteps; ii++) |
|
285 { |
|
286 TAnimStep* drawStep = &(At(iCurrentDrawStep)); |
|
287 |
|
288 switch (drawStep->Type()) |
|
289 { |
|
290 case EAnimBlitPreviousView: |
|
291 { |
|
292 TAnimBlitStep* step = drawStep->BlitStep(); |
|
293 aGc.BitBlt(TPoint(step->iDestX, step->iDestY), iOldBitmap); |
|
294 } |
|
295 break; |
|
296 case EAnimBlitNewView: |
|
297 { |
|
298 TAnimBlitStep* step = drawStep->BlitStep(); |
|
299 aGc.BitBlt(TPoint(step->iDestX, step->iDestY), iViewBitmap); |
|
300 } |
|
301 break; |
|
302 case EAnimBlitPartPreviousView: |
|
303 { |
|
304 TAnimBlitStep* step = drawStep->BlitStep(); |
|
305 aGc.BitBlt(TPoint(step->iDestX, step->iDestY), iOldBitmap, |
|
306 TRect(TPoint(step->iSrcX, step->iSrcY), TSize(step->iWidth, step->iHeight))); |
|
307 } |
|
308 break; |
|
309 case EAnimBlitPartNewView: |
|
310 { |
|
311 TAnimBlitStep* step = drawStep->BlitStep(); |
|
312 aGc.BitBlt(TPoint(step->iDestX, step->iDestY), iViewBitmap, |
|
313 TRect(TPoint(step->iSrcX, step->iSrcY), TSize(step->iWidth, step->iHeight))); |
|
314 } |
|
315 break; |
|
316 case EAnimDrawLine: |
|
317 case EAnimRevealPartNewViewFromLeft: |
|
318 case EAnimRevealPartNewViewFromRight: |
|
319 case EAnimRevealPartNewViewFromTop: |
|
320 case EAnimRevealPartNewViewFromBottom: |
|
321 case EAnimBlitSlideNewView: |
|
322 case EAnimBlitSlideNewViewClearBehind: |
|
323 { |
|
324 // Make this a pending step. Cancel the animation if the append fails |
|
325 TRAPD(err, iPendingSteps->AppendL(TAnimMultiStep(*drawStep))); |
|
326 if (err != KErrNone) |
|
327 return ETrue; |
|
328 } |
|
329 break; |
|
330 case EAnimSetColor: |
|
331 { |
|
332 TAnimSetColorStep* step = drawStep->SetColorStep(); |
|
333 iDrawColor = TRgb(step->iRed, step->iGreen, step->iBlue); |
|
334 } |
|
335 break; |
|
336 case EAnimDrawRect: |
|
337 { |
|
338 TAnimLineDrawStep* step = drawStep->LineDrawStep(); |
|
339 aGc.SetPenColor(iDrawColor); |
|
340 aGc.SetPenStyle(CGraphicsContext::ESolidPen); |
|
341 aGc.DrawRect(TRect(TPoint(step->iStartX, step->iStartY),TPoint(step->iEndX, step->iEndY))); |
|
342 } |
|
343 break; |
|
344 case EAnimDrawFilledRect: |
|
345 { |
|
346 TAnimLineDrawStep* step = drawStep->LineDrawStep(); |
|
347 aGc.SetBrushColor(iDrawColor); |
|
348 aGc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
349 aGc.SetPenStyle(CGraphicsContext::ENullPen); |
|
350 aGc.DrawRect(TRect(TPoint(step->iStartX, step->iStartY),TPoint(step->iEndX, step->iEndY))); |
|
351 } |
|
352 break; |
|
353 case EAnimWait: |
|
354 { |
|
355 TAnimWaitStep* step = drawStep->WaitStep(); |
|
356 repeatAnimStep = ETrue; |
|
357 if (step->iSteps > 0) |
|
358 { |
|
359 step->iSteps--; |
|
360 if (step->iSteps == 0) |
|
361 repeatAnimStep = EFalse; |
|
362 } |
|
363 } |
|
364 break; |
|
365 case EAnimWaitUntilComplete: |
|
366 if (iPendingSteps->Count()) |
|
367 repeatAnimStep = ETrue; |
|
368 break; |
|
369 default: |
|
370 // Type is user-defined, so add to the pending steps |
|
371 TRAPD(err, iPendingSteps->AppendL(TAnimMultiStep(*drawStep))); |
|
372 if (err != KErrNone) |
|
373 return ETrue; |
|
374 break; |
|
375 } |
|
376 iCurrentDrawStep++; |
|
377 } |
|
378 |
|
379 // If this step needs to be repeated, reset the draw step counter |
|
380 // otherwise increment the current animation step |
|
381 if (repeatAnimStep) |
|
382 { |
|
383 iCurrentDrawStep = startingDrawStep; |
|
384 } |
|
385 else |
|
386 { |
|
387 iCurrentAnimStep++; |
|
388 } |
|
389 } |
|
390 |
|
391 |
|
392 TInt done = DrawPendingAnimationSteps(aGc); |
|
393 |
|
394 if (iCurrentDrawStep == Count() && done) |
|
395 return ETrue; |
|
396 |
|
397 return EFalse; |
|
398 } |
|
399 |
|
400 |
|
401 TBool CAknAnimationData::DrawPendingAnimationSteps(CBitmapContext& aGc) |
|
402 { |
|
403 TBool finished = ETrue; |
|
404 TInt count = iPendingSteps->Count(); |
|
405 for (TInt ii=0; ii<count; ii++) |
|
406 { |
|
407 TAnimMultiStep* drawStep = &(*iPendingSteps)[ii]; |
|
408 TBool done = ExecutePendingAnimationStep(aGc, drawStep); |
|
409 if (!done) |
|
410 { |
|
411 finished = EFalse; |
|
412 } |
|
413 else |
|
414 { |
|
415 // Remove step from pending list |
|
416 iPendingSteps->Delete(ii); |
|
417 ii--; |
|
418 count--; |
|
419 } |
|
420 } |
|
421 return finished; |
|
422 } |
|
423 |
|
424 |
|
425 TBool CAknAnimationData::ExecutePendingAnimationStep(CBitmapContext& aGc, TAnimMultiStep* aStep) |
|
426 { |
|
427 TBool done = EFalse; |
|
428 switch (aStep->iDrawStep.Type()) |
|
429 { |
|
430 case EAnimDrawLine: |
|
431 { |
|
432 TAnimLineDrawStep* step = (aStep->iDrawStep.LineDrawStep()); |
|
433 |
|
434 if (aStep->iSubStep == step->iSteps -1) |
|
435 { |
|
436 done = ETrue; |
|
437 } |
|
438 { |
|
439 TInt diffX = step->iEndX - step->iStartX; |
|
440 TInt diffY = step->iEndY - step->iStartY; |
|
441 TInt startX = step->iStartX + (diffX * aStep->iSubStep / step->iSteps); |
|
442 TInt startY = step->iStartY + (diffY * aStep->iSubStep / step->iSteps); |
|
443 TInt endX = step->iStartX + (diffX * (aStep->iSubStep+1)/ step->iSteps); |
|
444 TInt endY = step->iStartY + (diffY * (aStep->iSubStep+1) / step->iSteps); |
|
445 aGc.SetBrushColor(iDrawColor); |
|
446 aGc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
447 aGc.Clear(TRect(TPoint(startX,startY),TPoint(endX+1, endY+1))); |
|
448 } |
|
449 } |
|
450 break; |
|
451 case EAnimRevealPartNewViewFromLeft: |
|
452 { |
|
453 TAnimBlitStep* step = (aStep->iDrawStep.BlitStep()); |
|
454 TPoint offset((step->iWidth * aStep->iSubStep) / step->iSteps, 0); |
|
455 TSize size((step->iWidth / step->iSteps)+1, step->iHeight); |
|
456 aGc.BitBlt(TPoint(step->iDestX, step->iDestY) + offset, iViewBitmap, |
|
457 TRect(TPoint(step->iSrcX, step->iSrcY) + offset, size)); |
|
458 if (aStep->iSubStep == step->iSteps-1) |
|
459 done = ETrue; |
|
460 } |
|
461 break; |
|
462 case EAnimRevealPartNewViewFromRight: |
|
463 { |
|
464 TAnimBlitStep* step = (aStep->iDrawStep.BlitStep()); |
|
465 TInt thisStep = (step->iSteps - aStep->iSubStep) - 1; |
|
466 TPoint offset((step->iWidth * thisStep) / step->iSteps, 0); |
|
467 TSize size((step->iWidth / step->iSteps)+1, step->iHeight); |
|
468 aGc.BitBlt(TPoint(step->iDestX, step->iDestY) + offset, iViewBitmap, |
|
469 TRect(TPoint(step->iSrcX, step->iSrcY) + offset, size)); |
|
470 if (aStep->iSubStep == step->iSteps-1) |
|
471 done = ETrue; |
|
472 } |
|
473 break; |
|
474 case EAnimRevealPartNewViewFromTop: |
|
475 { |
|
476 TAnimBlitStep* step = (aStep->iDrawStep.BlitStep()); |
|
477 TPoint offset(0,(step->iHeight * aStep->iSubStep) / step->iSteps); |
|
478 TSize size(step->iWidth,(step->iHeight / step->iSteps)+1); |
|
479 aGc.BitBlt(TPoint(step->iDestX, step->iDestY) + offset, iViewBitmap, |
|
480 TRect(TPoint(step->iSrcX, step->iSrcY) + offset, size)); |
|
481 if (aStep->iSubStep == step->iSteps-1) |
|
482 done = ETrue; |
|
483 } |
|
484 break; |
|
485 case EAnimRevealPartNewViewFromBottom: |
|
486 { |
|
487 TAnimBlitStep* step = (aStep->iDrawStep.BlitStep()); |
|
488 TInt thisStep = (step->iSteps - aStep->iSubStep) - 1; |
|
489 TPoint offset(0,(step->iHeight * thisStep) / step->iSteps); |
|
490 TSize size(step->iWidth,(step->iHeight / step->iSteps)+1); |
|
491 aGc.BitBlt(TPoint(step->iDestX, step->iDestY) + offset, iViewBitmap, |
|
492 TRect(TPoint(step->iSrcX, step->iSrcY) + offset, size)); |
|
493 if (aStep->iSubStep == step->iSteps-1) |
|
494 done = ETrue; |
|
495 } |
|
496 break; |
|
497 case EAnimBlitSlideNewView: |
|
498 // Slide the bitmap between two screen positions |
|
499 { |
|
500 TAnimSlideStep* step = (aStep->iDrawStep.SlideStep()); |
|
501 TSize bitmapSize(step->iWidth, step->iHeight); |
|
502 TInt slideDifferenceX = step->iSlideToX - step->iSlideFromX; |
|
503 TInt slideDifferenceY = step->iSlideToY - step->iSlideFromY; |
|
504 TInt slidePosX = step->iSlideFromX + ((slideDifferenceX * aStep->iSubStep) / step->iSteps); |
|
505 TInt slidePosY = step->iSlideFromY + ((slideDifferenceY * aStep->iSubStep) / step->iSteps); |
|
506 aGc.BitBlt(TPoint(slidePosX, slidePosY), iViewBitmap, |
|
507 TRect(TPoint(step->iSrcX, step->iSrcY), bitmapSize)); |
|
508 if (aStep->iSubStep == step->iSteps) |
|
509 done = ETrue; |
|
510 } |
|
511 break; |
|
512 case EAnimBlitSlideNewViewClearBehind: |
|
513 // Slide the bitmap between two screen positions, clearing the screen behind it |
|
514 { |
|
515 TAnimSlideStep* step = (aStep->iDrawStep.SlideStep()); |
|
516 TSize bitmapSize(step->iWidth, step->iHeight); |
|
517 TInt slideDifferenceX = step->iSlideToX - step->iSlideFromX; |
|
518 TInt slideDifferenceY = step->iSlideToY - step->iSlideFromY; |
|
519 if (aStep->iSubStep > 0) |
|
520 { |
|
521 // This is not the first step, so clear over the area of the previous step |
|
522 TInt slidePosX = step->iSlideFromX + ((slideDifferenceX * (aStep->iSubStep-1)) / step->iSteps); |
|
523 TInt slidePosY = step->iSlideFromY + ((slideDifferenceY * (aStep->iSubStep-1)) / step->iSteps); |
|
524 aGc.Clear(TRect(TPoint(slidePosX, slidePosY), bitmapSize)); |
|
525 } |
|
526 TInt slidePosX = step->iSlideFromX + ((slideDifferenceX * aStep->iSubStep) / step->iSteps); |
|
527 TInt slidePosY = step->iSlideFromY + ((slideDifferenceY * aStep->iSubStep) / step->iSteps); |
|
528 aGc.BitBlt(TPoint(slidePosX, slidePosY), iViewBitmap, |
|
529 TRect(TPoint(step->iSrcX, step->iSrcY), bitmapSize)); |
|
530 if (aStep->iSubStep == step->iSteps) |
|
531 done = ETrue; |
|
532 } |
|
533 break; |
|
534 default: |
|
535 done = DrawUserAnimationStep(aGc, *aStep); |
|
536 break; |
|
537 } |
|
538 |
|
539 aStep->iSubStep++; |
|
540 return done; |
|
541 } |
|
542 |
|
543 // End of File |