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.
sl@0
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#include <bitdev.h>
sl@0
    17
#include "BITPANIC.H"
sl@0
    18
sl@0
    19
/**
sl@0
    20
Construct calls the constructor for the base class CFbsFont and sets default
sl@0
    21
value of iCopy as EFalse.
sl@0
    22
*/
sl@0
    23
EXPORT_C CFbsBitGcFont::CFbsBitGcFont():
sl@0
    24
	CFbsFont(),
sl@0
    25
	iCopy(EFalse)
sl@0
    26
	{}
sl@0
    27
sl@0
    28
/**
sl@0
    29
Default destructor. 
sl@0
    30
*/
sl@0
    31
EXPORT_C CFbsBitGcFont::~CFbsBitGcFont()
sl@0
    32
	{}
sl@0
    33
sl@0
    34
/**
sl@0
    35
On return contains iAddress pointer for the CBitmapFont.
sl@0
    36
@return CBitmapFont* A pointer to the font
sl@0
    37
@see CFbsFont::Address();
sl@0
    38
*/
sl@0
    39
EXPORT_C CBitmapFont* CFbsBitGcFont::Address() const
sl@0
    40
	{
sl@0
    41
	return CFbsFont::Address();
sl@0
    42
	}
sl@0
    43
sl@0
    44
/**
sl@0
    45
Calls reset on the object (sets iHandle to zero and carries out related 
sl@0
    46
messenger housekeeping and then duplicates it using the base class method.
sl@0
    47
@param TInt aHandle Is the integer handler for the font.
sl@0
    48
@return TInt KErrNone If successful else a system wide error code.
sl@0
    49
@see CFbsFont::Duplicate(TInt)
sl@0
    50
*/
sl@0
    51
EXPORT_C TInt CFbsBitGcFont::Duplicate(TInt aHandle)
sl@0
    52
	{
sl@0
    53
	Reset();
sl@0
    54
sl@0
    55
	return CFbsFont::Duplicate(aHandle);
sl@0
    56
	}
sl@0
    57
sl@0
    58
/**
sl@0
    59
Resets the graphics context to its default settings.
sl@0
    60
sl@0
    61
The function provides a concrete implementation of the pure virtual
sl@0
    62
function <code>CGraphicsContext::Reset()</code>. The function
sl@0
    63
behaviour is the same as documented in that class.
sl@0
    64
*/
sl@0
    65
EXPORT_C void CFbsBitGcFont::Reset()
sl@0
    66
	{
sl@0
    67
	if (!iCopy)
sl@0
    68
		{
sl@0
    69
		CFbsFont::Reset();
sl@0
    70
		}
sl@0
    71
	else
sl@0
    72
		{
sl@0
    73
		iAddressPointer = NULL;
sl@0
    74
		iHandle = 0;
sl@0
    75
		iServerHandle = 0;
sl@0
    76
		iCopy = EFalse;
sl@0
    77
		}
sl@0
    78
	}
sl@0
    79
sl@0
    80
/**
sl@0
    81
Defines the meaning of the equals operator when acting on a CFbsBitGcFont
sl@0
    82
object. i.e. allows these objects to be set as being equal to one another.
sl@0
    83
@param CFbsBitGcFont& aFont the font to be copied
sl@0
    84
*/
sl@0
    85
EXPORT_C void CFbsBitGcFont::operator=(const CFbsBitGcFont& aFont)
sl@0
    86
	{
sl@0
    87
	Reset();
sl@0
    88
	iAddressPointer = aFont.iAddressPointer;
sl@0
    89
	iHandle = aFont.iHandle;
sl@0
    90
	iServerHandle = aFont.iServerHandle;
sl@0
    91
	iCopy = ETrue;
sl@0
    92
	}
sl@0
    93
sl@0
    94
/**
sl@0
    95
Gets the bitmap address.
sl@0
    96
@return The bitmap address.
sl@0
    97
*/
sl@0
    98
EXPORT_C CBitwiseBitmap* CFbsBitGcBitmap::Address() const
sl@0
    99
	{
sl@0
   100
	return CFbsBitmap::CleanAddress();
sl@0
   101
	}
sl@0
   102
sl@0
   103
/**
sl@0
   104
Locks the global bitmap heap 
sl@0
   105
*/
sl@0
   106
EXPORT_C void CFbsBitGcBitmap::LockHeap() const
sl@0
   107
	{
sl@0
   108
	CFbsBitmap::LockHeap();
sl@0
   109
	}
sl@0
   110
sl@0
   111
/**
sl@0
   112
Unlock the global bitmap heap 
sl@0
   113
*/
sl@0
   114
EXPORT_C void CFbsBitGcBitmap::UnlockHeap() const
sl@0
   115
	{
sl@0
   116
	CFbsBitmap::UnlockHeap();
sl@0
   117
	}
sl@0
   118