void CAlfPerfAppAvkonTestCaseBasic::ConstructL( CAlfEnv& aEnv, TInt aCaseId, const TRect& aVisibleArea ) { CAlfPerfAppBaseTestCaseControl::ConstructL( aEnv, aCaseId, aVisibleArea ); iWinRect = aVisibleArea; iAvkonControl = new(ELeave) CAvkonTestCoeControl(); iAvkonControl->ConstructL(iWinRect); iAnimTimer = CPeriodic::NewL(CActive::EPriorityStandard); TFontSpec myFontSpec(_L("Arial"), 3*120); CCoeEnv::Static()->ScreenDevice()->GetNearestFontInTwips(iFont, myFontSpec); // Find my private path TFileName pathWithoutDrive; TFileName driveAndPath; CEikonEnv::Static()->FsSession().PrivatePath( pathWithoutDrive ); driveAndPath.Copy(CEikonEnv::Static()->EikAppUi()->Application()->AppFullName().Left(2)); driveAndPath.Append(pathWithoutDrive); // Create pictures iPictureBm = new(ELeave) CFbsBitmap; driveAndPath.Append(_L("alfperfapp_test1.mbm")); User::LeaveIfError(iPictureBm->Load(driveAndPath)); iMaskBm = new(ELeave) CFbsBitmap; User::LeaveIfError(iMaskBm->Create(iPictureBm->SizeInPixels(), EGray256)); iTestCaseStartTime_ys.UniversalTime(); iTestCaseFrameCount = 0; }
CFont* ScrShotsGenUtils::InitFontL(TInt aFontSize) { CFont* font = NULL; _LIT( KMyFontName,"Swiss") ; const TInt KMyFontHeightInTwips = aFontSize ; TFontSpec myFontSpec( KMyFontName, KMyFontHeightInTwips ) ; CEikonEnv::Static()->ScreenDevice()->GetNearestFontInPixels(font, myFontSpec); return font; }