1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/TRegion.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
1.4 +// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @test
1.22 + @internalComponent - Internal Symbian test code
1.23 +*/
1.24 +
1.25 +#ifndef __TREGION_H__
1.26 +#define __TREGION_H__
1.27 +
1.28 +#include <e32std.h>
1.29 +#include <w32std.h>
1.30 +#include "../tlib/testbase.h"
1.31 +#include "AUTO.H"
1.32 +#include <bitstd.h>
1.33 +#include "TGraphicsHarness.h"
1.34 +
1.35 +class CTRegion : public CTWsGraphicsBase
1.36 + {
1.37 +public:
1.38 + CTRegion(CTestStep* aStep);
1.39 + ~CTRegion();
1.40 + void ConstructL();
1.41 +
1.42 +protected:
1.43 + virtual void RunTestCaseL(TInt aCurTestCase);
1.44 +
1.45 +private:
1.46 + void DrawNonClippedSample1(CTWin *aDrawable, const TPoint &aOrigin);
1.47 + void DrawNonClippedSample1(CTWin *aDrawable, const TRegion &aRegion, const TPoint &aOrigin);
1.48 + void DrawClippedSample1(TestWindow *aDrawable, const TRegion &aRegion, const TRect &aClippingRect, const TPoint &aOrigin);
1.49 + void DrawNonClippedSample2(CTWin *aDrawable, const TPoint &aOrigin);
1.50 + void DrawNonClippedSample2(CTWin *aDrawable, const TRegion &aRegion, const TPoint &aOrigin);
1.51 + void DrawClippedSample2(TestWindow *aDrawable, const TRegion &aRegion, const TRect &aClippingRect, const TPoint &aOrigin);
1.52 + void DrawClippedSample3(CBitmapContext &aGc);
1.53 + void DrawNonClippedSample1(CBitmapContext &aGc);
1.54 + void DrawClippedSample1(CBitmapContext &aGc);
1.55 + void DrawNonClippedSample2(CBitmapContext &aGc, CFont *aFont);
1.56 + void DrawClippedSample2(CBitmapContext &aGc, CFont *aFont);
1.57 + void TestRegionL(const TRegion &aClippingRegion, const TRect &aClippingRect, const TPoint &aOrigin);
1.58 + void ScrollBugL();
1.59 + void ExposeTestL();
1.60 + void ExposeTest2L();
1.61 + void CoverTestL();
1.62 + void OffsetTestL();
1.63 + void ClipTestL();
1.64 + void CreateChildWindowsL();
1.65 + void DeleteChildWindows();
1.66 + void ClearBitmapAndWindows();
1.67 + void CompareRectsL(TPoint aTl1,TPoint aTl2,TSize aSize);
1.68 +
1.69 +private:
1.70 + CFbsFont *iFont;
1.71 + CFbsFont *iBitFont;
1.72 + CFbsBitmap iPicture;
1.73 + CFbsBitmapDevice *iBitmapDevice;
1.74 + CWsBitmap *iBitmap;
1.75 + CFbsBitGc *iBitGc;
1.76 + TSize iDrawableSize;
1.77 + CBlankWindow *iBaseChildWin;
1.78 + CBlankWindow *iTestChildWin;
1.79 + };
1.80 +
1.81 +class CTRegionStep : public CTGraphicsStep
1.82 + {
1.83 +public:
1.84 + CTRegionStep();
1.85 +protected:
1.86 + //from CTGraphicsStep
1.87 + virtual CTGraphicsBase* CreateTestL();
1.88 + };
1.89 +
1.90 +_LIT(KTRegionStep,"TRegion");
1.91 +
1.92 +
1.93 +#endif