guestrendering/guestopenvg/src/vgfont.cpp
author Matt Plumtree <matt.plumtree@nokia.com>
Mon, 15 Nov 2010 09:56:25 +0000
branchbug235_bringup_0
changeset 77 b0395290e61f
parent 24 a3f46bb01be2
permissions -rwxr-xr-x
Ensure OpenGL ES 2.0 C functions use C signatures in C++ builds (fixes VS builds)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     1
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     2
// All rights reserved.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     3
// This component and the accompanying materials are made available
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     5
// which accompanies this distribution, and is available
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     7
//
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     8
// Initial Contributors:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
     9
// Nokia Corporation - initial contribution.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    10
//
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    11
// Contributors:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    12
//
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    13
// Description:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    14
// Client-side state information for Open VG handle based objects
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    15
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    16
#include "vgstate.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    17
#include "remotefunctioncall.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    18
#include "openvgrfc.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    19
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    20
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    21
/////////////////////////////////////////////////////////////////////////////////////////////
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    22
// CVgFontInfo
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    23
/////////////////////////////////////////////////////////////////////////////////////////////
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    24
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    25
CVgFontInfo* CVgFontInfo::New()
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    26
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    27
	RHeap* clientHeap = CVghwUtils::SwitchToVghwHeap();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    28
	CVgFontInfo* self = new CVgFontInfo();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    29
	CVghwUtils::SwitchFromVghwHeap(clientHeap);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    30
	return self;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    31
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    32
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    33
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    34
CVgFontInfo::~CVgFontInfo()
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    35
	{}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    36
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    37
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    38
CVgFontInfo::CVgFontInfo() :
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    39
		CVgHandleBase(EVgHandleForFont)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    40
	{}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    41
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    42
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    43
TBool CVgFontInfo::DestroyObject(MVgContext& aVgContext)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    44
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    45
	VGPANIC_ASSERT_DEBUG(iIsDestroyed, EVgPanicTemp);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    46
	OPENVG_TRACE("  CVgFontInfo::DestroyObject HostHandle=0x%x", iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    47
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    48
	if (iHostHandle)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    49
		{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    50
		RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    51
		vgApiData.Init(OpenVgRFC::EvgDestroyFont, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    52
		vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    53
		aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    54
		}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    55
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    56
	return ETrue;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    57
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    58
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    59
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    60
VGint CVgFontInfo::GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    61
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    62
	switch (aParamType)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    63
		{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    64
		case VG_FONT_NUM_GLYPHS:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    65
			return 1;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    66
		}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    67
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    68
	// invalid ParamType
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    69
	aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    70
	return 0;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    71
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    72
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    73
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    74
void CVgFontInfo::SetGlyphToPath(MVgContext& aVgContext, VGuint aGlyphIndex, CVgPathInfo* aPathInfo, VGboolean aIsHinted,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    75
		const VGfloat aGlyphOrigin [2], const VGfloat aEscapement[2])
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    76
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    77
	RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    78
	vgApiData.Init(OpenVgRFC::EvgSetGlyphToPath, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    79
	vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    80
	vgApiData.AppendParam(aGlyphIndex);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    81
	vgApiData.AppendParam( (aPathInfo == NULL) ? VG_INVALID_HANDLE : aPathInfo->HostHandle());
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    82
	vgApiData.AppendParam(aIsHinted);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    83
	vgApiData.AppendVector(aGlyphOrigin, 2);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    84
	vgApiData.AppendVector(aEscapement, 2);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    85
	aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    86
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    87
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    88
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    89
void CVgFontInfo::SetGlyphToImage(MVgContext& aVgContext, VGuint aGlyphIndex, CVgImageInfo* aImageInfo, const VGfloat aGlyphOrigin [2],
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    90
        const VGfloat aEscapement[2])
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    91
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    92
	// ToDo track use of VG Images (esp SgImages) as Font Glyphs
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    93
	RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    94
	vgApiData.Init(OpenVgRFC::EvgSetGlyphToImage, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    95
	vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    96
	vgApiData.AppendParam(aGlyphIndex);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    97
	vgApiData.AppendParam( (aImageInfo == NULL) ? VG_INVALID_HANDLE : aImageInfo->HostHandle());
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    98
	vgApiData.AppendVector(aGlyphOrigin, 2);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
    99
	vgApiData.AppendVector(aEscapement, 2);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   100
	TUint64 sgId(0L);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   101
	if (aImageInfo && aImageInfo->IsEglSibling())
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   102
		{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   103
		sgId = aImageInfo->SgImageId();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   104
		}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   105
	vgApiData.AppendTUint64(sgId);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   106
	aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   107
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   108
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   109
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   110
void CVgFontInfo::ClearGlyph(MVgContext& aVgContext, VGuint aGlyphIndex)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   111
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   112
	// **** Desirable: verify aGlyphIndex, ToDo  decrement SgImage reference count
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   113
	RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   114
	vgApiData.Init(OpenVgRFC::EvgClearGlyph, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   115
	vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   116
	vgApiData.AppendParam(aGlyphIndex);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   117
	aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   118
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   119
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   120
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   121
void CVgFontInfo::DrawGlyph(MVgContext& aVgContext, VGuint aGlyphIndex, VGbitfield aPaintModes, VGboolean aAllowAutoHinting)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   122
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   123
	// **** Desirable: verify aGlyphIndex
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   124
	RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   125
	vgApiData.Init(OpenVgRFC::EvgDrawGlyph, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   126
	vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   127
	vgApiData.AppendParam(aGlyphIndex);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   128
	vgApiData.AppendParam(aPaintModes);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   129
	vgApiData.AppendParam(aAllowAutoHinting);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   130
	aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   131
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   132
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   133
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   134
void CVgFontInfo::DrawGlyphs(MVgContext& aVgContext, VGint aGlyphCount, const VGuint * aGlyphIndices, const VGfloat * aAdjustmentsX,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   135
        const VGfloat * aAdjustmentsY, VGbitfield aPaintModes, VGboolean aAllowAutoHinting)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   136
	{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   137
	// **** Desirable: verify glyph indices?
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   138
	if (aGlyphCount <= 0)
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   139
		{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   140
		aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   141
		}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   142
	else
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   143
		{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   144
		RemoteFunctionCallData data; OpenVgRFC vgApiData(data);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   145
		vgApiData.Init(OpenVgRFC::EvgDrawGlyphs, RemoteFunctionCallData::EOpRequest);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   146
		vgApiData.AppendParam(iHostHandle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   147
		vgApiData.AppendParam(aGlyphCount);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   148
		vgApiData.AppendVector(aGlyphIndices, aGlyphCount);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   149
		vgApiData.AppendVector(aAdjustmentsX, (aAdjustmentsX == NULL) ? 0 : aGlyphCount);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   150
		vgApiData.AppendVector(aAdjustmentsY, (aAdjustmentsY == NULL) ? 0 : aGlyphCount);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   151
		vgApiData.AppendParam(aPaintModes);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   152
		vgApiData.AppendParam(aAllowAutoHinting);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   153
		aVgContext.ExecuteVgCommand(vgApiData);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   154
		}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   155
	}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   156
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   157
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 14
diff changeset
   158
// end of file vgfont.cpp