|
1 // Copyright (c) 1997-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __TGDI_H__ |
|
17 #define __TGDI_H__ |
|
18 |
|
19 #include <test/ttmsgraphicsstep.h> |
|
20 #ifndef __E32STD_H__ |
|
21 #include <e32std.h> |
|
22 #endif |
|
23 #ifndef __E32TEST_H__ |
|
24 #include <e32test.h> |
|
25 #endif |
|
26 #ifndef __GDI_H__ |
|
27 #include <gdi.h> |
|
28 #endif |
|
29 #ifndef __FBS_H__ |
|
30 #include <fbs.h> |
|
31 #endif |
|
32 #ifndef __BITMAP_H__ |
|
33 #include <bitmap.h> |
|
34 #endif |
|
35 #ifndef __BITSTD_H__ |
|
36 #include <bitstd.h> |
|
37 #endif |
|
38 |
|
39 const TInt KFailureSectionNameBufferLength = 64; |
|
40 |
|
41 class TestGdi : public CTTMSGraphicsStep |
|
42 { |
|
43 public: |
|
44 IMPORT_C TestGdi(); |
|
45 IMPORT_C void Construct(CBitmapDevice* aDevice,CFbsBitGc* aContext,TDes& aFailureSection); |
|
46 IMPORT_C void ConstructL(CBitmapDevice* aDevice,CFbsBitGc* aContext,TDes& aFailureSection); |
|
47 IMPORT_C TBool Test(); |
|
48 private: |
|
49 void DoTestL(); |
|
50 void CheckL(TBool aValue); |
|
51 void Clear(); |
|
52 void ScanAreaL(TInt aX,TInt aY,TInt aLength,TInt aHeight,TRgb aColor); |
|
53 void CheckClearL(); |
|
54 void CheckPlotL(const TPoint& aPoint); |
|
55 void CheckRectInsideL(const TRect& aRect); |
|
56 void CheckRectOutsideL(const TRect& aRect); |
|
57 void CheckQuadInsideL(const TRect& aRect); |
|
58 void CheckQuadOutsideL(const TRect& aRect); |
|
59 void CheckMaskedResultsL(CFbsBitmap* aBgBmp,CFbsBitmap* aSrcBmp,CFbsBitmap* aMaskBmp,TRect& aTarRect,TBool aInvertMask,TBool aAlphaBlend=EFalse,TBool aSemiTransparentMask=EFalse); |
|
60 void DoModeL(); |
|
61 void DoColorL(); |
|
62 void DoLineL(); |
|
63 void DoWideLineL(); |
|
64 void DoArcL(); |
|
65 void DoRectL(); |
|
66 void DoEllipseL(); |
|
67 void DoPieL(); |
|
68 void DoRoundRectL(); |
|
69 void DoPolygonArrayL(); |
|
70 void DoPolygonPtrL(); |
|
71 void DoPolygonPtr0(); |
|
72 void DoText(); |
|
73 void DoPaintL(); |
|
74 void DoCopyL(); |
|
75 void DoBltL(); |
|
76 void DoBltMaskedL(); |
|
77 void DoShadowL(); |
|
78 void DoFadeL(); |
|
79 void DoDrawBitmapMaskedL(TBool aColorMask); |
|
80 void DoBltCompressedL(); |
|
81 void DoDrawBitmapSemiTransparentMaskedL(); |
|
82 void FillBitmap(CFbsBitmap* aBitmap, TRgb aRgb); |
|
83 TVerdict doTestStepL(){return TestStepResult();}; |
|
84 void DoBoxTextVertical(); |
|
85 private: |
|
86 CBitmapDevice* iDev; |
|
87 CFbsBitGc* iCon; |
|
88 CFbsBitmap iBitmap; |
|
89 CFbsBitmap iBitmap2; |
|
90 TInt iBitmapWidth; |
|
91 TInt iBitmapHeight; |
|
92 TSize iSize; |
|
93 TRect iRect; |
|
94 TRect iZeroRect; |
|
95 TRect iUnitRect; |
|
96 TRect iUnNormRect; |
|
97 TRect iLargeRect; |
|
98 TRect iCentredRect; |
|
99 TRect iOffScreenRects[8]; |
|
100 TDes* iSection; |
|
101 }; |
|
102 |
|
103 #endif |