|
1 /* |
|
2 * Copyright (c) 2010 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: Recording graphics context used to cache drawing commands |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <bitdev.h> |
|
21 #include <graphics/gdi/gdiconsts.h> |
|
22 #include <graphics/gdi/gdistructs.h> |
|
23 #include <e32err.h> |
|
24 |
|
25 #include "cmrrecordinggc.h" |
|
26 #include "emailtrace.h" |
|
27 |
|
28 namespace |
|
29 { |
|
30 |
|
31 #ifdef _DEBUG |
|
32 _LIT( KPanicCategory, "CMRRecordingGc" ); |
|
33 |
|
34 enum TPanic |
|
35 { |
|
36 EBadArgument = 0, |
|
37 ENotSupported |
|
38 }; |
|
39 |
|
40 void Panic( TPanic aPanic ) |
|
41 { |
|
42 User::Panic( KPanicCategory, aPanic ); |
|
43 } |
|
44 |
|
45 #endif // _DEBUG |
|
46 |
|
47 } |
|
48 |
|
49 // ======== MEMBER FUNCTIONS ======== |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CMRRecordingGc::CMRRecordingGc |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 CMRRecordingGc::CMRRecordingGc( CWindowGc& aRealGc ) |
|
56 : CWindowGc( static_cast<CWsScreenDevice*>( aRealGc.Device() ) ), |
|
57 iRealGc( aRealGc ) |
|
58 { |
|
59 FUNC_LOG; |
|
60 } |
|
61 |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CMRRecordingGc::~CMRRecordingGc |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 CMRRecordingGc::~CMRRecordingGc() |
|
68 { |
|
69 FUNC_LOG; |
|
70 |
|
71 iItems.ResetAndDestroy(); |
|
72 } |
|
73 |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CMRRecordingGc::FlushBuffer |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 void CMRRecordingGc::FlushBuffer( const TRect& aRect ) |
|
80 { |
|
81 FUNC_LOG; |
|
82 |
|
83 if ( iItems.Count() == 0 ) |
|
84 { |
|
85 return; |
|
86 } |
|
87 |
|
88 CBufferItem* item = NULL; |
|
89 |
|
90 // Use real graphics context |
|
91 CBitmapContext* gc = &iRealGc; |
|
92 |
|
93 // Set graphics context origin relative to the drawing position |
|
94 gc->SetOrigin( aRect.iTl ); |
|
95 |
|
96 for ( TInt i = 0; i < iItems.Count(); ++i ) |
|
97 { |
|
98 item = iItems[i]; |
|
99 |
|
100 switch ( item->iType ) |
|
101 { |
|
102 case CBufferItem::EShortText: |
|
103 gc->DrawText( *item->iText, item->iPosition ); |
|
104 break; |
|
105 |
|
106 case CBufferItem::ELongText: |
|
107 gc->DrawText( |
|
108 *item->iText, |
|
109 item->iBox, |
|
110 item->iBaseLineOffset, |
|
111 TTextAlign( item->iValue ), //iHorizontal, |
|
112 item->iLeftMargin ); |
|
113 break; |
|
114 |
|
115 case CBufferItem::ESetPenColor: |
|
116 gc->SetPenColor( item->iColor ); |
|
117 break; |
|
118 |
|
119 case CBufferItem::EBitBltMasked1: |
|
120 gc->BitBltMasked( |
|
121 item->iPosition, |
|
122 item->iBitmap, |
|
123 item->iBox, |
|
124 item->iMask, |
|
125 item->iInvertMask ); |
|
126 break; |
|
127 |
|
128 case CBufferItem::EUseFont: |
|
129 gc->UseFont( item->iFont ); |
|
130 break; |
|
131 |
|
132 case CBufferItem::EDiscardFont: |
|
133 gc->DiscardFont(); |
|
134 break; |
|
135 |
|
136 case CBufferItem::ESetDrawMode: |
|
137 gc->SetDrawMode( TDrawMode( item->iValue ) ); |
|
138 break; |
|
139 |
|
140 case CBufferItem::ESetClippingRect: |
|
141 gc->SetClippingRect( item->iBox ); |
|
142 break; |
|
143 |
|
144 case CBufferItem::ECancelClippingRect: |
|
145 gc->CancelClippingRect(); |
|
146 break; |
|
147 |
|
148 case CBufferItem::ESetBrushColor: |
|
149 gc->SetBrushColor( item->iColor ); |
|
150 break; |
|
151 |
|
152 case CBufferItem::ESetBrushStyle: |
|
153 gc->SetBrushStyle( TBrushStyle( item->iValue ) );//iBrushStyle ); |
|
154 break; |
|
155 |
|
156 case CBufferItem::EDrawRect: |
|
157 gc->DrawRect( item->iRect ); |
|
158 break; |
|
159 |
|
160 case CBufferItem::EClear: |
|
161 gc->Clear( item->iRect ); |
|
162 break; |
|
163 |
|
164 case CBufferItem::EDrawLine: |
|
165 gc->DrawLine( item->iRect.iTl, item->iRect.iBr ); |
|
166 break; |
|
167 case CBufferItem::ESetUnderlineStyle: |
|
168 gc->SetUnderlineStyle( TFontUnderline( item->iValue ) ); |
|
169 break; |
|
170 case CBufferItem::ESetStrikethroughStyle: |
|
171 gc->SetStrikethroughStyle( TFontStrikethrough( item->iValue ) ); |
|
172 break; |
|
173 default: |
|
174 break; |
|
175 } |
|
176 } |
|
177 |
|
178 // Reset gc |
|
179 gc->Reset(); |
|
180 } |
|
181 |
|
182 |
|
183 // ----------------------------------------------------------------------------- |
|
184 // CMRRecordingGc::PurgeBuffer |
|
185 // ----------------------------------------------------------------------------- |
|
186 // |
|
187 void CMRRecordingGc::PurgeBuffer() |
|
188 { |
|
189 FUNC_LOG; |
|
190 |
|
191 iItems.ResetAndDestroy(); |
|
192 } |
|
193 |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // CMRRecordingGc::CBufferItem::~CBufferItem |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 CMRRecordingGc::CBufferItem::~CBufferItem() |
|
200 { |
|
201 FUNC_LOG; |
|
202 |
|
203 delete iText; |
|
204 delete iBitmap; |
|
205 delete iMask; |
|
206 } |
|
207 |
|
208 // ----------------------------------------------------------------------------- |
|
209 // CMRRecordingGc::CBufferItem::Translate |
|
210 // ----------------------------------------------------------------------------- |
|
211 // |
|
212 void CMRRecordingGc::CBufferItem::Translate( const TPoint& aPoint ) |
|
213 { |
|
214 FUNC_LOG; |
|
215 |
|
216 iBox.Move( aPoint ); |
|
217 iPosition += aPoint; |
|
218 iRect.Move( aPoint ); |
|
219 } |
|
220 |
|
221 |
|
222 // ----------------------------------------------------------------------------- |
|
223 // CMRRecordingGc::BufferItem |
|
224 // ----------------------------------------------------------------------------- |
|
225 // |
|
226 CMRRecordingGc::CBufferItem* CMRRecordingGc::BufferItem() |
|
227 { |
|
228 FUNC_LOG; |
|
229 |
|
230 CBufferItem* buffer = NULL; |
|
231 |
|
232 TRAP_IGNORE( |
|
233 { |
|
234 buffer = new ( ELeave ) CBufferItem ; |
|
235 CleanupStack::PushL( buffer ); |
|
236 iItems.AppendL( buffer ); |
|
237 CleanupStack::Pop( buffer ); |
|
238 buffer->iPosition.SetXY( -1, -1 ); |
|
239 } ); |
|
240 |
|
241 return buffer; |
|
242 } |
|
243 |
|
244 // --------------------------------------------------------------------------- |
|
245 // CMRRecordingGc::Activate |
|
246 // From class CWindowGc |
|
247 // --------------------------------------------------------------------------- |
|
248 // |
|
249 void CMRRecordingGc::Activate( RDrawableWindow& /*aDevice*/ ) |
|
250 { |
|
251 FUNC_LOG; |
|
252 } |
|
253 |
|
254 |
|
255 // --------------------------------------------------------------------------- |
|
256 // CMRRecordingGc::Deactivate |
|
257 // From class CWindowGc |
|
258 // --------------------------------------------------------------------------- |
|
259 // |
|
260 void CMRRecordingGc::Deactivate() |
|
261 { |
|
262 FUNC_LOG; |
|
263 } |
|
264 |
|
265 |
|
266 // --------------------------------------------------------------------------- |
|
267 // CMRRecordingGc::Device |
|
268 // From class CWindowGc |
|
269 // --------------------------------------------------------------------------- |
|
270 // |
|
271 CGraphicsDevice* CMRRecordingGc::Device() const |
|
272 { |
|
273 FUNC_LOG; |
|
274 |
|
275 return NULL; |
|
276 } |
|
277 |
|
278 |
|
279 // --------------------------------------------------------------------------- |
|
280 // CMRRecordingGc::SetOrigin |
|
281 // From class CWindowGc |
|
282 // --------------------------------------------------------------------------- |
|
283 // |
|
284 void CMRRecordingGc::SetOrigin( const TPoint& aPoint ) |
|
285 { |
|
286 FUNC_LOG; |
|
287 |
|
288 iOrigin = aPoint; |
|
289 } |
|
290 |
|
291 |
|
292 // --------------------------------------------------------------------------- |
|
293 // CMRRecordingGc::SetDrawMode |
|
294 // From class CWindowGc |
|
295 // --------------------------------------------------------------------------- |
|
296 // |
|
297 void CMRRecordingGc::SetDrawMode( TDrawMode aDrawingMode ) |
|
298 { |
|
299 FUNC_LOG; |
|
300 |
|
301 CBufferItem* buffer = BufferItem(); |
|
302 |
|
303 if ( buffer ) |
|
304 { |
|
305 buffer->iType = CBufferItem::ESetDrawMode; |
|
306 buffer->iValue = aDrawingMode; |
|
307 } |
|
308 } |
|
309 |
|
310 |
|
311 // --------------------------------------------------------------------------- |
|
312 // CMRRecordingGc::SetClippingRect |
|
313 // From class CWindowGc |
|
314 // --------------------------------------------------------------------------- |
|
315 // |
|
316 void CMRRecordingGc::SetClippingRect( const TRect& aRect ) |
|
317 { |
|
318 FUNC_LOG; |
|
319 |
|
320 CBufferItem* buffer = BufferItem(); |
|
321 |
|
322 if ( buffer ) |
|
323 { |
|
324 buffer->iType = CBufferItem::ESetClippingRect; |
|
325 buffer->iBox = aRect; |
|
326 buffer->iPosition = aRect.iTl; |
|
327 buffer->Translate( iOrigin ); |
|
328 } |
|
329 } |
|
330 |
|
331 |
|
332 // --------------------------------------------------------------------------- |
|
333 // CMRRecordingGc::CancelClippingRect |
|
334 // From class CWindowGc |
|
335 // --------------------------------------------------------------------------- |
|
336 // |
|
337 void CMRRecordingGc::CancelClippingRect() |
|
338 { |
|
339 FUNC_LOG; |
|
340 |
|
341 CBufferItem* buffer = BufferItem(); |
|
342 |
|
343 if ( buffer ) |
|
344 { |
|
345 buffer->iType = CBufferItem::ECancelClippingRect; |
|
346 } |
|
347 } |
|
348 |
|
349 |
|
350 // --------------------------------------------------------------------------- |
|
351 // CMRRecordingGc::SetClippingRegion |
|
352 // From class CWindowGc |
|
353 // --------------------------------------------------------------------------- |
|
354 // |
|
355 TInt CMRRecordingGc::SetClippingRegion( const TRegion& /*aRegion*/ ) |
|
356 { |
|
357 FUNC_LOG; |
|
358 |
|
359 return 0; |
|
360 } |
|
361 |
|
362 |
|
363 // --------------------------------------------------------------------------- |
|
364 // void CMRRecordingGc::Reset |
|
365 // From class CWindowGc |
|
366 // --------------------------------------------------------------------------- |
|
367 // |
|
368 void CMRRecordingGc::Reset() |
|
369 { |
|
370 FUNC_LOG; |
|
371 } |
|
372 |
|
373 |
|
374 // --------------------------------------------------------------------------- |
|
375 // CMRRecordingGc::UseFont |
|
376 // From class CWindowGc |
|
377 // --------------------------------------------------------------------------- |
|
378 // |
|
379 void CMRRecordingGc::UseFont( const CFont* aFont ) |
|
380 { |
|
381 FUNC_LOG; |
|
382 |
|
383 CBufferItem* buffer = BufferItem(); |
|
384 |
|
385 if ( buffer ) |
|
386 { |
|
387 buffer->iType = CBufferItem::EUseFont; |
|
388 buffer->iFont = aFont; |
|
389 } |
|
390 } |
|
391 |
|
392 |
|
393 // --------------------------------------------------------------------------- |
|
394 // CMRRecordingGc::DiscardFont |
|
395 // From class CWindowGc |
|
396 // --------------------------------------------------------------------------- |
|
397 // |
|
398 void CMRRecordingGc::DiscardFont() |
|
399 { |
|
400 FUNC_LOG; |
|
401 |
|
402 CBufferItem* buffer = BufferItem(); |
|
403 |
|
404 if ( buffer ) |
|
405 { |
|
406 buffer->iType = CBufferItem::EDiscardFont; |
|
407 } |
|
408 } |
|
409 |
|
410 |
|
411 // --------------------------------------------------------------------------- |
|
412 // CMRRecordingGc::SetUnderlineStyle |
|
413 // From class CWindowGc |
|
414 // --------------------------------------------------------------------------- |
|
415 // |
|
416 void CMRRecordingGc::SetUnderlineStyle( TFontUnderline aUnderlineStyle ) |
|
417 { |
|
418 FUNC_LOG; |
|
419 |
|
420 CBufferItem* buffer = BufferItem(); |
|
421 |
|
422 if ( buffer ) |
|
423 { |
|
424 buffer->iType = CBufferItem::ESetUnderlineStyle; |
|
425 buffer->iValue = aUnderlineStyle; |
|
426 } |
|
427 } |
|
428 |
|
429 |
|
430 // --------------------------------------------------------------------------- |
|
431 // CMRRecordingGc::SetStrikethroughStyle |
|
432 // From class CWindowGc |
|
433 // --------------------------------------------------------------------------- |
|
434 // |
|
435 void CMRRecordingGc::SetStrikethroughStyle( |
|
436 TFontStrikethrough aStrikethroughStyle ) |
|
437 { |
|
438 FUNC_LOG; |
|
439 CBufferItem* buffer = BufferItem(); |
|
440 |
|
441 if ( buffer ) |
|
442 { |
|
443 buffer->iType = CBufferItem::ESetStrikethroughStyle; |
|
444 buffer->iValue = aStrikethroughStyle; |
|
445 } |
|
446 } |
|
447 |
|
448 |
|
449 |
|
450 // --------------------------------------------------------------------------- |
|
451 // CMRRecordingGc::SetWordJustification |
|
452 // From class CWindowGc |
|
453 // --------------------------------------------------------------------------- |
|
454 // |
|
455 void CMRRecordingGc::SetWordJustification( |
|
456 TInt /*aExcessWidth*/, |
|
457 TInt /*aNumGaps*/ ) |
|
458 { |
|
459 FUNC_LOG; |
|
460 |
|
461 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
462 } |
|
463 |
|
464 |
|
465 // --------------------------------------------------------------------------- |
|
466 // CMRRecordingGc::SetCharJustification |
|
467 // From class CWindowGc |
|
468 // --------------------------------------------------------------------------- |
|
469 // |
|
470 void CMRRecordingGc::SetCharJustification( |
|
471 TInt /*aExcessWidth*/, |
|
472 TInt /*aNumChars*/ ) |
|
473 { |
|
474 FUNC_LOG; |
|
475 |
|
476 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
477 } |
|
478 |
|
479 |
|
480 // --------------------------------------------------------------------------- |
|
481 // CMRRecordingGc::SetPenColor |
|
482 // From class CWindowGc |
|
483 // --------------------------------------------------------------------------- |
|
484 // |
|
485 void CMRRecordingGc::SetPenColor( const TRgb& aColor ) |
|
486 { |
|
487 FUNC_LOG; |
|
488 |
|
489 CBufferItem* buffer = BufferItem(); |
|
490 |
|
491 if ( buffer ) |
|
492 { |
|
493 buffer->iType = CBufferItem::ESetPenColor; |
|
494 buffer->iColor = aColor; |
|
495 } |
|
496 } |
|
497 |
|
498 |
|
499 // --------------------------------------------------------------------------- |
|
500 // CMRRecordingGc::SetPenStyle |
|
501 // From class CWindowGc |
|
502 // --------------------------------------------------------------------------- |
|
503 // |
|
504 void CMRRecordingGc::SetPenStyle( TPenStyle /*aPenStyle*/ ) |
|
505 { |
|
506 FUNC_LOG; |
|
507 } |
|
508 |
|
509 |
|
510 // --------------------------------------------------------------------------- |
|
511 // CMRRecordingGc::SetPenSize |
|
512 // From class CWindowGc |
|
513 // --------------------------------------------------------------------------- |
|
514 // |
|
515 void CMRRecordingGc::SetPenSize( const TSize& /*aSize*/ ) |
|
516 { |
|
517 FUNC_LOG; |
|
518 |
|
519 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
520 } |
|
521 |
|
522 |
|
523 // --------------------------------------------------------------------------- |
|
524 // CMRRecordingGc::SetBrushColor |
|
525 // From class CWindowGc |
|
526 // --------------------------------------------------------------------------- |
|
527 // |
|
528 void CMRRecordingGc::SetBrushColor( const TRgb& aColor ) |
|
529 { |
|
530 FUNC_LOG; |
|
531 |
|
532 CBufferItem* buffer = BufferItem(); |
|
533 |
|
534 if ( buffer ) |
|
535 { |
|
536 buffer->iType = CBufferItem::ESetBrushColor; |
|
537 buffer->iColor = aColor; |
|
538 } |
|
539 } |
|
540 |
|
541 |
|
542 // --------------------------------------------------------------------------- |
|
543 // CMRRecordingGc::SetBrushStyle |
|
544 // From class CWindowGc |
|
545 // --------------------------------------------------------------------------- |
|
546 // |
|
547 void CMRRecordingGc::SetBrushStyle( TBrushStyle aBrushStyle ) |
|
548 { |
|
549 FUNC_LOG; |
|
550 |
|
551 CBufferItem* buffer = BufferItem(); |
|
552 |
|
553 if ( buffer ) |
|
554 { |
|
555 buffer->iType = CBufferItem::ESetBrushStyle; |
|
556 buffer->iValue = aBrushStyle; |
|
557 } |
|
558 } |
|
559 |
|
560 |
|
561 // --------------------------------------------------------------------------- |
|
562 // CMRRecordingGc::SetBrushOrigin |
|
563 // From class CWindowGc |
|
564 // --------------------------------------------------------------------------- |
|
565 // |
|
566 void CMRRecordingGc::SetBrushOrigin( const TPoint& /*aOrigin*/ ) |
|
567 { |
|
568 FUNC_LOG; |
|
569 |
|
570 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
571 } |
|
572 |
|
573 |
|
574 // --------------------------------------------------------------------------- |
|
575 // CMRRecordingGc::UseBrushPattern |
|
576 // From class CWindowGc |
|
577 // --------------------------------------------------------------------------- |
|
578 // |
|
579 void CMRRecordingGc::UseBrushPattern( const CFbsBitmap* /*aDevice*/ ) |
|
580 { |
|
581 FUNC_LOG; |
|
582 |
|
583 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
584 } |
|
585 |
|
586 |
|
587 // --------------------------------------------------------------------------- |
|
588 // CMRRecordingGc::DiscardBrushPattern |
|
589 // From class CWindowGc |
|
590 // --------------------------------------------------------------------------- |
|
591 // |
|
592 void CMRRecordingGc::DiscardBrushPattern() |
|
593 { |
|
594 FUNC_LOG; |
|
595 |
|
596 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
597 } |
|
598 |
|
599 |
|
600 // --------------------------------------------------------------------------- |
|
601 // CMRRecordingGc::MoveTo |
|
602 // From class CWindowGc |
|
603 // --------------------------------------------------------------------------- |
|
604 // |
|
605 void CMRRecordingGc::MoveTo( const TPoint& /*aPoint*/ ) |
|
606 { |
|
607 FUNC_LOG; |
|
608 |
|
609 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
610 } |
|
611 |
|
612 |
|
613 // --------------------------------------------------------------------------- |
|
614 // CMRRecordingGc::MoveBy |
|
615 // From class CWindowGc |
|
616 // --------------------------------------------------------------------------- |
|
617 // |
|
618 void CMRRecordingGc::MoveBy( const TPoint& /*aPoint*/ ) |
|
619 { |
|
620 FUNC_LOG; |
|
621 |
|
622 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
623 } |
|
624 |
|
625 |
|
626 // --------------------------------------------------------------------------- |
|
627 // CMRRecordingGc::Plot |
|
628 // From class CWindowGc |
|
629 // --------------------------------------------------------------------------- |
|
630 // |
|
631 void CMRRecordingGc::Plot( const TPoint& /*aPoint*/ ) |
|
632 { |
|
633 FUNC_LOG; |
|
634 |
|
635 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
636 } |
|
637 |
|
638 |
|
639 // --------------------------------------------------------------------------- |
|
640 // CMRRecordingGc::DrawArc |
|
641 // From class CWindowGc |
|
642 // --------------------------------------------------------------------------- |
|
643 // |
|
644 void CMRRecordingGc::DrawArc( |
|
645 const TRect& /*aRect*/, |
|
646 const TPoint& /*aStart*/, |
|
647 const TPoint& /*aEnd*/ ) |
|
648 { |
|
649 FUNC_LOG; |
|
650 |
|
651 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
652 } |
|
653 |
|
654 |
|
655 // --------------------------------------------------------------------------- |
|
656 // CMRRecordingGc::DrawLine |
|
657 // From class CWindowGc |
|
658 // --------------------------------------------------------------------------- |
|
659 // |
|
660 void CMRRecordingGc::DrawLine( |
|
661 const TPoint& aPoint1, |
|
662 const TPoint& aPoint2 ) |
|
663 { |
|
664 FUNC_LOG; |
|
665 |
|
666 CBufferItem* buffer = BufferItem(); |
|
667 |
|
668 if ( buffer ) |
|
669 { |
|
670 buffer->iType = CBufferItem::EDrawLine; |
|
671 buffer->iRect.iTl = aPoint1; |
|
672 buffer->iRect.iBr = aPoint2; |
|
673 buffer->Translate( iOrigin ); |
|
674 } |
|
675 } |
|
676 |
|
677 |
|
678 // --------------------------------------------------------------------------- |
|
679 // CMRRecordingGc::DrawLineTo |
|
680 // From class CWindowGc |
|
681 // --------------------------------------------------------------------------- |
|
682 // |
|
683 void CMRRecordingGc::DrawLineTo( const TPoint& /*aPoint*/ ) |
|
684 { |
|
685 FUNC_LOG; |
|
686 |
|
687 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
688 } |
|
689 |
|
690 |
|
691 // --------------------------------------------------------------------------- |
|
692 // CMRRecordingGc::DrawLineBy |
|
693 // From class CWindowGc |
|
694 // --------------------------------------------------------------------------- |
|
695 // |
|
696 void CMRRecordingGc::DrawLineBy( const TPoint& /*aPoint*/ ) |
|
697 { |
|
698 FUNC_LOG; |
|
699 |
|
700 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
701 } |
|
702 |
|
703 |
|
704 // --------------------------------------------------------------------------- |
|
705 // CMRRecordingGc::DrawPolyLine |
|
706 // From class CWindowGc |
|
707 // --------------------------------------------------------------------------- |
|
708 // |
|
709 void CMRRecordingGc::DrawPolyLine( const CArrayFix<TPoint>* /*aPointList*/ ) |
|
710 { |
|
711 FUNC_LOG; |
|
712 |
|
713 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
714 } |
|
715 |
|
716 |
|
717 // --------------------------------------------------------------------------- |
|
718 // CMRRecordingGc::DrawPolyLine |
|
719 // From class CWindowGc |
|
720 // --------------------------------------------------------------------------- |
|
721 // |
|
722 void CMRRecordingGc::DrawPolyLine( |
|
723 const TPoint* /*aPointList*/, |
|
724 TInt /*aNumPoints*/ ) |
|
725 { |
|
726 FUNC_LOG; |
|
727 |
|
728 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
729 } |
|
730 |
|
731 |
|
732 // --------------------------------------------------------------------------- |
|
733 // CMRRecordingGc::DrawPie |
|
734 // From class CWindowGc |
|
735 // --------------------------------------------------------------------------- |
|
736 // |
|
737 void CMRRecordingGc::DrawPie( |
|
738 const TRect& /*aRect*/, |
|
739 const TPoint& /*aStart*/, |
|
740 const TPoint& /*aEnd*/ ) |
|
741 { |
|
742 FUNC_LOG; |
|
743 |
|
744 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
745 } |
|
746 |
|
747 |
|
748 // --------------------------------------------------------------------------- |
|
749 // CMRRecordingGc::DrawEllipse |
|
750 // From class CWindowGc |
|
751 // --------------------------------------------------------------------------- |
|
752 // |
|
753 void CMRRecordingGc::DrawEllipse( const TRect& /*aRect*/ ) |
|
754 { |
|
755 FUNC_LOG; |
|
756 |
|
757 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
758 } |
|
759 |
|
760 |
|
761 // --------------------------------------------------------------------------- |
|
762 // CMRRecordingGc::DrawRect |
|
763 // From class CWindowGc |
|
764 // --------------------------------------------------------------------------- |
|
765 // |
|
766 void CMRRecordingGc::DrawRect( const TRect& aRect ) |
|
767 { |
|
768 FUNC_LOG; |
|
769 |
|
770 CBufferItem* buffer = BufferItem(); |
|
771 |
|
772 if ( buffer ) |
|
773 { |
|
774 buffer->iType = CBufferItem::EDrawRect; |
|
775 buffer->iRect = aRect; |
|
776 buffer->Translate( iOrigin ); |
|
777 } |
|
778 } |
|
779 |
|
780 |
|
781 // --------------------------------------------------------------------------- |
|
782 // CMRRecordingGc::DrawRoundRect |
|
783 // From class CWindowGc |
|
784 // --------------------------------------------------------------------------- |
|
785 // |
|
786 void CMRRecordingGc::DrawRoundRect( |
|
787 const TRect& /*aRect*/, |
|
788 const TSize& /*aEllipse*/ ) |
|
789 { |
|
790 FUNC_LOG; |
|
791 |
|
792 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
793 } |
|
794 |
|
795 |
|
796 // --------------------------------------------------------------------------- |
|
797 // CMRRecordingGc::DrawPolygon |
|
798 // From class CWindowGc |
|
799 // --------------------------------------------------------------------------- |
|
800 // |
|
801 TInt CMRRecordingGc::DrawPolygon( |
|
802 const CArrayFix<TPoint>* /*aPointList*/, |
|
803 TFillRule /*aFillRule*/ ) |
|
804 { |
|
805 FUNC_LOG; |
|
806 |
|
807 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
808 |
|
809 return KErrNotSupported; |
|
810 } |
|
811 |
|
812 |
|
813 // --------------------------------------------------------------------------- |
|
814 // CMRRecordingGc::DrawPolygon |
|
815 // From class CWindowGc |
|
816 // --------------------------------------------------------------------------- |
|
817 // |
|
818 TInt CMRRecordingGc::DrawPolygon( |
|
819 const TPoint* /*aPointList*/, |
|
820 TInt /*aNumPoints*/, |
|
821 TFillRule /*aFillRule*/ ) |
|
822 { |
|
823 FUNC_LOG; |
|
824 |
|
825 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
826 |
|
827 return KErrNotSupported; |
|
828 } |
|
829 |
|
830 |
|
831 // --------------------------------------------------------------------------- |
|
832 // CMRRecordingGc::DrawBitmap |
|
833 // From class CWindowGc |
|
834 // --------------------------------------------------------------------------- |
|
835 // |
|
836 void CMRRecordingGc::DrawBitmap( |
|
837 const TPoint& /*aTopLeft*/, |
|
838 const CFbsBitmap* /*aDevice*/ ) |
|
839 { |
|
840 FUNC_LOG; |
|
841 |
|
842 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
843 } |
|
844 |
|
845 |
|
846 // --------------------------------------------------------------------------- |
|
847 // CMRRecordingGc::DrawBitmap |
|
848 // From class CWindowGc |
|
849 // --------------------------------------------------------------------------- |
|
850 // |
|
851 void CMRRecordingGc::DrawBitmap( |
|
852 const TRect& /*aDestRect*/, |
|
853 const CFbsBitmap* /*aDevice*/ ) |
|
854 { |
|
855 FUNC_LOG; |
|
856 |
|
857 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
858 } |
|
859 |
|
860 |
|
861 // --------------------------------------------------------------------------- |
|
862 // CMRRecordingGc::DrawBitmap |
|
863 // From class CWindowGc |
|
864 // --------------------------------------------------------------------------- |
|
865 // |
|
866 void CMRRecordingGc::DrawBitmap( |
|
867 const TRect& /*aDestRect*/, |
|
868 const CFbsBitmap* /*aDevice*/, |
|
869 const TRect& /*aSourceRect*/ ) |
|
870 { |
|
871 FUNC_LOG; |
|
872 |
|
873 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
874 } |
|
875 |
|
876 |
|
877 // --------------------------------------------------------------------------- |
|
878 // CMRRecordingGc::DrawBitmapMasked |
|
879 // From class CWindowGc |
|
880 // --------------------------------------------------------------------------- |
|
881 // |
|
882 void CMRRecordingGc::DrawBitmapMasked( |
|
883 const TRect& /*aDestRect*/, |
|
884 const CFbsBitmap* /*aBitmap*/, |
|
885 const TRect& /*aSourceRect*/, |
|
886 const CFbsBitmap* /*aMaskBitmap*/, |
|
887 TBool /*aInvertMask*/ ) |
|
888 { |
|
889 FUNC_LOG; |
|
890 |
|
891 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
892 } |
|
893 |
|
894 |
|
895 // --------------------------------------------------------------------------- |
|
896 // CMRRecordingGc::DrawBitmapMasked |
|
897 // From class CWindowGc |
|
898 // --------------------------------------------------------------------------- |
|
899 // |
|
900 void CMRRecordingGc::DrawBitmapMasked( |
|
901 const TRect& /*aDestRect*/, |
|
902 const CWsBitmap* /*aBitmap*/, |
|
903 const TRect& /*aSourceRect*/, |
|
904 const CWsBitmap* /*aMaskBitmap*/, |
|
905 TBool /*aInvertMask*/ ) |
|
906 { |
|
907 FUNC_LOG; |
|
908 |
|
909 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
910 } |
|
911 |
|
912 |
|
913 // --------------------------------------------------------------------------- |
|
914 // CMRRecordingGc::DrawText |
|
915 // From class CWindowGc |
|
916 // --------------------------------------------------------------------------- |
|
917 // |
|
918 void CMRRecordingGc::DrawText( const TDesC& aBuf, const TPoint& aPos ) |
|
919 { |
|
920 FUNC_LOG; |
|
921 |
|
922 CBufferItem* buffer = BufferItem(); |
|
923 |
|
924 if ( buffer ) |
|
925 { |
|
926 buffer->iType = CBufferItem::EShortText; |
|
927 TRAP_IGNORE( buffer->iText = aBuf.AllocL() ); |
|
928 buffer->iPosition = aPos; |
|
929 buffer->Translate( iOrigin ); |
|
930 } |
|
931 } |
|
932 |
|
933 |
|
934 // --------------------------------------------------------------------------- |
|
935 // CMRRecordingGc::DrawText |
|
936 // From class CWindowGc |
|
937 // --------------------------------------------------------------------------- |
|
938 // |
|
939 void CMRRecordingGc::DrawText( |
|
940 const TDesC& aBuf, |
|
941 const TRect& aBox, |
|
942 TInt aBaselineOffset, |
|
943 TTextAlign aHoriz, |
|
944 TInt aLeftMrg ) |
|
945 { |
|
946 FUNC_LOG; |
|
947 |
|
948 CBufferItem* buffer = BufferItem(); |
|
949 |
|
950 if ( buffer ) |
|
951 { |
|
952 buffer->iType = CBufferItem::ELongText; |
|
953 TRAP_IGNORE( buffer->iText = aBuf.AllocL() ); |
|
954 buffer->iBox = aBox; |
|
955 buffer->iBaseLineOffset = aBaselineOffset; |
|
956 buffer->iValue = aHoriz; |
|
957 buffer->iLeftMargin = aLeftMrg; |
|
958 buffer->iPosition = aBox.iTl; |
|
959 buffer->Translate( iOrigin ); |
|
960 } |
|
961 } |
|
962 |
|
963 |
|
964 // --------------------------------------------------------------------------- |
|
965 // CMRRecordingGc::Clear |
|
966 // From class CWindowGc |
|
967 // --------------------------------------------------------------------------- |
|
968 // |
|
969 void CMRRecordingGc::Clear() |
|
970 { |
|
971 FUNC_LOG; |
|
972 |
|
973 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
974 } |
|
975 |
|
976 |
|
977 // --------------------------------------------------------------------------- |
|
978 // CMRRecordingGc::Clear |
|
979 // From class CWindowGc |
|
980 // --------------------------------------------------------------------------- |
|
981 // |
|
982 void CMRRecordingGc::Clear( const TRect& aRect ) |
|
983 { |
|
984 FUNC_LOG; |
|
985 |
|
986 CBufferItem* buffer = BufferItem(); |
|
987 |
|
988 if ( buffer ) |
|
989 { |
|
990 buffer->iType = CBufferItem::EClear; |
|
991 buffer->iRect = aRect; |
|
992 buffer->Translate( iOrigin ); |
|
993 } |
|
994 } |
|
995 |
|
996 |
|
997 // --------------------------------------------------------------------------- |
|
998 // CMRRecordingGc::CopyRect |
|
999 // From class CWindowGc |
|
1000 // --------------------------------------------------------------------------- |
|
1001 // |
|
1002 void CMRRecordingGc::CopyRect( |
|
1003 const TPoint& /*aOffset*/, |
|
1004 const TRect& /*aRect */ ) |
|
1005 { |
|
1006 FUNC_LOG; |
|
1007 |
|
1008 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1009 } |
|
1010 |
|
1011 |
|
1012 // --------------------------------------------------------------------------- |
|
1013 // CMRRecordingGc::BitBlt |
|
1014 // From class CWindowGc |
|
1015 // --------------------------------------------------------------------------- |
|
1016 // |
|
1017 void CMRRecordingGc::BitBlt( |
|
1018 const TPoint& /*aPos*/, |
|
1019 const CFbsBitmap* /*aBitmap*/ ) |
|
1020 { |
|
1021 FUNC_LOG; |
|
1022 |
|
1023 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1024 } |
|
1025 |
|
1026 |
|
1027 // --------------------------------------------------------------------------- |
|
1028 // CMRRecordingGc::BitBlt |
|
1029 // From class CWindowGc |
|
1030 // --------------------------------------------------------------------------- |
|
1031 // |
|
1032 void CMRRecordingGc::BitBlt( |
|
1033 const TPoint& aDestination, |
|
1034 const CFbsBitmap* aBitmap, |
|
1035 const TRect& aSource ) |
|
1036 { |
|
1037 FUNC_LOG; |
|
1038 |
|
1039 CBufferItem* buffer = BufferItem(); |
|
1040 |
|
1041 if ( buffer ) |
|
1042 { |
|
1043 buffer->iType = CBufferItem::EBitBlt2; |
|
1044 buffer->iPosition = aDestination + iOrigin; |
|
1045 |
|
1046 // Duplicate bitmap |
|
1047 CFbsBitmap* bitmap = NULL; |
|
1048 TRAP_IGNORE( bitmap = new( ELeave ) CFbsBitmap; ) |
|
1049 bitmap->Duplicate( aBitmap->Handle() ); |
|
1050 buffer->iBitmap = bitmap; |
|
1051 buffer->iBox = aSource; |
|
1052 } |
|
1053 } |
|
1054 |
|
1055 |
|
1056 // --------------------------------------------------------------------------- |
|
1057 // CMRRecordingGc::BitBltMasked |
|
1058 // From class CWindowGc |
|
1059 // --------------------------------------------------------------------------- |
|
1060 // |
|
1061 void CMRRecordingGc::BitBltMasked( |
|
1062 const TPoint& aPoint, |
|
1063 const CFbsBitmap* aBitmap, |
|
1064 const TRect& aSourceRect, |
|
1065 const CFbsBitmap* aMaskBitmap, |
|
1066 TBool aInvertMask ) |
|
1067 { |
|
1068 FUNC_LOG; |
|
1069 |
|
1070 CBufferItem* buffer = BufferItem(); |
|
1071 |
|
1072 if ( buffer ) |
|
1073 { |
|
1074 buffer->iType = CBufferItem::EBitBltMasked1; |
|
1075 buffer->iPosition = aPoint + iOrigin; |
|
1076 buffer->iBox = aSourceRect; |
|
1077 buffer->iInvertMask = aInvertMask; |
|
1078 |
|
1079 // Make a duplicate of passed in bitmap, so that to make sure |
|
1080 // the bitmap won't be freed when FlushBuffer(). (Duplicate |
|
1081 // only increases the access count for bitmap) |
|
1082 CFbsBitmap* bitmap = NULL; |
|
1083 CFbsBitmap* maskBitmap = NULL; |
|
1084 TRAP_IGNORE( bitmap = new (ELeave) CFbsBitmap; ) |
|
1085 TRAP_IGNORE( maskBitmap = new (ELeave) CFbsBitmap; ) |
|
1086 bitmap->Duplicate(aBitmap->Handle()); |
|
1087 maskBitmap->Duplicate(aMaskBitmap->Handle()); |
|
1088 buffer->iBitmap = bitmap; |
|
1089 buffer->iMask = maskBitmap; |
|
1090 } |
|
1091 } |
|
1092 |
|
1093 |
|
1094 // --------------------------------------------------------------------------- |
|
1095 // CMRRecordingGc::BitBlt |
|
1096 // From class CWindowGc |
|
1097 // --------------------------------------------------------------------------- |
|
1098 // |
|
1099 void CMRRecordingGc::BitBlt( |
|
1100 const TPoint& /*aPoint*/, |
|
1101 const CWsBitmap* /*aBitmap*/ ) |
|
1102 { |
|
1103 FUNC_LOG; |
|
1104 |
|
1105 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1106 } |
|
1107 |
|
1108 |
|
1109 // --------------------------------------------------------------------------- |
|
1110 // CMRRecordingGc::BitBlt |
|
1111 // From class CWindowGc |
|
1112 // --------------------------------------------------------------------------- |
|
1113 // |
|
1114 void CMRRecordingGc::BitBlt( |
|
1115 const TPoint& /*aDestination*/, |
|
1116 const CWsBitmap* /*aBitmap*/, |
|
1117 const TRect& /*aSource*/ ) |
|
1118 { |
|
1119 FUNC_LOG; |
|
1120 |
|
1121 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1122 } |
|
1123 |
|
1124 |
|
1125 // --------------------------------------------------------------------------- |
|
1126 // CMRRecordingGc::BitBltMasked |
|
1127 // From class CWindowGc |
|
1128 // --------------------------------------------------------------------------- |
|
1129 // |
|
1130 void CMRRecordingGc::BitBltMasked( |
|
1131 const TPoint& /*aPoint*/, |
|
1132 const CWsBitmap* /*aBitmap*/, |
|
1133 const TRect& /*aSourceRect*/, |
|
1134 const CWsBitmap* /*aMaskBitmap*/, |
|
1135 TBool /*aInvertMask*/ ) |
|
1136 { |
|
1137 FUNC_LOG; |
|
1138 |
|
1139 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1140 } |
|
1141 |
|
1142 |
|
1143 // --------------------------------------------------------------------------- |
|
1144 // CMRRecordingGc::MapColors |
|
1145 // From class CWindowGc |
|
1146 // --------------------------------------------------------------------------- |
|
1147 // |
|
1148 void CMRRecordingGc::MapColors( |
|
1149 const TRect& /*aRect*/, |
|
1150 const TRgb* /*aColors*/, |
|
1151 TInt /*aNumPairs*/, |
|
1152 TBool /*aMapForwards*/ ) |
|
1153 { |
|
1154 FUNC_LOG; |
|
1155 |
|
1156 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1157 } |
|
1158 |
|
1159 |
|
1160 // --------------------------------------------------------------------------- |
|
1161 // CMRRecordingGc::DrawTextVertical |
|
1162 // From class CWindowGc |
|
1163 // --------------------------------------------------------------------------- |
|
1164 // |
|
1165 void CMRRecordingGc::DrawTextVertical( |
|
1166 const TDesC& /*aText*/, |
|
1167 const TPoint& /*aPos*/, |
|
1168 TBool /*aUp*/ ) |
|
1169 { |
|
1170 FUNC_LOG; |
|
1171 |
|
1172 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1173 } |
|
1174 |
|
1175 |
|
1176 // --------------------------------------------------------------------------- |
|
1177 // CMRRecordingGc::DrawTextVertical |
|
1178 // From class CWindowGc |
|
1179 // --------------------------------------------------------------------------- |
|
1180 // |
|
1181 void CMRRecordingGc::DrawTextVertical( |
|
1182 const TDesC& /*aText*/, |
|
1183 const TRect& /*aBox*/, |
|
1184 TInt /*aBaselineOffset*/, |
|
1185 TBool /*aUp*/, |
|
1186 TTextAlign /*aVert*/, |
|
1187 TInt /*aMargin*/ ) |
|
1188 { |
|
1189 FUNC_LOG; |
|
1190 |
|
1191 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1192 } |
|
1193 |
|
1194 |
|
1195 // --------------------------------------------------------------------------- |
|
1196 // CMRRecordingGc::SetDitherOrigin |
|
1197 // From class CWindowGc |
|
1198 // --------------------------------------------------------------------------- |
|
1199 // |
|
1200 void CMRRecordingGc::SetDitherOrigin( const TPoint& /*aPoint*/ ) |
|
1201 { |
|
1202 FUNC_LOG; |
|
1203 |
|
1204 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1205 } |
|
1206 |
|
1207 |
|
1208 // --------------------------------------------------------------------------- |
|
1209 // CMRRecordingGc::CancelClippingRegion |
|
1210 // From class CWindowGc |
|
1211 // --------------------------------------------------------------------------- |
|
1212 // |
|
1213 void CMRRecordingGc::CancelClippingRegion() |
|
1214 { |
|
1215 FUNC_LOG; |
|
1216 |
|
1217 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1218 } |
|
1219 |
|
1220 |
|
1221 // --------------------------------------------------------------------------- |
|
1222 // CMRRecordingGc::SetOpaque |
|
1223 // From class CWindowGc |
|
1224 // --------------------------------------------------------------------------- |
|
1225 // |
|
1226 void CMRRecordingGc::SetOpaque( TBool /*aDrawOpaque*/ ) |
|
1227 { |
|
1228 FUNC_LOG; |
|
1229 } |
|
1230 |
|
1231 |
|
1232 // --------------------------------------------------------------------------- |
|
1233 // CMRRecordingGc::SetFaded |
|
1234 // From class CWindowGc |
|
1235 // --------------------------------------------------------------------------- |
|
1236 // |
|
1237 void CMRRecordingGc::SetFaded( TBool /*aFaded*/ ) |
|
1238 { |
|
1239 FUNC_LOG; |
|
1240 |
|
1241 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1242 } |
|
1243 |
|
1244 |
|
1245 // --------------------------------------------------------------------------- |
|
1246 // CMRRecordingGc::SetFadingParameters |
|
1247 // From class CWindowGc |
|
1248 // --------------------------------------------------------------------------- |
|
1249 // |
|
1250 void CMRRecordingGc::SetFadingParameters( |
|
1251 TUint8 /*aBlackMap*/, |
|
1252 TUint8 /*aWhiteMap*/ ) |
|
1253 { |
|
1254 FUNC_LOG; |
|
1255 |
|
1256 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1257 } |
|
1258 |
|
1259 |
|
1260 // --------------------------------------------------------------------------- |
|
1261 // CMRRecordingGc::AlphaBlendBitmaps |
|
1262 // From class CWindowGc |
|
1263 // --------------------------------------------------------------------------- |
|
1264 // |
|
1265 TInt CMRRecordingGc::AlphaBlendBitmaps( |
|
1266 const TPoint& /*aDestPt*/, |
|
1267 const CFbsBitmap* /*aSrcBmp*/, |
|
1268 const TRect& /*aSrcRect*/, |
|
1269 const CFbsBitmap* /*aAlphaBmp*/, |
|
1270 const TPoint& /*aAlphaPt*/ ) |
|
1271 { |
|
1272 FUNC_LOG; |
|
1273 |
|
1274 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1275 |
|
1276 return KErrNotSupported; |
|
1277 } |
|
1278 |
|
1279 |
|
1280 // --------------------------------------------------------------------------- |
|
1281 // CMRRecordingGc::AlphaBlendBitmaps |
|
1282 // From class CWindowGc |
|
1283 // --------------------------------------------------------------------------- |
|
1284 // |
|
1285 TInt CMRRecordingGc::AlphaBlendBitmaps( |
|
1286 const TPoint& /*aDestPt*/, |
|
1287 const CWsBitmap* /*aSrcBmp*/, |
|
1288 const TRect& /*aSrcRect*/, |
|
1289 const CWsBitmap* /*aAlphaBmp*/, |
|
1290 const TPoint& /*aAlphaPt*/ ) |
|
1291 { |
|
1292 FUNC_LOG; |
|
1293 |
|
1294 __ASSERT_DEBUG( EFalse, Panic( ENotSupported ) ); |
|
1295 |
|
1296 return KErrNotSupported; |
|
1297 } |
|
1298 |
|
1299 |
|
1300 // --------------------------------------------------------------------------- |
|
1301 // CMRRecordingGc::Interface |
|
1302 // From class CWindowGc |
|
1303 // --------------------------------------------------------------------------- |
|
1304 // |
|
1305 TAny* CMRRecordingGc::Interface( TUid /*aInterfaceId*/ ) |
|
1306 { |
|
1307 FUNC_LOG; |
|
1308 |
|
1309 return NULL; |
|
1310 } |
|
1311 |
|
1312 |
|
1313 // --------------------------------------------------------------------------- |
|
1314 // CMRRecordingGc::Interface |
|
1315 // From class CWindowGc |
|
1316 // --------------------------------------------------------------------------- |
|
1317 // |
|
1318 const TAny* CMRRecordingGc::Interface( TUid /*aInterfaceId*/ ) const |
|
1319 { |
|
1320 FUNC_LOG; |
|
1321 |
|
1322 return NULL; |
|
1323 } |
|
1324 |
|
1325 |
|
1326 // --------------------------------------------------------------------------- |
|
1327 // CMRRecordingGc::APIExtension |
|
1328 // From class CWindowGc |
|
1329 // --------------------------------------------------------------------------- |
|
1330 // |
|
1331 TInt CMRRecordingGc::APIExtension( |
|
1332 TUid aUid, |
|
1333 TAny*& /*aOutput*/, |
|
1334 TAny* aInput ) |
|
1335 { |
|
1336 FUNC_LOG; |
|
1337 |
|
1338 if (aUid == KDrawTextInContextUid) |
|
1339 { |
|
1340 __ASSERT_DEBUG( aInput, Panic( EBadArgument ) ); |
|
1341 TDrawTextInContextInternal* contextParam = |
|
1342 static_cast<TDrawTextInContextInternal*>(aInput); |
|
1343 const TTextParameters* params = &contextParam->iParam; |
|
1344 __ASSERT_DEBUG( params, Panic( EBadArgument ) ); |
|
1345 TPtrC textToDraw = contextParam->iText.Mid( |
|
1346 params->iStart, |
|
1347 params->iEnd - params->iStart ); |
|
1348 DrawText( textToDraw, contextParam->iPosition ); |
|
1349 return KErrNone; |
|
1350 } |
|
1351 else |
|
1352 { |
|
1353 return KErrNotSupported; |
|
1354 } |
|
1355 } |