First public contribution.
1 // Copyright (c) 1996-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.
19 @internalComponent - Internal Symbian test code
27 #include "../tlib/testbase.h"
30 #include "TGraphicsHarness.h"
32 class CTRegion : public CTWsGraphicsBase
35 CTRegion(CTestStep* aStep);
40 virtual void RunTestCaseL(TInt aCurTestCase);
43 void DrawNonClippedSample1(CTWin *aDrawable, const TPoint &aOrigin);
44 void DrawNonClippedSample1(CTWin *aDrawable, const TRegion &aRegion, const TPoint &aOrigin);
45 void DrawClippedSample1(TestWindow *aDrawable, const TRegion &aRegion, const TRect &aClippingRect, const TPoint &aOrigin);
46 void DrawNonClippedSample2(CTWin *aDrawable, const TPoint &aOrigin);
47 void DrawNonClippedSample2(CTWin *aDrawable, const TRegion &aRegion, const TPoint &aOrigin);
48 void DrawClippedSample2(TestWindow *aDrawable, const TRegion &aRegion, const TRect &aClippingRect, const TPoint &aOrigin);
49 void DrawClippedSample3(CBitmapContext &aGc);
50 void DrawNonClippedSample1(CBitmapContext &aGc);
51 void DrawClippedSample1(CBitmapContext &aGc);
52 void DrawNonClippedSample2(CBitmapContext &aGc, CFont *aFont);
53 void DrawClippedSample2(CBitmapContext &aGc, CFont *aFont);
54 void TestRegionL(const TRegion &aClippingRegion, const TRect &aClippingRect, const TPoint &aOrigin);
61 void CreateChildWindowsL();
62 void DeleteChildWindows();
63 void ClearBitmapAndWindows();
64 void CompareRectsL(TPoint aTl1,TPoint aTl2,TSize aSize);
70 CFbsBitmapDevice *iBitmapDevice;
74 CBlankWindow *iBaseChildWin;
75 CBlankWindow *iTestChildWin;
78 class CTRegionStep : public CTGraphicsStep
84 virtual CTGraphicsBase* CreateTestL();
87 _LIT(KTRegionStep,"TRegion");