fbs/fontandbitmapserver/sfbs/FBSCLI.CPP
changeset 103 2717213c588a
parent 36 01a6848ebfd7
child 116 171fae344dd4
equal deleted inserted replaced
98:bf7481649c98 103:2717213c588a
    14 //
    14 //
    15 
    15 
    16 #include <fntstore.h>
    16 #include <fntstore.h>
    17 #include <bitmap.h>
    17 #include <bitmap.h>
    18 #include <openfont.h>
    18 #include <openfont.h>
    19 #include "fbsmessage.h"
    19 #include "FbsMessage.H"
    20 #include "SERVER.H"
    20 #include "SERVER.H"
    21 #include "BackGroundCompression.h"
    21 #include "BackGroundCompression.h"
    22 #include <shapeinfo.h>
    22 #include <shapeinfo.h>
    23 #include <graphics/shaperparams.h>
    23 #include <graphics/shaperparams.h>
    24 
    24 
    33  */
    33  */
    34 LOCAL_C TInt PointerToOffset(const TAny* aAny, TInt aHeapBase)
    34 LOCAL_C TInt PointerToOffset(const TAny* aAny, TInt aHeapBase)
    35 	{
    35 	{
    36 	if (aAny && aHeapBase)
    36 	if (aAny && aHeapBase)
    37 		{
    37 		{
    38 		return (TInt)aAny - (TInt)aHeapBase;
    38 		return reinterpret_cast<TInt>(aAny) - aHeapBase;
    39 		}
    39 		}
    40 	return 0;
    40 	return 0;
    41 	}
    41 	}
    42 
    42 
    43 /** Helper function for converting an offset (that was calculated using
    43 /** Helper function for converting an offset (that was calculated using
    45 @param aOffset The offset to be converted to a pointer.
    45 @param aOffset The offset to be converted to a pointer.
    46 @param aHeapBase The heap base of the current process.
    46 @param aHeapBase The heap base of the current process.
    47 @return A pointer relative to the passed heap base.
    47 @return A pointer relative to the passed heap base.
    48 @see PointerToOffset()
    48 @see PointerToOffset()
    49  */
    49  */
    50 LOCAL_C TAny* OffsetToPointer(const TInt aOffset, TInt aHeapBase)
    50 LOCAL_C TAny* OffsetToPointer(TInt aOffset, TInt aHeapBase)
    51 	{
    51 	{
    52 	if (aOffset && aHeapBase)
    52 	if (aOffset && aHeapBase)
    53 		{
    53 		{
    54 		return (TAny*)(aOffset + (TInt)aHeapBase);
    54 		return reinterpret_cast<TAny*>(aOffset + aHeapBase);
    55 		}
    55 		}
    56 	return NULL;
    56 	return NULL;
    57 	}
    57 	}
    58 
    58 
    59 CFbClient::CFbClient(RHeap* aHeap):
    59 CFbClient::CFbClient(RHeap* aHeap):