graphicsdeviceinterface/bitgdi/tbit/TBitgdiScaling.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This test application is used to test how the scaling works with CFbsBitGc drawing methods.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __TBITGDISCALING_H__
       
    19 #define __TBITGDISCALING_H__
       
    20 
       
    21 #include <bitdev.h>
       
    22 #include "TGraphicsHarness.h"
       
    23 
       
    24 class CTBitgdiScaling : public CTGraphicsBase
       
    25 	{
       
    26 public:
       
    27 	CTBitgdiScaling(CTestStep* aStep);
       
    28 	~CTBitgdiScaling();
       
    29 protected:
       
    30 //from 	CTGraphicsStep
       
    31 	virtual void RunTestCaseL(TInt aCurTestCase);
       
    32 	void ConstructL();
       
    33 
       
    34 	TInt CreateScreenDeviceAndContextL(TDisplayMode aDisplayMode,
       
    35 									CFbsScreenDevice*& aScreenDevice,
       
    36 									CFbsBitGc*& aGraphicsContext);
       
    37 	void ChangeScreenDeviceL();
       
    38 	void FontScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    39 	void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    40 	void BitBltMaskedScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    41 	void DrawingScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    42 	void MapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    43 	void BitmapScalingL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, 
       
    44 						   CFbsScreenDevice* aScreenDevice2, CFbsBitGc* aGraphicsContext2,
       
    45 						   TBool aCallGetch = EFalse);
       
    46 	void RunTests2L();
       
    47 	void DrawTestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont* aFont);
       
    48 	void DrawArc(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    49 	void DrawPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    50 	void DrawRoundRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    51 	void DrawPolyLineL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    52 	void DrawPolyLineNoEndPointL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    53 	void DrawPolygonL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    54 	void DrawEllipse(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    55 	void DrawLine(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    56 	void DrawRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    57 	void ShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    58 	
       
    59 	void TestDrawBitmapL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    60 	void TestClear(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    61 	void TestBitbltL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    62 	void TestArcPie(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    63 	void TestPolyL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    64 	void TestEllipseLineRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    65 	void TestText(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
       
    66 	void TestTextVertical(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext, CFont*);
       
    67 	void TestMapColors(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    68 	void TestShadowFade(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    69 	void TestMove(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    70 	void TestEllipseRect(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    71 	void TestDrawBitmapNegL(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    72 	void TestMapColorsZero(CFbsScreenDevice* aScreenDevice, CFbsBitGc* aGraphicsContext);
       
    73         					   
       
    74 private:
       
    75 	CFbsScreenDevice* iScreenDevice;
       
    76 	CFbsBitGc* iGraphicsContext;
       
    77 	CFbsScreenDevice* iScreenDevice2;
       
    78 	CFbsBitGc* iGraphicsContext2;
       
    79 	};
       
    80 
       
    81 class CTBitgdiScalingStep : public CTGraphicsStep
       
    82 	{
       
    83 public:
       
    84 	CTBitgdiScalingStep();
       
    85 	inline TDisplayMode DisplayMode() const;
       
    86 protected:	
       
    87 	//from CTGraphicsStep
       
    88 	virtual CTGraphicsBase* CreateTestL();
       
    89 	virtual void TestSetupL();
       
    90 private:
       
    91 	TDisplayMode GetDisplayModeL();
       
    92 private:
       
    93 	TDisplayMode iDisplayMode;	
       
    94 	};
       
    95 
       
    96 
       
    97 inline TDisplayMode CTBitgdiScalingStep::DisplayMode() const
       
    98 	{
       
    99 	return iDisplayMode;
       
   100 	}
       
   101 
       
   102 
       
   103 _LIT(KTBitgdiScalingStep,"TBitgdiScaling");
       
   104 
       
   105 
       
   106 #endif