uigraphics/NVGRenderStage/src/nvgrenderstage.cpp
author William Roberts <williamr@symbian.org>
Mon, 04 Jan 2010 21:58:13 +0000
changeset 14 dfd4516c2f08
child 15 1bd1043e4812
permissions -rw-r--r--
Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
// All rights reserved.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
//
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
// Initial Contributors:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
//
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
// Contributors:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
// Symbian Foundation Ltd- conversion from t_extendedbitmaprenderstage
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
//
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
// Description:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
//
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
#include "nvgrenderstage.h"
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
#include <graphics/wsrenderstage.h>
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
#include <s32mem.h>
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
#include <AknIconHeader.h>
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
#include <AknIconUtils.h>
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    23
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
const TUid KUidNvgExtendedBitmap = {0x39b9273e};  
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
CNvgRenderStage::CNvgRenderStage() : 	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
	iExtendedBitmapError(KErrNone)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
/** Called by CNvgRenderStageFactory::CreateRenderStageL() and 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
CNvgRenderStageFactory::CreateFinalRenderStageL() when a new render stage
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    33
called "nvgbitmap" is to be created. The only parameter used by this render stage
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    34
is aNextStage, the rest are commented out to prevent warnings.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    35
@see MWsRenderStageFactory::CreateRenderStageL()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    36
@see MWsRenderStageFactory::CreateFinalRenderStageL()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
CNvgRenderStage* CNvgRenderStage::NewL(MWsGraphicDrawerEnvironment* /*aEnv*/, MWsScreen* /*aScreen*/, MWsScreenRedraw* /*aScreenRedraw*/, CWsRenderStage* aNextStage)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    39
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    40
	CNvgRenderStage* stage = new(ELeave) CNvgRenderStage();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    41
	CleanupStack::PushL(stage);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    42
	stage->ConstructL(aNextStage);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    43
	CleanupStack::Pop(stage);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    44
	return stage;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    45
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    46
	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    47
void CNvgRenderStage::ConstructL(CWsRenderStage* aNextStage)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
	iBmp = new(ELeave) CFbsBitmap;	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
	iMaskBmp = new(ELeave) CFbsBitmap;	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
	iBrushPattern = new(ELeave) CFbsBitmap;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
	iInternalBrushPattern = new(ELeave) CFbsBitmap;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
	iGraphicsInterface = new(ELeave) CVGIGraphicsInterface;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
  iNvgEngine = CNvgEngine::NewL();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
  iNvgEngine->SetVGImageBinder(iGraphicsInterface);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    57
	BaseConstructL();	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
	SetNext(aNextStage);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
