|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "TAnimDraw.h" |
|
17 |
|
18 GLREF_C void DoDraw(TInt aDraw,CBitmapContext& aGc,TRgb aColor,TRect aRect,CFbsFont *aFont,TInt aTextVal) |
|
19 { |
|
20 switch (aDraw) |
|
21 { |
|
22 case 36: |
|
23 { |
|
24 aGc.Clear(); |
|
25 aGc.SetPenSize(TSize(15,15)); |
|
26 aGc.SetPenColor(aColor); |
|
27 aGc.DrawLine(TPoint(aRect.iTl),TPoint(aRect.iBr)); |
|
28 break; |
|
29 } |
|
30 case 37: |
|
31 { |
|
32 TBuf<3> buf; |
|
33 buf.Format(_L("%d"), aTextVal); |
|
34 aGc.Clear(); |
|
35 aGc.SetDrawMode(CGraphicsContext::EDrawModePEN); |
|
36 aGc.SetPenStyle(CGraphicsContext::ESolidPen); |
|
37 aGc.SetPenSize(TSize(1,1)); |
|
38 aGc.SetPenColor(aColor); |
|
39 aGc.UseFont(aFont); |
|
40 TInt drawHeight=aFont->AscentInPixels(); |
|
41 aRect.iTl.iY=aRect.iBr.iY/3; |
|
42 aGc.DrawText(buf,aRect,drawHeight,CGraphicsContext::ECenter); |
|
43 break; |
|
44 } |
|
45 default:; |
|
46 } |
|
47 } |