graphicsdeviceinterface/directgdi/test/tglyphimagecache.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2007-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 __TGLYPHIMAGECACHE_H__
       
    23 #define __TGLYPHIMAGECACHE_H__
       
    24 
       
    25 #include "tdirectgdi_test_step_base.h"
       
    26 #include <graphics/directgdiextensioninterfaces.h>
       
    27 
       
    28 enum DrawTextDirection
       
    29 	{
       
    30 	EDrawTextHorizontal,
       
    31 	EDrawTextVerticalUp,
       
    32 	EDrawTextVerticalDown,
       
    33 	
       
    34 	EDrawTextLast
       
    35 	};
       
    36 	 
       
    37 enum DrawTextAdjustment
       
    38 	{
       
    39 	EDrawFromPoint,
       
    40 	EDrawInBox,
       
    41 	EDrawRightAlignment,
       
    42 	};
       
    43 
       
    44 class CTGlyphImageCache : public CTDirectGdiStepBase
       
    45 	{
       
    46 public:
       
    47 	CTGlyphImageCache();
       
    48 	~CTGlyphImageCache();
       
    49 	
       
    50 private:
       
    51 	// Main test methods
       
    52  	void TestRetrieveEntryL(MFontGlyphImageStorage* aGlyphStorage, TGlyphBitmapType aGlyphType); 	
       
    53 	void TestDrawGlyphL(MFontGlyphImageStorage* aGlyphStorage, TGlyphBitmapType aGlyphBitmapType, DrawTextDirection aDirection, DrawTextAdjustment aDrawAdjustment, TBool aClipRegion);
       
    54 	void FillUpCacheL(MFontGlyphImageStorage* aGlyphStorage);
       
    55 	void FillCacheL(MFontGlyphImageStorage* aGlyphStorage);
       
    56 	void FontListIdOrderL(MFontGlyphImageStorage* aGlyphStorage);
       
    57 	void WrongParameterL(MFontGlyphImageStorage* aGlyphStorage);
       
    58 
       
    59 	//Supplementary methods 
       
    60 	void DrawText(const TDesC& aText, const TPoint& aPt, DrawTextDirection aDirection, DrawTextAdjustment aDrawAdjustment, TBool aUpdateJustification);
       
    61 	TInt GlyphImageSizeInByte(TGlyphBitmapType aGlyphType, const TSize& aSize) const;
       
    62 	TBool DetectMonotypeFontL();
       
    63 
       
    64 	// From CStepStep
       
    65 	virtual TVerdict doTestStepPreambleL();
       
    66 	virtual TVerdict doTestStepL();	
       
    67 	
       
    68 	// from CTDirectGdiStepBase
       
    69 	void RunTestsL();
       
    70 private:
       
    71 	TBool iMonotypeFont;
       
    72 	};		
       
    73 	
       
    74 _LIT(KTGlyphImageCacheStep, "TDirectGDIGlyphImageCache");
       
    75 
       
    76 #endif