os/graphics/graphicsdeviceinterface/gdi/inc/ShapeInfo.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2005-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 #ifndef SHAPEINFO_H_
    17 #define SHAPEINFO_H_
    18 
    19 #include <e32cmn.h>
    20 
    21 class CFont;
    22 class TDesC16;
    23 class TShapeHeader;
    24 
    25 /** Holds shaping information for text that requires it (for example Indic
    26 text).
    27 @publishedAll
    28 @released
    29 */
    30 class RShapeInfo
    31 	{
    32 public:
    33 	struct TPoint16
    34 		{
    35 		TInt16 iX;
    36 		TInt16 iY;
    37 		};
    38 	IMPORT_C RShapeInfo();
    39 	TInt Open(const CFont* aFont, const TDesC16& aText,
    40 		TInt aStartOfTextToShape, TInt aEndOfTextToShape,
    41 		TInt aScriptCode, TInt aLanguageCode);
    42 	IMPORT_C void Close();
    43 	TInt GlyphCount() const;
    44 	const TInt32* Glyphs() const;
    45 	const TPoint16* GlyphPositions() const;
    46 	TPoint16 Advance() const;
    47 	const TInt16* Indices() const;
    48 	TInt EndOfShapedText();
    49 	IMPORT_C TBool IsOpen();
    50 	void SetContext(TAny* aContextualProcessFunc);
    51 	TAny* GetContext();
    52 private:
    53 	const CFont* iFont;
    54 	const TShapeHeader* iHeader;
    55 	TInt iEndOfShapedText;
    56 	TAny* iContextualProcessFunc;
    57 	};
    58 
    59 #endif