os/graphics/graphicsdeviceinterface/bitgdi/tbit/TBitgdiScaling.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/bitgdi/tbit/TBitgdiScaling.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,106 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// This test application is used to test how the scaling works with CFbsBitGc drawing methods.
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __TBITGDISCALING_H__
    1.22 +#define __TBITGDISCALING_H__
    1.23 +
    1.24 +#include <bitdev.h>
    1.25 +#include "TGraphicsHarness.h"
    1.26 +
    1.27 +class CTBitgdiScaling : public CTGraphicsBase
    1.28 +	{
    1.29 +public:
    1.30 +	CTBitgdiScaling(CTestStep* aStep);
    1.31 +	~CTBitgdiScaling();
    1.32 +protected:
    1.33 +//from 	CTGraphicsStep
    1.34 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.35 +	void ConstructL();
    1.36 +
    1.37 +	TInt CreateScreenDeviceAndContextL(TDisplayMode aDisplayMode,
    1.38 +									CFbsScreenDevice*& aScreenDevice,
    1.39 +									CFbsBitGc*& aGraphicsContext);
    1.40 +	void ChangeScreenDeviceL();
    1.41 +	void FontScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.42 +	void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.43 +	void BitBltMaskedScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.44 +	void DrawingScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.45 +	void MapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.46 +	void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, 
    1.47 +						   CFbsScreenDevice* aScreenDevice2, CFbsBitGc* aGraphicsContext2,
    1.48 +						   TBool aCallGetch = EFalse);
    1.49 +	void RunTests2L();
    1.50 +	void DrawTestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont* aFont);
    1.51 +	void DrawArc(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.52 +	void DrawPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.53 +	void DrawRoundRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.54 +	void DrawPolyLineL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.55 +	void DrawPolyLineNoEndPointL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.56 +	void DrawPolygonL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.57 +	void DrawEllipse(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.58 +	void DrawLine(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.59 +	void DrawRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.60 +	void ShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.61 +	
    1.62 +	void TestDrawBitmapL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.63 +	void TestClear(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.64 +	void TestBitbltL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.65 +	void TestArcPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.66 +	void TestPolyL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.67 +	void TestEllipseLineRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.68 +	void TestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
    1.69 +	void TestTextVertical(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
    1.70 +	void TestMapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.71 +	void TestShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.72 +	void TestMove(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.73 +	void TestEllipseRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.74 +	void TestDrawBitmapNegL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.75 +	void TestMapColorsZero(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
    1.76 +        					   
    1.77 +private:
    1.78 +	CFbsScreenDevice* iScreenDevice;
    1.79 +	CFbsBitGc* iGraphicsContext;
    1.80 +	CFbsScreenDevice* iScreenDevice2;
    1.81 +	CFbsBitGc* iGraphicsContext2;
    1.82 +	};
    1.83 +
    1.84 +class CTBitgdiScalingStep : public CTGraphicsStep
    1.85 +	{
    1.86 +public:
    1.87 +	CTBitgdiScalingStep();
    1.88 +	inline TDisplayMode DisplayMode() const;
    1.89 +protected:	
    1.90 +	//from CTGraphicsStep
    1.91 +	virtual CTGraphicsBase* CreateTestL();
    1.92 +	virtual void TestSetupL();
    1.93 +private:
    1.94 +	TDisplayMode GetDisplayModeL();
    1.95 +private:
    1.96 +	TDisplayMode iDisplayMode;	
    1.97 +	};
    1.98 +
    1.99 +
   1.100 +inline TDisplayMode CTBitgdiScalingStep::DisplayMode() const
   1.101 +	{
   1.102 +	return iDisplayMode;
   1.103 +	}
   1.104 +
   1.105 +
   1.106 +_LIT(KTBitgdiScalingStep,"TBitgdiScaling");
   1.107 +
   1.108 +
   1.109 +#endif