os/graphics/graphicsdeviceinterface/bitgdi/tbit/TAlphaBlend.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/bitgdi/tbit/TAlphaBlend.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,88 @@
     1.4 +// Copyright (c) 2004-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 +#ifndef __TALPHABLEND_H__
    1.20 +#define __TALPHABLEND_H__
    1.21 +
    1.22 +#include <bitdev.h>
    1.23 +#include "TGraphicsHarness.h"
    1.24 +
    1.25 +
    1.26 +class CTAlphaBlending : public CTGraphicsBase
    1.27 +	{
    1.28 +public:
    1.29 +	CTAlphaBlending(CTestStep* aStep);
    1.30 +	~CTAlphaBlending();
    1.31 +
    1.32 +protected:
    1.33 +//from 	CTGraphicsStep
    1.34 +	virtual void RunTestCaseL(TInt aCurTestCase);
    1.35 +
    1.36 +private:
    1.37 +	TInt CreateScreenDevice(TDisplayMode aDisplayMode, CFbsBitGc::TGraphicsOrientation aOrientation=CFbsBitGc::EGraphicsOrientationNormal);
    1.38 +	void DeleteScreenDevice();
    1.39 +	void DeleteGraphicsContext();
    1.40 +
    1.41 +	void TestAlphaBlendingL();
    1.42 +	void DoAlphaBlendingTestsL(const TPoint& aOrigin,
    1.43 +							   const TPoint& aDestPt, 
    1.44 +							   const TRect& aSrcRc1, 
    1.45 +							   const TPoint& aScrPt2,
    1.46 +							   const TPoint& aAlphaPt);
    1.47 +	void DoAlphaBlendingTestL(CFbsBitmap* aScreenBmp, 
    1.48 +							  const CFbsBitmap* aSrcBmp, 
    1.49 +							  const CFbsBitmap* aAlphaBmp,
    1.50 +							  const TPoint& aDestPt, 
    1.51 +							  const TRect& aSrcRc1, 
    1.52 +							  const TPoint& aSrcPt2,
    1.53 +							  const TPoint& aAlphaPt);
    1.54 +
    1.55 +	void CreateAlphaBlendingBitmapsLC(CFbsBitmap*& aScreenBmp, 
    1.56 +									  CFbsBitmap*& aSrcBmp, 
    1.57 +									  CFbsBitmap*& aAlphaBmp,
    1.58 +									  TDisplayMode aMode);
    1.59 +	void DestroyAlphaBlendingBitmaps(CFbsBitmap*& aScreenBmp, 
    1.60 +									 CFbsBitmap*& aSrcBmp, 
    1.61 +									 CFbsBitmap*& aAlphaBmp);
    1.62 +
    1.63 +	void DoDrawBitmapTestL(TDisplayMode aTestDisplayMode);
    1.64 +	void DoDrawBitmapTestsL();
    1.65 +	void TestAlphaBlending2L();
    1.66 +
    1.67 +	void TestAlphaBlendCorrect(TDisplayMode aScreenMode, TDisplayMode aBitmapMode);
    1.68 +	void TestAlphaBlendingPlotL();
    1.69 +	TUint32 GetRawPixel(CFbsBitmap* aBitmap, TPoint aPos);
    1.70 +
    1.71 +private:
    1.72 +	CFbsScreenDevice* iDevice;
    1.73 +	CFbsBitGc* iGc;
    1.74 +	};
    1.75 +
    1.76 +
    1.77 +
    1.78 +class CTAlphaBlendingStep : public CTGraphicsStep
    1.79 +	{
    1.80 +public:
    1.81 +	CTAlphaBlendingStep();
    1.82 +protected:	
    1.83 +	//from CTGraphicsStep
    1.84 +	virtual CTGraphicsBase* CreateTestL();
    1.85 +	virtual void TestSetupL();
    1.86 +	};
    1.87 +
    1.88 +_LIT(KTAlphaBlendingStep,"TAlphaBlending");
    1.89 +
    1.90 +
    1.91 +#endif