sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: #include "BITPANIC.H" sl@0: sl@0: /** sl@0: Construct calls the constructor for the base class CFbsFont and sets default sl@0: value of iCopy as EFalse. sl@0: */ sl@0: EXPORT_C CFbsBitGcFont::CFbsBitGcFont(): sl@0: CFbsFont(), sl@0: iCopy(EFalse) sl@0: {} sl@0: sl@0: /** sl@0: Default destructor. sl@0: */ sl@0: EXPORT_C CFbsBitGcFont::~CFbsBitGcFont() sl@0: {} sl@0: sl@0: /** sl@0: On return contains iAddress pointer for the CBitmapFont. sl@0: @return CBitmapFont* A pointer to the font sl@0: @see CFbsFont::Address(); sl@0: */ sl@0: EXPORT_C CBitmapFont* CFbsBitGcFont::Address() const sl@0: { sl@0: return CFbsFont::Address(); sl@0: } sl@0: sl@0: /** sl@0: Calls reset on the object (sets iHandle to zero and carries out related sl@0: messenger housekeeping and then duplicates it using the base class method. sl@0: @param TInt aHandle Is the integer handler for the font. sl@0: @return TInt KErrNone If successful else a system wide error code. sl@0: @see CFbsFont::Duplicate(TInt) sl@0: */ sl@0: EXPORT_C TInt CFbsBitGcFont::Duplicate(TInt aHandle) sl@0: { sl@0: Reset(); sl@0: sl@0: return CFbsFont::Duplicate(aHandle); sl@0: } sl@0: sl@0: /** sl@0: Resets the graphics context to its default settings. sl@0: sl@0: The function provides a concrete implementation of the pure virtual sl@0: function CGraphicsContext::Reset(). The function sl@0: behaviour is the same as documented in that class. sl@0: */ sl@0: EXPORT_C void CFbsBitGcFont::Reset() sl@0: { sl@0: if (!iCopy) sl@0: { sl@0: CFbsFont::Reset(); sl@0: } sl@0: else sl@0: { sl@0: iAddressPointer = NULL; sl@0: iHandle = 0; sl@0: iServerHandle = 0; sl@0: iCopy = EFalse; sl@0: } sl@0: } sl@0: sl@0: /** sl@0: Defines the meaning of the equals operator when acting on a CFbsBitGcFont sl@0: object. i.e. allows these objects to be set as being equal to one another. sl@0: @param CFbsBitGcFont& aFont the font to be copied sl@0: */ sl@0: EXPORT_C void CFbsBitGcFont::operator=(const CFbsBitGcFont& aFont) sl@0: { sl@0: Reset(); sl@0: iAddressPointer = aFont.iAddressPointer; sl@0: iHandle = aFont.iHandle; sl@0: iServerHandle = aFont.iServerHandle; sl@0: iCopy = ETrue; sl@0: } sl@0: sl@0: /** sl@0: Gets the bitmap address. sl@0: @return The bitmap address. sl@0: */ sl@0: EXPORT_C CBitwiseBitmap* CFbsBitGcBitmap::Address() const sl@0: { sl@0: return CFbsBitmap::CleanAddress(); sl@0: } sl@0: sl@0: /** sl@0: Locks the global bitmap heap sl@0: */ sl@0: EXPORT_C void CFbsBitGcBitmap::LockHeap() const sl@0: { sl@0: CFbsBitmap::LockHeap(); sl@0: } sl@0: sl@0: /** sl@0: Unlock the global bitmap heap sl@0: */ sl@0: EXPORT_C void CFbsBitGcBitmap::UnlockHeap() const sl@0: { sl@0: CFbsBitmap::UnlockHeap(); sl@0: } sl@0: