sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "TAnimDraw.h" sl@0: sl@0: GLREF_C void DoDraw(TInt aDraw,CBitmapContext& aGc,TRgb aColor,TRect aRect,CFbsFont *aFont,TInt aTextVal) sl@0: { sl@0: switch (aDraw) sl@0: { sl@0: case 36: sl@0: { sl@0: aGc.Clear(); sl@0: aGc.SetPenSize(TSize(15,15)); sl@0: aGc.SetPenColor(aColor); sl@0: aGc.DrawLine(TPoint(aRect.iTl),TPoint(aRect.iBr)); sl@0: break; sl@0: } sl@0: case 37: sl@0: { sl@0: TBuf<3> buf; sl@0: buf.Format(_L("%d"), aTextVal); sl@0: aGc.Clear(); sl@0: aGc.SetDrawMode(CGraphicsContext::EDrawModePEN); sl@0: aGc.SetPenStyle(CGraphicsContext::ESolidPen); sl@0: aGc.SetPenSize(TSize(1,1)); sl@0: aGc.SetPenColor(aColor); sl@0: aGc.UseFont(aFont); sl@0: TInt drawHeight=aFont->AscentInPixels(); sl@0: aRect.iTl.iY=aRect.iBr.iY/3; sl@0: aGc.DrawText(buf,aRect,drawHeight,CGraphicsContext::ECenter); sl@0: break; sl@0: } sl@0: default:; sl@0: } sl@0: }