Update contrib.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This test application is used to test how the scaling works with CFbsBitGc drawing methods.
18 #ifndef __TBITGDISCALING_H__
19 #define __TBITGDISCALING_H__
22 #include "TGraphicsHarness.h"
24 class CTBitgdiScaling : public CTGraphicsBase
27 CTBitgdiScaling(CTestStep* aStep);
31 virtual void RunTestCaseL(TInt aCurTestCase);
34 TInt CreateScreenDeviceAndContextL(TDisplayMode aDisplayMode,
35 CFbsScreenDevice*& aScreenDevice,
36 CFbsBitGc*& aGraphicsContext);
37 void ChangeScreenDeviceL();
38 void FontScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
39 void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
40 void BitBltMaskedScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
41 void DrawingScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
42 void MapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
43 void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext,
44 CFbsScreenDevice* aScreenDevice2, CFbsBitGc* aGraphicsContext2,
45 TBool aCallGetch = EFalse);
47 void DrawTestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont* aFont);
48 void DrawArc(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
49 void DrawPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
50 void DrawRoundRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
51 void DrawPolyLineL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
52 void DrawPolyLineNoEndPointL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
53 void DrawPolygonL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
54 void DrawEllipse(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
55 void DrawLine(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
56 void DrawRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
57 void ShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
59 void TestDrawBitmapL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
60 void TestClear(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
61 void TestBitbltL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
62 void TestArcPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
63 void TestPolyL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
64 void TestEllipseLineRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
65 void TestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
66 void TestTextVertical(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
67 void TestMapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
68 void TestShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
69 void TestMove(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
70 void TestEllipseRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
71 void TestDrawBitmapNegL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
72 void TestMapColorsZero(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
75 CFbsScreenDevice* iScreenDevice;
76 CFbsBitGc* iGraphicsContext;
77 CFbsScreenDevice* iScreenDevice2;
78 CFbsBitGc* iGraphicsContext2;
81 class CTBitgdiScalingStep : public CTGraphicsStep
84 CTBitgdiScalingStep();
85 inline TDisplayMode DisplayMode() const;
88 virtual CTGraphicsBase* CreateTestL();
89 virtual void TestSetupL();
91 TDisplayMode GetDisplayModeL();
93 TDisplayMode iDisplayMode;
97 inline TDisplayMode CTBitgdiScalingStep::DisplayMode() const
103 _LIT(KTBitgdiScalingStep,"TBitgdiScaling");