windowing/windowserver/tauto/TRegion.H
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20 */
       
    21 
       
    22 #ifndef __TREGION_H__
       
    23 #define __TREGION_H__
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <w32std.h>
       
    27 #include "../tlib/testbase.h"
       
    28 #include "AUTO.H"
       
    29 #include <bitstd.h>
       
    30 #include "TGraphicsHarness.h"
       
    31 
       
    32 class CTRegion : public CTWsGraphicsBase
       
    33 	{
       
    34 public:
       
    35 	CTRegion(CTestStep* aStep);
       
    36 	~CTRegion();
       
    37 	void ConstructL();
       
    38 
       
    39 protected:
       
    40 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    41 	
       
    42 private:
       
    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);
       
    55 	void ScrollBugL();
       
    56 	void ExposeTestL();
       
    57 	void ExposeTest2L();
       
    58 	void CoverTestL();
       
    59 	void OffsetTestL();
       
    60 	void ClipTestL();
       
    61 	void CreateChildWindowsL();
       
    62 	void DeleteChildWindows();
       
    63 	void ClearBitmapAndWindows();
       
    64 	void CompareRectsL(TPoint aTl1,TPoint aTl2,TSize aSize);
       
    65 
       
    66 private:
       
    67 	CFbsFont *iFont;
       
    68 	CFbsFont *iBitFont;
       
    69 	CFbsBitmap iPicture;
       
    70 	CFbsBitmapDevice *iBitmapDevice;
       
    71 	CWsBitmap *iBitmap;
       
    72 	CFbsBitGc *iBitGc;
       
    73 	TSize iDrawableSize;
       
    74 	CBlankWindow *iBaseChildWin;
       
    75 	CBlankWindow *iTestChildWin;
       
    76 	};
       
    77 
       
    78 class CTRegionStep : public CTGraphicsStep
       
    79 	{
       
    80 public:
       
    81 	CTRegionStep();
       
    82 protected:	
       
    83 	//from CTGraphicsStep
       
    84 	virtual CTGraphicsBase* CreateTestL();
       
    85 	};
       
    86 
       
    87 _LIT(KTRegionStep,"TRegion");
       
    88 
       
    89 
       
    90 #endif