os/graphics/graphicsdeviceinterface/bitgdi/sbit/FONTBMP.CPP
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) 1997-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 #include <bitdev.h>
    17 #include "BITPANIC.H"
    18 
    19 /**
    20 Construct calls the constructor for the base class CFbsFont and sets default
    21 value of iCopy as EFalse.
    22 */
    23 EXPORT_C CFbsBitGcFont::CFbsBitGcFont():
    24 	CFbsFont(),
    25 	iCopy(EFalse)
    26 	{}
    27 
    28 /**
    29 Default destructor. 
    30 */
    31 EXPORT_C CFbsBitGcFont::~CFbsBitGcFont()
    32 	{}
    33 
    34 /**
    35 On return contains iAddress pointer for the CBitmapFont.
    36 @return CBitmapFont* A pointer to the font
    37 @see CFbsFont::Address();
    38 */
    39 EXPORT_C CBitmapFont* CFbsBitGcFont::Address() const
    40 	{
    41 	return CFbsFont::Address();
    42 	}
    43 
    44 /**
    45 Calls reset on the object (sets iHandle to zero and carries out related 
    46 messenger housekeeping and then duplicates it using the base class method.
    47 @param TInt aHandle Is the integer handler for the font.
    48 @return TInt KErrNone If successful else a system wide error code.
    49 @see CFbsFont::Duplicate(TInt)
    50 */
    51 EXPORT_C TInt CFbsBitGcFont::Duplicate(TInt aHandle)
    52 	{
    53 	Reset();
    54 
    55 	return CFbsFont::Duplicate(aHandle);
    56 	}
    57 
    58 /**
    59 Resets the graphics context to its default settings.
    60 
    61 The function provides a concrete implementation of the pure virtual
    62 function <code>CGraphicsContext::Reset()</code>. The function
    63 behaviour is the same as documented in that class.
    64 */
    65 EXPORT_C void CFbsBitGcFont::Reset()
    66 	{
    67 	if (!iCopy)
    68 		{
    69 		CFbsFont::Reset();
    70 		}
    71 	else
    72 		{
    73 		iAddressPointer = NULL;
    74 		iHandle = 0;
    75 		iServerHandle = 0;
    76 		iCopy = EFalse;
    77 		}
    78 	}
    79 
    80 /**
    81 Defines the meaning of the equals operator when acting on a CFbsBitGcFont
    82 object. i.e. allows these objects to be set as being equal to one another.
    83 @param CFbsBitGcFont& aFont the font to be copied
    84 */
    85 EXPORT_C void CFbsBitGcFont::operator=(const CFbsBitGcFont& aFont)
    86 	{
    87 	Reset();
    88 	iAddressPointer = aFont.iAddressPointer;
    89 	iHandle = aFont.iHandle;
    90 	iServerHandle = aFont.iServerHandle;
    91 	iCopy = ETrue;
    92 	}
    93 
    94 /**
    95 Gets the bitmap address.
    96 @return The bitmap address.
    97 */
    98 EXPORT_C CBitwiseBitmap* CFbsBitGcBitmap::Address() const
    99 	{
   100 	return CFbsBitmap::CleanAddress();
   101 	}
   102 
   103 /**
   104 Locks the global bitmap heap 
   105 */
   106 EXPORT_C void CFbsBitGcBitmap::LockHeap() const
   107 	{
   108 	CFbsBitmap::LockHeap();
   109 	}
   110 
   111 /**
   112 Unlock the global bitmap heap 
   113 */
   114 EXPORT_C void CFbsBitGcBitmap::UnlockHeap() const
   115 	{
   116 	CFbsBitmap::UnlockHeap();
   117 	}
   118