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