diff -r bf7481649c98 -r 7f25ef56562d windowing/windowserver/ttime/TTTEXT.CPP --- a/windowing/windowserver/ttime/TTTEXT.CPP Fri Jun 11 14:58:47 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// LOADSTXT.CPP -// used for timing text printing -// -// - -#include "TTIME.H" - -TInt LoadsOfText(TInt aOwningGroup) - { - RWsSession ws; - ws.Connect(); - CWsScreenDevice *device=new(ELeave) CWsScreenDevice(ws); - device->Construct(); - RWindowGroup group(ws); - group.Construct(ENullWsHandle); - group.SetOwningWindowGroup(aOwningGroup); - TSize scrSize(device->SizeInPixels()); -// - RWindow window(ws); - window.Construct(group,ENullWsHandle); - window.SetExtent(TPoint(), scrSize); - window.Activate(); -// - CWindowGc *gc; - device->CreateContext(gc); - window.BeginRedraw(); - gc->Activate(window); - gc->Clear(); - window.EndRedraw(); - TFontSpec fspec(KTestFontTypefaceName,200); - CFbsFont *font; - User::LeaveIfError(device->GetNearestFontToDesignHeightInTwips((CFont *&)font, fspec)); - gc->UseFont(font); - TBuf<100> loadsatext(_L("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890zyxwvutsrqponmlkjihgfedcba")); - TInt ascent=font->AscentInPixels(); - TInt fheight=font->HeightInPixels(); - for(TInt nTimes=0;nTimes<10;nTimes++) - { - TPoint pos; -// for(pos.iY=ascent;pos.iYHeightInPixels()) -// gc->DrawText(loadsatext,pos); - for(pos.iY=0;pos.iYDrawText(loadsatext,TRect(pos,TPoint(scrSize.iWidth,pos.iY+fheight)),ascent); - gc->Clear(); - } - gc->Deactivate(); -// - ws.Flush(); - delete gc; - device->ReleaseFont(font); - window.Close(); - group.Close(); - delete device; - ws.Close(); - return(KErrNone); - } - -GLDEF_D TTimeTestHeader LoadsaText={_S("Loads of text"),LoadsOfText};