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