os/graphics/graphicstest/graphicstestharness/textendedbitmapgc/textendedbitmapgc.h
Update contrib.
1 // Copyright (c) 2008-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.
21 @internalComponent - Internal Symbian test code
24 #ifndef TEXTENDEDBITMAPGC_H
25 #define TEXTENDEDBITMAPGC_H
27 #include <test/testexecutestepbase.h>
28 #include <test/testharnesscallback.h>
31 /** Test class for testing the operation of extended bitmaps with different graphics
32 contexts. Creators of this test class must provide a pointer to a MTestHarnessCallBack object
33 and a CBitmapContext. The MTestHarnessCallBack callback object allows CTExtendedBitmapGc to
34 pass logging and test status operations back to the creator. All drawing operations that this
35 test class performs are drawn to the supplied CBitmapContext object.
37 class CTExtendedBitmapGc : public CBase
40 /** Stripe styles that are supported by the example bitmap example rasterizer, note that only
41 vertical and horizontal stripes are supported
49 /** Defines whether this class should draw extended bitmaps as flags, or as plain white
50 rectangles. EDrawFlag should be used when testing with BitGdi where the example rasterizer
51 is available, or when testing with WServ where the example extended bitmap render stage is
52 available. Otherwise EDrawWhite should be used. It is up to the creator of CTExtendedBitmapGc
53 to decide which draw mode should be used.
62 IMPORT_C static CTExtendedBitmapGc* NewL(MTestHarnessCallBack* aCallBack, CBitmapContext& aGc, TDrawMode aDrawMode, TDisplayMode aDisplayMode);
63 IMPORT_C ~CTExtendedBitmapGc();
64 IMPORT_C void RunTestCaseL(TInt aCurTestCase);
67 IMPORT_C static void WriteExtendedBitmapInfoL(TUint8* aData,
69 const TRgb* aColorArray,
70 TStripeStyle aStripeStyle);
74 CTExtendedBitmapGc(MTestHarnessCallBack* aCallBack, CBitmapContext& aGc, TDrawMode aDrawMode);
75 void ConstructL(TDisplayMode aDisplayMode);
78 void TestBitmapDrawingL(TBool aTestRegionOfInterest, TStripeStyle aStripeStyle, TInt aCaseNumber);
79 void TestBrushPatternL(TInt aCaseNumber);
82 void CreateTestBitmapLC(CFbsBitmap*& aBmpRet,
84 TDisplayMode aDisplayMode,
88 TStripeStyle aStripeStyle);
90 CTestExecuteLogger& Logger() {return iCallBack->Logger();}
93 MTestHarnessCallBack* iCallBack;
95 TDisplayMode iDisplayMode;
101 #endif // TEXTENDEDBITMAPGC_H