sl@0
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// This test application is used to test how the scaling works with CFbsBitGc drawing methods.
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef __TBITGDISCALING_H__
|
sl@0
|
19 |
#define __TBITGDISCALING_H__
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <bitdev.h>
|
sl@0
|
22 |
#include "TGraphicsHarness.h"
|
sl@0
|
23 |
|
sl@0
|
24 |
class CTBitgdiScaling : public CTGraphicsBase
|
sl@0
|
25 |
{
|
sl@0
|
26 |
public:
|
sl@0
|
27 |
CTBitgdiScaling(CTestStep* aStep);
|
sl@0
|
28 |
~CTBitgdiScaling();
|
sl@0
|
29 |
protected:
|
sl@0
|
30 |
//from CTGraphicsStep
|
sl@0
|
31 |
virtual void RunTestCaseL(TInt aCurTestCase);
|
sl@0
|
32 |
void ConstructL();
|
sl@0
|
33 |
|
sl@0
|
34 |
TInt CreateScreenDeviceAndContextL(TDisplayMode aDisplayMode,
|
sl@0
|
35 |
CFbsScreenDevice*& aScreenDevice,
|
sl@0
|
36 |
CFbsBitGc*& aGraphicsContext);
|
sl@0
|
37 |
void ChangeScreenDeviceL();
|
sl@0
|
38 |
void FontScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
39 |
void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
40 |
void BitBltMaskedScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
41 |
void DrawingScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
42 |
void MapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
43 |
void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext,
|
sl@0
|
44 |
CFbsScreenDevice* aScreenDevice2, CFbsBitGc* aGraphicsContext2,
|
sl@0
|
45 |
TBool aCallGetch = EFalse);
|
sl@0
|
46 |
void RunTests2L();
|
sl@0
|
47 |
void DrawTestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont* aFont);
|
sl@0
|
48 |
void DrawArc(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
49 |
void DrawPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
50 |
void DrawRoundRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
51 |
void DrawPolyLineL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
52 |
void DrawPolyLineNoEndPointL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
53 |
void DrawPolygonL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
54 |
void DrawEllipse(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
55 |
void DrawLine(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
56 |
void DrawRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
57 |
void ShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
58 |
|
sl@0
|
59 |
void TestDrawBitmapL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
60 |
void TestClear(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
61 |
void TestBitbltL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
62 |
void TestArcPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
63 |
void TestPolyL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
64 |
void TestEllipseLineRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
65 |
void TestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
|
sl@0
|
66 |
void TestTextVertical(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
|
sl@0
|
67 |
void TestMapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
68 |
void TestShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
69 |
void TestMove(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
70 |
void TestEllipseRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
71 |
void TestDrawBitmapNegL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
72 |
void TestMapColorsZero(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
|
sl@0
|
73 |
|
sl@0
|
74 |
private:
|
sl@0
|
75 |
CFbsScreenDevice* iScreenDevice;
|
sl@0
|
76 |
CFbsBitGc* iGraphicsContext;
|
sl@0
|
77 |
CFbsScreenDevice* iScreenDevice2;
|
sl@0
|
78 |
CFbsBitGc* iGraphicsContext2;
|
sl@0
|
79 |
};
|
sl@0
|
80 |
|
sl@0
|
81 |
class CTBitgdiScalingStep : public CTGraphicsStep
|
sl@0
|
82 |
{
|
sl@0
|
83 |
public:
|
sl@0
|
84 |
CTBitgdiScalingStep();
|
sl@0
|
85 |
inline TDisplayMode DisplayMode() const;
|
sl@0
|
86 |
protected:
|
sl@0
|
87 |
//from CTGraphicsStep
|
sl@0
|
88 |
virtual CTGraphicsBase* CreateTestL();
|
sl@0
|
89 |
virtual void TestSetupL();
|
sl@0
|
90 |
private:
|
sl@0
|
91 |
TDisplayMode GetDisplayModeL();
|
sl@0
|
92 |
private:
|
sl@0
|
93 |
TDisplayMode iDisplayMode;
|
sl@0
|
94 |
};
|
sl@0
|
95 |
|
sl@0
|
96 |
|
sl@0
|
97 |
inline TDisplayMode CTBitgdiScalingStep::DisplayMode() const
|
sl@0
|
98 |
{
|
sl@0
|
99 |
return iDisplayMode;
|
sl@0
|
100 |
}
|
sl@0
|
101 |
|
sl@0
|
102 |
|
sl@0
|
103 |
_LIT(KTBitgdiScalingStep,"TBitgdiScaling");
|
sl@0
|
104 |
|
sl@0
|
105 |
|
sl@0
|
106 |
#endif
|