os/graphics/graphicsdeviceinterface/bitgdi/sbit/FONTBMP.CPP
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/bitgdi/sbit/FONTBMP.CPP	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,118 @@
     1.4 +// Copyright (c) 1997-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 +#include <bitdev.h>
    1.20 +#include "BITPANIC.H"
    1.21 +
    1.22 +/**
    1.23 +Construct calls the constructor for the base class CFbsFont and sets default
    1.24 +value of iCopy as EFalse.
    1.25 +*/
    1.26 +EXPORT_C CFbsBitGcFont::CFbsBitGcFont():
    1.27 +	CFbsFont(),
    1.28 +	iCopy(EFalse)
    1.29 +	{}
    1.30 +
    1.31 +/**
    1.32 +Default destructor. 
    1.33 +*/
    1.34 +EXPORT_C CFbsBitGcFont::~CFbsBitGcFont()
    1.35 +	{}
    1.36 +
    1.37 +/**
    1.38 +On return contains iAddress pointer for the CBitmapFont.
    1.39 +@return CBitmapFont* A pointer to the font
    1.40 +@see CFbsFont::Address();
    1.41 +*/
    1.42 +EXPORT_C CBitmapFont* CFbsBitGcFont::Address() const
    1.43 +	{
    1.44 +	return CFbsFont::Address();
    1.45 +	}
    1.46 +
    1.47 +/**
    1.48 +Calls reset on the object (sets iHandle to zero and carries out related 
    1.49 +messenger housekeeping and then duplicates it using the base class method.
    1.50 +@param TInt aHandle Is the integer handler for the font.
    1.51 +@return TInt KErrNone If successful else a system wide error code.
    1.52 +@see CFbsFont::Duplicate(TInt)
    1.53 +*/
    1.54 +EXPORT_C TInt CFbsBitGcFont::Duplicate(TInt aHandle)
    1.55 +	{
    1.56 +	Reset();
    1.57 +
    1.58 +	return CFbsFont::Duplicate(aHandle);
    1.59 +	}
    1.60 +
    1.61 +/**
    1.62 +Resets the graphics context to its default settings.
    1.63 +
    1.64 +The function provides a concrete implementation of the pure virtual
    1.65 +function <code>CGraphicsContext::Reset()</code>. The function
    1.66 +behaviour is the same as documented in that class.
    1.67 +*/
    1.68 +EXPORT_C void CFbsBitGcFont::Reset()
    1.69 +	{
    1.70 +	if (!iCopy)
    1.71 +		{
    1.72 +		CFbsFont::Reset();
    1.73 +		}
    1.74 +	else
    1.75 +		{
    1.76 +		iAddressPointer = NULL;
    1.77 +		iHandle = 0;
    1.78 +		iServerHandle = 0;
    1.79 +		iCopy = EFalse;
    1.80 +		}
    1.81 +	}
    1.82 +
    1.83 +/**
    1.84 +Defines the meaning of the equals operator when acting on a CFbsBitGcFont
    1.85 +object. i.e. allows these objects to be set as being equal to one another.
    1.86 +@param CFbsBitGcFont& aFont the font to be copied
    1.87 +*/
    1.88 +EXPORT_C void CFbsBitGcFont::operator=(const CFbsBitGcFont& aFont)
    1.89 +	{
    1.90 +	Reset();
    1.91 +	iAddressPointer = aFont.iAddressPointer;
    1.92 +	iHandle = aFont.iHandle;
    1.93 +	iServerHandle = aFont.iServerHandle;
    1.94 +	iCopy = ETrue;
    1.95 +	}
    1.96 +
    1.97 +/**
    1.98 +Gets the bitmap address.
    1.99 +@return The bitmap address.
   1.100 +*/
   1.101 +EXPORT_C CBitwiseBitmap* CFbsBitGcBitmap::Address() const
   1.102 +	{
   1.103 +	return CFbsBitmap::CleanAddress();
   1.104 +	}
   1.105 +
   1.106 +/**
   1.107 +Locks the global bitmap heap 
   1.108 +*/
   1.109 +EXPORT_C void CFbsBitGcBitmap::LockHeap() const
   1.110 +	{
   1.111 +	CFbsBitmap::LockHeap();
   1.112 +	}
   1.113 +
   1.114 +/**
   1.115 +Unlock the global bitmap heap 
   1.116 +*/
   1.117 +EXPORT_C void CFbsBitGcBitmap::UnlockHeap() const
   1.118 +	{
   1.119 +	CFbsBitmap::UnlockHeap();
   1.120 +	}
   1.121 +