Update contrib.
1 // Copyright (c) 2004-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.
16 #ifndef __TALPHABLEND_H__
17 #define __TALPHABLEND_H__
20 #include "TGraphicsHarness.h"
23 class CTAlphaBlending : public CTGraphicsBase
26 CTAlphaBlending(CTestStep* aStep);
31 virtual void RunTestCaseL(TInt aCurTestCase);
34 TInt CreateScreenDevice(TDisplayMode aDisplayMode, CFbsBitGc::TGraphicsOrientation aOrientation=CFbsBitGc::EGraphicsOrientationNormal);
35 void DeleteScreenDevice();
36 void DeleteGraphicsContext();
38 void TestAlphaBlendingL();
39 void DoAlphaBlendingTestsL(const TPoint& aOrigin,
40 const TPoint& aDestPt,
42 const TPoint& aScrPt2,
43 const TPoint& aAlphaPt);
44 void DoAlphaBlendingTestL(CFbsBitmap* aScreenBmp,
45 const CFbsBitmap* aSrcBmp,
46 const CFbsBitmap* aAlphaBmp,
47 const TPoint& aDestPt,
49 const TPoint& aSrcPt2,
50 const TPoint& aAlphaPt);
52 void CreateAlphaBlendingBitmapsLC(CFbsBitmap*& aScreenBmp,
54 CFbsBitmap*& aAlphaBmp,
56 void DestroyAlphaBlendingBitmaps(CFbsBitmap*& aScreenBmp,
58 CFbsBitmap*& aAlphaBmp);
60 void DoDrawBitmapTestL(TDisplayMode aTestDisplayMode);
61 void DoDrawBitmapTestsL();
62 void TestAlphaBlending2L();
64 void TestAlphaBlendCorrect(TDisplayMode aScreenMode, TDisplayMode aBitmapMode);
65 void TestAlphaBlendingPlotL();
66 TUint32 GetRawPixel(CFbsBitmap* aBitmap, TPoint aPos);
69 CFbsScreenDevice* iDevice;
75 class CTAlphaBlendingStep : public CTGraphicsStep
78 CTAlphaBlendingStep();
81 virtual CTGraphicsBase* CreateTestL();
82 virtual void TestSetupL();
85 _LIT(KTAlphaBlendingStep,"TAlphaBlending");