CNvgRenderStage::~CNvgRenderStage()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
	iEmptyRegion.Close();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    64
	delete iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    65
	delete iMaskBmp;	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    66
	delete iBrushPattern;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
	delete iInternalBrushPattern;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    68
	delete iNvgEngine;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    69
	delete iGraphicsInterface;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    71
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
/** The only interface returned by this render stage is MWsGraphicsContext.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
All other interface requests are passed to the base render stage class for resolving.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    74
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
@see CWsRenderStage::ResolveObjectInterface()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    76
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
@param aTypeId The type id of the interface to be retreived, must be one of the 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    78
TSurfaceConfiguration interface extension IDs.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    79
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
@return Returns a pointer to an object that has the requested interface if found, 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
otherwise returns NULL.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    82
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    83
TAny* CNvgRenderStage::ResolveObjectInterface(TUint aTypeId)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    84
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    85
	switch (aTypeId)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    86
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    87
		case MWsGraphicsContext::EWsObjectInterfaceId:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    88
			return static_cast<MWsGraphicsContext*>(this);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    89
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    90
		default:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    91
			return CWsRenderStage::ResolveObjectInterface(aTypeId);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    92
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    93
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    94
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    95
/** Call Begin() for this render stage and for the next one as well. It is assumed
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    96
that this renderstage is chained in front of a renderstage that can draw to a
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    97
CGraphicsContext as this renderstage uses MWsGraphicsContext interface from the
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    98
next stage to draw to. A pointer to the MWsGraphicsContext interface is saved here
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
    99
and is used for all subsequent MWsGraphicsContext operations called on this
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   100
render stage. 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   101
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   102
This render stage draws all extended bitmaps of type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   103
and passes all other drawing operations directly to the next render stage through
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   104
its MWsGraphicsContext interface.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   105
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   106
@see CWsRenderStage::Begin()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   107
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   108
@param aRegion The dirty region for which drawing operations are about to be issued.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   109
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   110
@post An error of KErrNotFound is set for this render stage if the MWsGraphicsContext
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   111
interface of the next render stage cannot be obtained. This render stage relies on
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   112
the existence of a subsequent stage with a valid MWsGraphicsContext interface to send
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   113
its draw operations to so will not be able to draw anything if no MWsGraphicsContext
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   114
is returned by the next render stage. The current error for this render stage can be
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   115
retreived by calling GetError().
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   116
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   117
void CNvgRenderStage::Begin(const TRegion* aRegion)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   118
	{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   119
	CWsRenderStage* nextStage = Next();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   120
	if (nextStage)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   121
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   122
		nextStage->Begin(aRegion);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   123
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   124
		// Use the graphics context from the next render stage to draw to
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   125
		iGc = static_cast<MWsGraphicsContext*>(nextStage->ResolveObjectInterface(MWsGraphicsContext::EWsObjectInterfaceId));
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   126
		if (iGc == NULL)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   128
			iExtendedBitmapError = KErrNotFound; 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   129
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   130
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   131
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   132
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   133
/** Signals that the currect batch of drawing operations is complete. This
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   134
implementation of End() just calls End() for the next render stage in the chain.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   135
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   136
@see CWsRenderStage::End()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   137
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   138
@param aCompositorReady Will be completed when the render stage is ready to 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   139
receive the next batch of drawing operations.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   140
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   141
void CNvgRenderStage::End(TRequestStatus* aCompositorReady)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   142
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   143
	if (Next())
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   144
		{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   145
		Next()->End(aCompositorReady);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   146
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   147
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   148
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   149
/** If the passed bitmap is an extended bitmap of type 0x10285A78, draw it to the stored
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   150
graphics context of the next render stage using  DrawExtendedBitmap(), if the passed bitmap
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   151
is not an extended bitmap just pass it on to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   152
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   153
@see CFbsBitGc::BitBlt(const TPoint&, const CFbsBitmap&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   154
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   155
void CNvgRenderStage::BitBlt(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   156
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   157
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   158
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   159
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   160
			{			
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   161
			TRect destRect(TPoint(aDestPos.iX,aDestPos.iY), aSourceBitmap.SizeInPixels());			
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   162
			DrawExtendedBitmap(*iGc, destRect, aSourceBitmap);				
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   163
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   164
		else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   165
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   166
			iGc->BitBlt(aDestPos, aSourceBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   167
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   168
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   169
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   170
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   171
/** If the passed bitmap is an extended bitmap of type 0x10285A78, draw it to the 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   172
stored graphics context of the next render stage using  DrawExtendedBitmap(), if the
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   173
passed bitmap is not an extended bitmap just pass it on to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   174
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   175
@see CFbsBitGc::BitBlt(const TPoint&, const CFbsBitmap&, const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   176
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   177
void CNvgRenderStage::BitBlt(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   178
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   179
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   180
		{			
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   181
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   182
			{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   183
			TRect destRect(TPoint(aDestPos.iX,aDestPos.iY), aSourceRect.Size()); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   184
			DrawExtendedBitmap(*iGc, destRect, aSourceBitmap);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   185
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   186
		else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   187
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   188
			iGc->BitBlt(aDestPos, aSourceBitmap, aSourceRect);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   189
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   190
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   191
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   192
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   193
/** If either of the passed bitmaps is an extended bitmap of type 0x10285A78 convert
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   194
to a normal bitmap before passing to the next render stage, otherwise
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   195
just pass to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   196
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   197
@see CFbsBitGc::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap&, const TRect&, const CFbsBitmap&, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   198
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   199
void CNvgRenderStage::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, TBool aInvertMask)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   200
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   201
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   202
		{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   203
		CFbsBitmap* sourceBitmap = const_cast<CFbsBitmap*>(&aSourceBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   204
		CFbsBitmap* maskBitmap = const_cast<CFbsBitmap*>(&aMaskBitmap);		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   205
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   206
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   207
			{						
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   208
			CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   209
			sourceBitmap = iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   210
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   211
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   212
		if (aMaskBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   213
			{			
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   214
			CopyExtendedBitmapToNormalBitmap(aMaskBitmap, *iMaskBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   215
			maskBitmap = iMaskBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   216
			}	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   217
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   218
		iGc->BitBltMasked(aDestPos, *sourceBitmap, aSourceRect, *maskBitmap, aInvertMask);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   219
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   220
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   221
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   222
/** If either of the passed bitmaps is an extended bitmap of type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   223
convert to a normal bitmap before passing to the next render stage, otherwise
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   224
just pass to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   225
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   226
@see CFbsBitGc::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap&, const TRect&, const CFbsBitmap&, TPoint)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   227
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   228
void CNvgRenderStage::BitBltMasked(const TPoint& aDestPos, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, const TPoint& aMaskPos)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   229
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   230
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   231
		{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   232
		CFbsBitmap* sourceBitmap = const_cast<CFbsBitmap*>(&aSourceBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   233
		CFbsBitmap* maskBitmap = const_cast<CFbsBitmap*>(&aMaskBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   234
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   235
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   236
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   237
			CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   238
			sourceBitmap = iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   239
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   240
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   241
		if (aMaskBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   242
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   243
			CopyExtendedBitmapToNormalBitmap(aMaskBitmap, *iMaskBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   244
			maskBitmap = iMaskBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   245
			}	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   246
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   247
		iGc->BitBltMasked(aDestPos, *sourceBitmap, aSourceRect, *maskBitmap, aMaskPos);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   248
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   249
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   250
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   251
/** @see CFbsBitGc::ResetClippingRegion()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   252
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   253
void CNvgRenderStage::ResetClippingRegion()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   254
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   255
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   256
		{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   257
		iGc->ResetClippingRegion();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   258
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   259
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   260
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   261
/** @see CFbsBitGc::Clear()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   262
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   263
void CNvgRenderStage::Clear()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   264
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   265
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   266
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   267
		iGc->Clear();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   268
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   269
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   270
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   271
/** @see CFbsBitGc::Clear(const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   272
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   273
void CNvgRenderStage::Clear(const TRect& aRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   274
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   275
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   276
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   277
		iGc->Clear(aRect);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   278
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   279
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   280
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   281
/** @see CFbsBitGc::ResetBrushPattern()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   282
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   283
void CNvgRenderStage::ResetBrushPattern()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   284
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   285
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   286
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   287
		iGc->ResetBrushPattern();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   288
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   289
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   290
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   291
/** @see CFbsBitGc::ResetFont()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   292
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   293
void CNvgRenderStage::ResetFont()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   294
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   295
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   296
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   297
		iGc->ResetFont();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   298
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   299
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   300
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   301
/** @see CFbsBitGc::DrawArc()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   302
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   303
void CNvgRenderStage::DrawArc(const TRect& aRect, const TPoint& aStart, const TPoint& aEnd)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   304
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   305
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   306
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   307
		iGc->DrawArc(aRect, aStart, aEnd);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   308
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   309
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   310
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   311
/** @see CFbsBitGc::DrawPie()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   312
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   313
void CNvgRenderStage::DrawPie(const TRect& aRect, const TPoint& aStart, const TPoint& aEnd)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   314
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   315
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   316
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   317
		iGc->DrawPie(aRect, aStart, aEnd);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   318
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   319
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   320
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   321
/** If the passed bitmap is an extended bitmap of type 0x10285A78, draw it to the 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   322
stored graphics context of the next render stage using DrawExtendedBitmap(), if the
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   323
passed bitmap is not an extended bitmap just pass it on to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   324
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   325
@see CFbsBitGc::DrawBitmap(const TRect&, const CFbsBitmap&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   326
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   327
void CNvgRenderStage::DrawBitmap(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   328
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   329
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   330
		{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   331
		CFbsBitmap* sourceBitmap = const_cast<CFbsBitmap*>(&aSourceBitmap);		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   332
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   333
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   334
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   335
			CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   336
			sourceBitmap = iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   337
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   338
				
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   339
		iGc->DrawBitmap(aDestRect, *sourceBitmap);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   340
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   341
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   342
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   343
/** If the passed bitmap is an extended bitmap of type 0x10285A78, draw it to the 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   344
stored graphics context of the next render stage using DrawExtendedBitmap(), if the
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   345
passed bitmap is not an extended bitmap just pass it on to the next render stage directly.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   346
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   347
@see CFbsBitGc::DrawBitmap(const TRect&, const CFbsBitmap&, const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   348
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   349
void CNvgRenderStage::DrawBitmap(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap, const TRect& aSourceRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   350
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   351
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   352
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   353
		CFbsBitmap* sourceBitmap = const_cast<CFbsBitmap*>(&aSourceBitmap);		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   354
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   355
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   356
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   357
			CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   358
			sourceBitmap = iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   359
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   360
				
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   361
		iGc->DrawBitmap(aDestRect, *sourceBitmap, aSourceRect);		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   362
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   363
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   364
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   365
/** If the passed bitmap or mask bitmap is an extended bitmap of type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   366
convert it to a normal bitmap before calling DrawBitmapMasked(), normal bitmaps
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   367
are passed straight through to the next render stage without conversion.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   368
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   369
@see CFbsBitGc::DrawBitmapMasked(const TRect&, const CFbsBitmap&, const TRect&, const CFbsBitmap&, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   370
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   371
void CNvgRenderStage::DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap& aSourceBitmap,const TRect& aSourceRect, const CFbsBitmap& aMaskBitmap, TBool aInvertMask)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   372
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   373
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   374
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   375
		CFbsBitmap* sourceBitmap = const_cast<CFbsBitmap*>(&aSourceBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   376
		CFbsBitmap* maskBitmap = const_cast<CFbsBitmap*>(&aMaskBitmap);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   377
		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   378
		if (aSourceBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   379
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   380
			CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   381
			sourceBitmap = iBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   382
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   383
		if (aMaskBitmap.ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   384
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   385
			CopyExtendedBitmapToNormalBitmap(aMaskBitmap, *iMaskBmp);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   386
			maskBitmap = iMaskBmp;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   387
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   388
	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   389
		iGc->DrawBitmapMasked(aDestRect, *sourceBitmap, aSourceRect, *maskBitmap, aInvertMask);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   390
		}	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   391
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   392
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   393
/** @see CFbsBitGc::DrawRoundRect(const TRect&, const TSize&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   394
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   395
void CNvgRenderStage::DrawRoundRect(const TRect& aRect, const TSize& aEllipse)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   396
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   397
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   398
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   399
		iGc->DrawRoundRect(aRect, aEllipse);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   400
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   401
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   402
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   403
/** @see CFbsBitGc::DrawPolyLine(const TArray<TPoint>&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   404
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   405
void CNvgRenderStage::DrawPolyLine(const TArray<TPoint>& aPointList) 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   406
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   407
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   408
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   409
		iGc->DrawPolyLine(aPointList);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   410
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   411
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   412
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   413
/** @see CFbsBitGc::DrawPolyLineNoEndPoint(const TArray<TPoint>&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   414
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   415
void CNvgRenderStage::DrawPolyLineNoEndPoint(const TArray<TPoint>& aPointList)  
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   416
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   417
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   418
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   419
		iGc->DrawPolyLineNoEndPoint(aPointList);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   420
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   421
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   422
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   423
/** @see CFbsBitGc::DrawPolygon(const TArray<TPoint>&, TFillRule)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   424
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   425
void CNvgRenderStage::DrawPolygon(const TArray<TPoint>& aPointList, TFillRule aFillRule)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   426
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   427
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   428
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   429
		iGc->DrawPolygon(aPointList, aFillRule);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   430
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   431
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   432
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   433
/** @see CFbsBitGc::DrawEllipse(const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   434
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   435
void CNvgRenderStage::DrawEllipse(const TRect& aRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   436
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   437
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   438
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   439
		iGc->DrawEllipse(aRect);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   440
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   441
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   442
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   443
/** @see CFbsBitGc::DrawLine(const TPoint&, const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   444
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   445
void CNvgRenderStage::DrawLine(const TPoint& aStart, const TPoint& aEnd)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   446
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   447
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   448
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   449
		iGc->DrawLine(aStart, aEnd);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   450
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   451
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   452
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   453
/** @see CFbsBitGc::DrawLineTo(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   454
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   455
void CNvgRenderStage::DrawLineTo(const TPoint& aPoint)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   456
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   457
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   458
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   459
		iGc->DrawLineTo(aPoint);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   460
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   461
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   462
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   463
/** @see CFbsBitGc::DrawLineBy(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   464
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   465
void CNvgRenderStage::DrawLineBy(const TPoint& aVector)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   466
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   467
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   468
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   469
		iGc->DrawLineBy(aVector);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   470
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   471
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   472
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   473
/** @see CFbsBitGc::DrawRect(const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   474
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   475
void CNvgRenderStage::DrawRect(const TRect& aRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   476
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   477
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   478
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   479
		iGc->DrawRect(aRect);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   480
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   481
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   482
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   483
/** @see CFbsBitGc::DrawText(const TDesC& aText, const TTextParameters*)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   484
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   485
void CNvgRenderStage::DrawText(const TDesC& aText, const TTextParameters* aParam)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   486
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   487
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   488
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   489
		iGc->DrawText(aText, aParam);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   490
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   491
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   492
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   493
/** @see CFbsBitGc::DrawText(const TDesC& aText, const TTextParameters*, const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   494
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   495
void CNvgRenderStage::DrawText(const TDesC& aText, const TTextParameters* aParam, const TPoint& aPosition)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   496
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   497
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   498
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   499
		iGc->DrawText(aText, aParam, aPosition);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   500
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   501
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   502
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   503
/** @see CFbsBitGc::DrawText(const TDesC& aText, const TTextParameters*, const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   504
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   505
void CNvgRenderStage::DrawText(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   506
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   507
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   508
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   509
		iGc->DrawText(aText, aParam, aClipRect);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   510
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   511
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   512
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   513
/** @see CFbsBitGc::DrawText(const TDesC& aText, const TTextParameters*, const TRect&, TInt, TTextAlign, TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   514
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   515
void CNvgRenderStage::DrawText(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipFillRect, TInt aBaselineOffset, TTextAlign aHrz, TInt aMargin)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   516
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   517
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   518
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   519
		iGc->DrawText(aText, aParam, aClipFillRect, aBaselineOffset, aHrz, aMargin);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   520
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   521
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   522
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   523
/** @see CFbsBitGc::DrawTextVertical(const TDesC&, const TTextParameters*, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   524
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   525
void CNvgRenderStage::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, TBool aUp)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   526
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   527
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   528
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   529
		iGc->DrawTextVertical(aText, aParam, aUp);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   530
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   531
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   532
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   533
/** @see CFbsBitGc::DrawTextVertical(const TDesC&, const TTextParameters*, const TPoint&, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   534
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   535
void CNvgRenderStage::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TPoint& aPosition, TBool aUp)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   536
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   537
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   538
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   539
		iGc->DrawTextVertical(aText, aParam, aPosition, aUp);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   540
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   541
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   542
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   543
/** @see CFbsBitGc::DrawTextVertical(const TDesC&, const TTextParameters*, const TRect&, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   544
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   545
void CNvgRenderStage::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TBool aUp)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   546
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   547
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   548
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   549
		iGc->DrawTextVertical(aText, aParam, aClipRect, aUp);		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   550
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   551
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   552
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   553
/** @see CFbsBitGc::DrawTextVertical(const TDesC&, const TTextParameters*, const TRect&, TInt aBaselineOffset, TBool, TTextAlign, TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   554
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   555
void CNvgRenderStage::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TInt aBaselineOffset, TBool aUp, TTextAlign aVert, TInt aMargin)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   556
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   557
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   558
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   559
		iGc->DrawTextVertical(aText, aParam, aClipRect, aBaselineOffset, aUp, aVert, aMargin);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   560
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   561
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   562
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   563
/** @see CFbsBitGc::DrawTextVertical(const TDesC&, const TTextParameters*, const TRect&, TInt, TInt, TBool, TTextAlign, TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   564
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   565
void CNvgRenderStage::DrawTextVertical(const TDesC& aText, const TTextParameters* aParam, const TRect& aClipRect, TInt aBaselineOffset, TInt aTextWidth, TBool aUp, TTextAlign aVert, TInt aMargin)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   566
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   567
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   568
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   569
		iGc->DrawTextVertical(aText, aParam, aClipRect, aBaselineOffset, aTextWidth, aUp, aVert, aMargin);	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   570
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   571
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   572
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   573
/** @see CFbsBitGc::MoveTo(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   574
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   575
void CNvgRenderStage::MoveTo(const TPoint& aPoint)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   576
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   577
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   578
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   579
		iGc->MoveTo(aPoint);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   580
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   581
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   582
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   583
/** @see CFbsBitGc::MoveBy(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   584
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   585
void CNvgRenderStage::MoveBy(const TPoint& aVector)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   586
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   587
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   588
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   589
		iGc->MoveBy(aVector);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   590
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   591
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   592
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   593
/** @see CFbsBitGc::Plot(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   594
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   595
void CNvgRenderStage::Plot(const TPoint& aPoint)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   596
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   597
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   598
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   599
		iGc->Plot(aPoint);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   600
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   601
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   602
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   603
/** @see CFbsBitGc::Reset()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   604
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   605
void CNvgRenderStage::Reset()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   606
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   607
	iExtendedBitmapError = KErrNone;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   608
	iOrigin.SetXY(0,0);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   609
	iBrushStyle = MWsGraphicsContext::ENullBrush;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   610
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   611
		{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   612
		iGc->Reset();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   613
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   614
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   615
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   616
/** @see CFbsBitGc::SetBrushColor(const TRgb&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   617
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   618
void CNvgRenderStage::SetBrushColor(const TRgb& aColor)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   619
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   620
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   621
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   622
		iGc->SetBrushColor(aColor);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   623
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   624
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   625
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   626
/** @see CFbsBitGc::SetBrushOrigin(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   627
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   628
void CNvgRenderStage::SetBrushOrigin(const TPoint& aOrigin)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   629
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   630
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   631
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   632
		iGc->SetBrushOrigin(aOrigin);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   633
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   634
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   635
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   636
/** @see CFbsBitGc::SetBrushStyle(TBrushStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   637
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   638
void CNvgRenderStage::SetBrushStyle(TBrushStyle aBrushStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   639
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   640
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   641
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   642
		iGc->SetBrushStyle(aBrushStyle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   643
		iBrushStyle = aBrushStyle;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   644
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   645
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   646
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   647
/** @see CFbsBitGc::SetClippingRegion(const TRegion&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   648
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   649
void CNvgRenderStage::SetClippingRegion(const TRegion& aRegion)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   650
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   651
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   652
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   653
		iGc->SetClippingRegion(aRegion);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   654
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   655
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   656
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   657
/** @see CFbsBitGc::SetDrawMode(TDrawMode)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   658
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   659
void CNvgRenderStage::SetDrawMode(TDrawMode aDrawMode)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   660
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   661
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   662
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   663
		iGc->SetDrawMode(aDrawMode);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   664
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   665
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   666
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   667
/** @see CFbsBitGc::SetOrigin(const TPoint&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   668
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   669
void CNvgRenderStage::SetOrigin(const TPoint& aPoint)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   670
	{	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   671
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   672
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   673
		iGc->SetOrigin(aPoint);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   674
		iOrigin = aPoint;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   675
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   676
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   677
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   678
/** @see CFbsBitGc::SetPenColor(const TRgb&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   679
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   680
void CNvgRenderStage::SetPenColor(const TRgb& aColor)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   681
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   682
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   683
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   684
		iGc->SetPenColor(aColor);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   685
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   686
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   687
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   688
/** @see CFbsBitGc::SetPenStyle(TPenStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   689
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   690
void CNvgRenderStage::SetPenStyle(TPenStyle aPenStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   691
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   692
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   693
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   694
		iGc->SetPenStyle(aPenStyle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   695
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   696
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   697
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   698
/** @see CFbsBitGc::SetPenSize(const TSize&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   699
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   700
void CNvgRenderStage::SetPenSize(const TSize& aSize)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   701
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   702
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   703
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   704
		iGc->SetPenSize(aSize);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   705
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   706
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   707
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   708
/** @see CFbsBitGc::SetTextShadowColor(const TRgb&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   709
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   710
void CNvgRenderStage::SetTextShadowColor(const TRgb& aColor)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   711
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   712
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   713
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   714
		iGc->SetTextShadowColor(aColor);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   715
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   716
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   717
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   718
/** @see CFbsBitGc::SetCharJustification(TInt, TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   719
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   720
void CNvgRenderStage::SetCharJustification(TInt aExcessWidth, TInt aNumChars)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   721
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   722
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   723
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   724
		iGc->SetCharJustification(aExcessWidth, aNumChars);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   725
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   726
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   727
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   728
/** @see CFbsBitGc::SetWordJustification(TInt, TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   729
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   730
void CNvgRenderStage::SetWordJustification(TInt aExcessWidth, TInt aNumGaps)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   731
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   732
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   733
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   734
		iGc->SetWordJustification(aExcessWidth, aNumGaps);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   735
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   736
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   737
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   738
/** @see CFbsBitGc::SetUnderlineStyle(TFontUnderline)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   739
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   740
void CNvgRenderStage::SetUnderlineStyle(TFontUnderline aUnderlineStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   741
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   742
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   743
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   744
		iGc->SetUnderlineStyle(aUnderlineStyle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   745
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   746
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   747
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   748
/** @see CFbsBitGc::SetStrikethroughStyle(TFontStrikethrough)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   749
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   750
void CNvgRenderStage::SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   751
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   752
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   753
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   754
		iGc->SetStrikethroughStyle(aStrikethroughStyle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   755
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   756
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   757
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   758
/** If the passed bitmap is an extended bitmap of type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   759
convert the extended bitmap to a normal bitmap and set the converted bitmap
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   760
as the current brush pattern. If the passed bitmap is a normal
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   761
bitmap just pass it on to the next render stage.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   762
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   763
@see SetBrushPattern(TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   764
@see CFbsBitGc::SetBrushPattern(const CFbsBitmap&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   765
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   766
void CNvgRenderStage::SetBrushPattern(const CFbsBitmap& aBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   767
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   768
	SetBrushPattern(aBitmap.Handle());	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   769
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   770
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   771
/** If the passed bitmap handle refers to an extended bitmap of type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   772
convert the extended bitmap to a normal bitmap and set the converted bitmap
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   773
as the current brush pattern. If the passed bitmap handle refers to a normal
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   774
bitmap just pass it on to the next render stage.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   775
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   776
@see SetBrushPattern(const CFbsBitmap&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   777
@see CFbsBitGc::SetBrushPattern(TInt)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   778
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   779
void CNvgRenderStage::SetBrushPattern(TInt aFbsBitmapHandle)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   780
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   781
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   782
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   783
		iBrushPattern->Duplicate(aFbsBitmapHandle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   784
		if (iBrushPattern->ExtendedBitmapType() == KUidNvgExtendedBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   785
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   786
			CopyExtendedBitmapToNormalBitmap(*iBrushPattern, *iInternalBrushPattern);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   787
			iGc->SetBrushPattern(*iInternalBrushPattern);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   788
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   789
		else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   790
			{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   791
			iGc->SetBrushPattern(aFbsBitmapHandle);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   792
			}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   793
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   794
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   795
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   796
/** @see CFbsBitGc::SetFont(const CFont*)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   797
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   798
void CNvgRenderStage::SetFont(const CFont* aFont)	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   799
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   800
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   801
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   802
		iGc->SetFont(aFont);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   803
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   804
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   805
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   806
/** @see CFbsBitGc::CopyRect(const TPoint&, const TRect&)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   807
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   808
void CNvgRenderStage::CopyRect(const TPoint& aOffset, const TRect& aRect)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   809
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   810
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   811
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   812
		iGc->CopyRect(aOffset, aRect);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   813
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   814
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   815
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   816
/** @see CFbsBitGc::UpdateJustification(const TDesC&, const TTextParameters*)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   817
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   818
void CNvgRenderStage::UpdateJustification(const TDesC& aText, const TTextParameters* aParam)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   819
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   820
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   821
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   822
		iGc->UpdateJustification(aText, aParam);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   823
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   824
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   825
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   826
/** @see CFbsBitGc::UpdateJustificationVertical(const TDesC&, const TTextParameters*, TBool)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   827
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   828
void CNvgRenderStage::UpdateJustificationVertical(const TDesC& aText, const TTextParameters* aParam, TBool aUp)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   829
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   830
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   831
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   832
		iGc->UpdateJustificationVertical(aText, aParam, aUp);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   833
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   834
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   835
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   836
/** @see CFbsBitGc::SetFontNoDuplicate(const CFont*)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   837
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   838
void CNvgRenderStage::SetFontNoDuplicate(const CFont* aFont)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   839
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   840
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   841
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   842
		iGc->SetFontNoDuplicate(aFont);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   843
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   844
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   845
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   846
/** @see CFbsBitGc::HasBrushPattern()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   847
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   848
TBool CNvgRenderStage::HasBrushPattern() const
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   849
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   850
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   851
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   852
		return iGc->HasBrushPattern();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   853
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   854
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   855
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   856
		return EFalse;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   857
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   858
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   859
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   860
/** @see CFbsBitGc::HasFont()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   861
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   862
TBool CNvgRenderStage::HasFont() const
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   863
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   864
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   865
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   866
		return iGc->HasFont();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   867
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   868
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   869
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   870
		return EFalse;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   871
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   872
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   873
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   874
/** @see CFbsBitGc::BrushColor()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   875
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   876
TRgb CNvgRenderStage::BrushColor() const
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   877
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   878
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   879
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   880
		return iGc->BrushColor();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   881
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   882
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   883
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   884
		return KRgbWhite;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   885
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   886
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   887
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   888
/** @see CFbsBitGc::PenColor()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   889
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   890
TRgb CNvgRenderStage::PenColor() const
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   891
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   892
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   893
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   894
		return iGc->PenColor();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   895
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   896
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   897
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   898
		return KRgbBlack;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   899
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   900
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   901
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   902
/** @see MWsGraphicsContext::TextShadowColor()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   903
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   904
TRgb CNvgRenderStage::TextShadowColor() const	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   905
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   906
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   907
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   908
		return iGc->TextShadowColor();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   909
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   910
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   911
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   912
		return KRgbGray;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   913
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   914
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   915
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   916
/** If an error has been set by this render stage return that error,
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   917
otherwise return the error from the graphics context of the next
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   918
render stage.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   919
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   920
@see MWsGraphicsContext::GetError()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   921
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   922
TInt CNvgRenderStage::GetError()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   923
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   924
	if (iExtendedBitmapError != KErrNone)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   925
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   926
		return iExtendedBitmapError;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   927
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   928
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   929
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   930
		return iGc->GetError();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   931
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   932
	return KErrNone;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   933
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   934
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   935
/** @see MWsGraphicsContext::Origin()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   936
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   937
TPoint CNvgRenderStage::Origin() const	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   938
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   939
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   940
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   941
		return iGc->Origin();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   942
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   943
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   944
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   945
		return TPoint(0,0);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   946
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   947
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   948
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   949
/** @see MWsGraphicsContext::ClippingRegion()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   950
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   951
const TRegion& CNvgRenderStage::ClippingRegion()	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   952
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   953
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   954
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   955
		return iGc->ClippingRegion();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   956
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   957
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   958
		{		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   959
		return iEmptyRegion;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   960
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   961
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   962
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   963
/** @see MWsGraphicsContext::Push()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   964
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   965
TInt CNvgRenderStage::Push()	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   966
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   967
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   968
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   969
		return iGc->Push();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   970
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   971
	else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   972
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   973
		return KErrGeneral;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   974
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   975
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   976
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   977
/** @see MWsGraphicsContext::Pop()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   978
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   979
void CNvgRenderStage::Pop()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   980
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   981
	if (iGc)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   982
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   983
		iGc->Pop();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   984
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   985
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   986
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   987
/** Helper method used by BitBlt() and DrawBitmap() 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   988
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   989
@param aGc The graphics context to draw the extended bitmap to.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   990
@param aDestRect The rectangle that the source bitmap will be drawn to.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   991
@param aSourceBitmap The extended bitmap of type 0x10285A78 to be drawn.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   992
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   993
@pre aSourceBitmap must be an extended bitmap of type 0x10285A78.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   994
@post Sets an error that can be retrieved using GetError() is an error occurs. 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   995
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   996
void CNvgRenderStage::DrawExtendedBitmap(MWsGraphicsContext& aGc, const TRect& aDestRect, const CFbsBitmap& aSourceBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   997
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   998
  CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
   999
  aGc.BitBlt(aDestRect.iTl, *iBmp);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1000
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1001
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1002
/** Helper method used by BitBlt() and DrawBitmap()
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1003
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1004
@param aGc The graphics context to draw the extended bitmap to.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1005
@param aDestRect The rectangle that the source bitmap will be drawn to.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1006
@param aSourceBitmap The extended bitmap of type 0x10285A78 to be drawn.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1007
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1008
@pre aSourceBitmap must be an extended bitmap of type 0x10285A78.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1009
@post Sets an error that can be retrieved using GetError() is an error occurs. 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1010
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1011
void CNvgRenderStage::DrawExtendedBitmap(CFbsBitGc& aGc, const TRect& aDestRect, const CFbsBitmap& aSourceBitmap)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1012
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1013
  CopyExtendedBitmapToNormalBitmap(aSourceBitmap, *iBmp); 		
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1014
  aGc.BitBlt(aDestRect.iTl, iBmp);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1015
	}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1016
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1017
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1018
/** Helper method that draws an NVG extended bitmap into a normal bitmap. The normal
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1019
bitmap passed is resized before the extended bitmap is drawn into it.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1020
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1021
@param aExtendedBitmapSrc The extended bitmap to draw in to the normal bitmap aBitmapDest
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1022
@param aBitmapDest The normal bitmap that the extended bitmap is to be drawn into
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1023
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1024
@pre aExtendedBitmapSrc must be an extended bitmap of extended bitmap type 0x10285A78
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1025
@post aBitmapDest has been reset and resized and now contains a representation of the aExtendedBitmapSrc
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1026
 */
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1027
void CNvgRenderStage::CopyExtendedBitmapToNormalBitmap(const CFbsBitmap& aExtendedBitmapSrc, CFbsBitmap& aBitmapDst)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1028
	{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1029
	TSize size = aExtendedBitmapSrc.SizeInPixels();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1030
	TInt err = aBitmapDst.Create(size, aExtendedBitmapSrc.DisplayMode());
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1031
	if (err != KErrNone)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1032
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1033
		iExtendedBitmapError = err;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1034
		return;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1035
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1036
	
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1037
	TRAP(err, iGraphicsInterface->InitializeL(size));
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1038
	if (err != KErrNone)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1039
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1040
		iExtendedBitmapError = err;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1041
		return;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1042
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1043
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1044
	// Clear to White before doing anything else
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1045
  VGfloat color[4] = { 1.0f, 1.0f, 1.0f, 0.0f };
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1046
  vgSeti(VG_SCISSORING, VG_FALSE);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1047
  vgSetfv(VG_CLEAR_COLOR, 4, color);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1048
  vgClear(0, 0, size.iWidth, size.iHeight);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1049
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1050
  aExtendedBitmapSrc.BeginDataAccess();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1051
  const TUint8* bmpData = (const TUint8*)aExtendedBitmapSrc.DataAddress();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1052
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1053
  TPtr8 IconHeaderPtr((TUint8*)bmpData, KIconHeaderLength, KIconHeaderLength);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1054
  TAknIconHeader iconheader(IconHeaderPtr);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1055
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1056
  TInt dataSize = aExtendedBitmapSrc.DataSize();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1057
  // skip TNVGIconHeader structure - we only know about version 0
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1058
  if (bmpData[2] == 0)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1059
    {
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1060
    TInt headerlength = bmpData[3];   // should be KIconHeaderLength
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1061
    bmpData += headerlength;    
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1062
    dataSize -=  headerlength;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1063
    }
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1064
  TPtrC8 nvgData(bmpData,dataSize);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1065
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1066
    TInt rotAngle = iconheader.GetRotation();
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1067
    // setting the rotation angle
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1068
    iNvgEngine->Rotate(-rotAngle, size.iWidth >> 1, size.iHeight >>1);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1069
    
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1070
    //setting preserve aspect ratio
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1071
    TNvgAlignStatusType alignTypeValue = ENvgPreserveAspectRatio_XmidYmid;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1072
    TNvgMeetOrSliceType meetOrSliceTypeValue = ENvgMeet;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1073
    
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1074
    switch ( iconheader.GetScaleMode() )
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1075
        {
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1076
        case EAspectRatioPreserved: // fall through
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1077
            {
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1078
            // use default
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1079
            break;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1080
            }
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1081
            // Ensures NVG content fully covers the area of the icon whilst preserving aspect ratio.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1082
        case EAspectRatioPreservedSlice:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1083
            {
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1084
            // alignTypeValue use default
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1085
            meetOrSliceTypeValue = ENvgSlice;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1086
            break;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1087
            } 
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1088
            /* EAspectRatioPreservedAndUnusedSpaceRemoved is mapped to the same values as EAspectRatioNotPreserved
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1089
             * because we already have a frame buffer with the dimensions that preserves the aspect ratio.
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1090
             * This mapping ensures that NVG engine does not calculate aspect ratio twice and potentially resulting in precision loss.*/
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1091
        case EAspectRatioPreservedAndUnusedSpaceRemoved:                        
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1092
        case EAspectRatioNotPreserved:
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1093
            {            
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1094
            alignTypeValue = ENvgPreserveAspectRatio_None;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1095
            // meetOrSliceTypeValue use default
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1096
            break;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1097
            }
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1098
        }    
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1099
    iNvgEngine->SetPreserveAspectRatio(alignTypeValue, meetOrSliceTypeValue);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1100
  
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1101
  TInt error = iNvgEngine->DrawNvg(nvgData, aExtendedBitmapSrc.SizeInPixels(), &aBitmapDst, NULL);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1102
  aExtendedBitmapSrc.EndDataAccess(ETrue);
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1103
  
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1104
  TRAP(err, iGraphicsInterface->CopyBitmapL(&aBitmapDst, NULL));
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1105
	if (err != KErrNone)
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1106
		{
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1107
		iExtendedBitmapError = err;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1108
		return;
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1109
		}
dfd4516c2f08 Add new component NVGRenderStage to handle conversion of NVG Icons into CFbsBitmap
William Roberts <williamr@symbian.org>
parents:
diff changeset
  1110
	}