Commit 9c6f2168 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

последыши изменений интерфейса IRenderer

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63629 954022d7-b5bf-4e40-9824-e11837661b57
parent 36414702
......@@ -396,12 +396,13 @@ namespace NSHtmlRenderer
return S_OK;
}
//-------- Функции для вывода текста --------------------------------------------------------
HRESULT CASCSVGWriter::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGWriter::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)// const double& baselineOffset)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGWriter::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGWriter::CommandDrawText(const std::wstring& bsText,const double& x,const double& y,const double& w, const double& h)
//CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
......@@ -411,25 +412,25 @@ namespace NSHtmlRenderer
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandText(bsText, x, y, w, h, baselineOffset);
PathCommandText(bsText, x, y, w, h/* baselineOffset*/);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
return S_OK;
}
HRESULT CASCSVGWriter::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGWriter::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)// const double& baselineOffset, const DWORD& lFlags)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGWriter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGWriter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (m_bIsRaster)
return S_OK;
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, bsGidText, x, y, w, h, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids,nGidsCount , x, y, w, h);//, baselineOffset, lFlags);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -606,39 +607,41 @@ namespace NSHtmlRenderer
m_pSimpleGraphicsConverter->PathCommandGetCurrentPoint(fX, fY);
return S_OK;
}
HRESULT CASCSVGWriter::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGWriter::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGWriter::PathCommandText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight, const double& fBaseLineOffset)
HRESULT CASCSVGWriter::PathCommandText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight)//, const double& fBaseLineOffset)
{
if (m_bIsRaster)
return S_OK;
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight, fBaseLineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight, 0);//, fBaseLineOffset);
return S_OK;
}
HRESULT CASCSVGWriter::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGWriter::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGWriter::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGWriter::PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (m_bIsRaster)
return S_OK;
bool bGid = m_pFont->StringGID != 0 ? true : false;
if (bsGidText.empty())
{
m_pFont->StringGID = 1;
PathCommandText(bsGidText, x, y, w, h, baselineOffset);
}
//TODOOO
//if (bsGidText.empty())
//{
// m_pFont->StringGID = 1;
// PathCommandText(bsGidText, x, y, w, h, baselineOffset);
//}
m_pFont->StringGID = 0;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
PathCommandText(sText, x, y, w, h);//, baselineOffset);
m_pFont->StringGID = bGid ? 1 : 0;
return S_OK;
......
......@@ -102,11 +102,11 @@ namespace NSHtmlRenderer
HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- Функции для вывода текста --------------------------------------------------------
HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h);
HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h);
HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
//-------- Маркеры для команд ---------------------------------------------------------------
HRESULT BeginCommand(const DWORD& lType);
......@@ -125,11 +125,11 @@ namespace NSHtmlRenderer
HRESULT PathCommandStart();
HRESULT PathCommandGetCurrentPoint(double* x, double* y);
HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h);
HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h);
HRESULT PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
//-------- Функции для вывода изображений ---------------------------------------------------
HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h);
......
......@@ -462,18 +462,18 @@ namespace NSHtmlRenderer
return S_OK;
}
//-------- Функции для вывода текста --------------------------------------------------------
HRESULT CASCSVGRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGRenderer::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGRenderer::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
PathCommandStart();
PathCommandText(bsText, x, y, w, h, baselineOffset);
PathCommandText(bsText, x, y, w, h);//, baselineOffset);
//double dOldPenW = m_pPen->Size;
//long lOldPenC = m_pPen->Color;
......@@ -503,21 +503,23 @@ namespace NSHtmlRenderer
return S_OK;
}
HRESULT CASCSVGRenderer::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGRenderer::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGRenderer::CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGRenderer::CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (!bsGidText.empty())
{
m_pFont->StringGID = TRUE;
return CommandDrawText(bsGidText, x, y, w, h, baselineOffset);
}
//TODOOO
//if (!bsGidText.empty())
//{
// m_pFont->StringGID = TRUE;
// return CommandDrawText(bsGidText, x, y, w, h/*, baselineOffset*/);
//}
m_pFont->StringGID = FALSE;
return CommandDrawText(bsUnicodeText, x, y, w, h, baselineOffset);
return CommandDrawText(bsUnicodeText, x, y, w, h/*, baselineOffset*/);
return S_OK;
}
//-------- Маркеры для команд ---------------------------------------------------------------
HRESULT CASCSVGRenderer::BeginCommand(const DWORD& lType)
......@@ -761,12 +763,12 @@ namespace NSHtmlRenderer
m_pSimpleGraphicsConverter->PathCommandGetCurrentPoint(fX, fY);
return S_OK;
}
HRESULT CASCSVGRenderer::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CASCSVGRenderer::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGRenderer::PathCommandText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight, const double& fBaseLineOffset)
HRESULT CASCSVGRenderer::PathCommandText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight)//, const double& fBaseLineOffset)
{
if (NULL == m_pFontManager)
{
......@@ -775,24 +777,25 @@ namespace NSHtmlRenderer
}
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight, fBaseLineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight,0);//, fBaseLineOffset);
return S_OK;
}
HRESULT CASCSVGRenderer::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGRenderer::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
//todo new command
return S_OK;
}
HRESULT CASCSVGRenderer::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CASCSVGRenderer::PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (!bsGidText.empty())
{
m_pFont->StringGID = TRUE;
return PathCommandText(bsGidText, x, y, w, h, baselineOffset);
}
//TODOOO
//if (!bsGidText.empty())
//{
// m_pFont->StringGID = TRUE;
// return PathCommandText(bsGidText, x, y, w, h);//, baselineOffset);
//}
m_pFont->StringGID = FALSE;
return PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
return PathCommandText(sText, x, y, w, h);//, baselineOffset);
}
//-------- Функции для вывода изображений ---------------------------------------------------
HRESULT CASCSVGRenderer::DrawImage(IGrObject* pImage, const double& fX, const double& fY, const double& fWidth, const double& fHeight)
......
......@@ -122,11 +122,11 @@ namespace NSHtmlRenderer
HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- --------------------------------------------------------
HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h);
HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) ;
HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
//-------- ---------------------------------------------------------------
HRESULT BeginCommand(const DWORD& lType);
......@@ -145,11 +145,11 @@ namespace NSHtmlRenderer
HRESULT PathCommandStart();
HRESULT PathCommandGetCurrentPoint(double* x, double* y);
HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) ;
HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) ;
HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) ;
HRESULT PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h) ;
//-------- ---------------------------------------------------
HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h);
......
#pragma once
#include <atlbase.h>
/*
// DrawPath
const long c_nStroke = 0x0001;
const long c_nWindingFillMode = 0x0100;
......@@ -77,7 +77,7 @@ const long c_nEbookWriter = 0x0007;
const long c_nDocxWriter = 0x0008;
const long c_nVifFormat = 0x0009;
*/
// IASCRenderer
[object, uuid("97F3816A-C2BD-43b2-B480-24711DBE7C8D"), dual, pointer_default(unique)]
__interface IASCRenderer : IDispatch
......
......@@ -3431,7 +3431,7 @@ void CPdfWriterLib::OnlineWordToPdfInternal(BYTE* dstArray, LONG len, const std:
m1 = NSCommonReader::ReadInt(current, curindex) / 100000.0;
m2 = NSCommonReader::ReadInt(current, curindex) / 100000.0;
CommandDrawText(wsTempString, m1, m2, 0, 0, 0);
CommandDrawText(wsTempString, m1, m2, 0, 0);//, 0);
}
break;
case ctBeginCommand:
......@@ -3703,7 +3703,7 @@ HRESULT CPdfWriterLib::OnlineWordToPdfExec (std::wstring sPathXml, std::wstring
if (!nReg)
{
BeginCommand(8);
CommandDrawText(sHypers, 0, 0, 0, 0, 0);
CommandDrawText(sHypers, 0, 0, 0, 0/*, 0*/);
EndCommand(8);
}
......
......@@ -459,11 +459,11 @@ public:
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex) ;
//-------- Функции для вывода текста --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
//-------- Маркеры для команд ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType) ;
......@@ -482,11 +482,11 @@ public:
virtual HRESULT PathCommandStart() ;
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y) ;
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) ;;
virtual HRESULT PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h) ;
//-------- Функции для вывода изображений ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h) ;
......
......@@ -673,7 +673,7 @@ HRESULT CPdfWriterLib::put_EdgeDist (const double &dDist)
return S_OK;
}
//--------- Функции для вывода текста ------------------------------------------------------------
HRESULT CPdfWriterLib::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CPdfWriterLib::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
//if (c_nHyperlinkType == m_lCurrentCommandType)
// return S_OK;
......@@ -688,21 +688,21 @@ HRESULT CPdfWriterLib::CommandDrawTextCHAR(const LONG& c, const double& x, const
return S_OK;
}
HRESULT CPdfWriterLib::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CPdfWriterLib::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (gid >= 0)
{
m_oFont.StringGID = true;
return CommandDrawTextCHAR(gid, x, y, w, h, baselineOffset);
return CommandDrawTextCHAR(gid, x, y, w, h);//, baselineOffset);
}
m_oFont.StringGID = false;
return CommandDrawTextCHAR(c, x, y, w, h, baselineOffset);
return CommandDrawTextCHAR(c, x, y, w, h);//, baselineOffset);
}
HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double & fX,const double &fY,
const double & fWidth, const double & fHeight, const double & fBaseLineOffset)
const double & fWidth, const double & fHeight)//, const double & fBaseLineOffset)
{
HRESULT hRes = S_OK;
......@@ -721,7 +721,7 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
if ( c_nClipType != m_pCurCommand->nType )
{
m_oContiniousText.Add( std_string2string(bsText), std_string2string(bsText),
fX, fY, fWidth, fHeight, fBaseLineOffset, false, m_oFont, m_oBrush, m_oTransform, m_dCharSpace );
fX, fY, fWidth, fHeight, 0, false, m_oFont, m_oBrush, m_oTransform, m_dCharSpace );
SetState( rendstateText );
return S_OK;
......@@ -750,7 +750,7 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
double fWidth1 = MMToPDFCoords( fWidth );
double fHeight1 = MMToPDFCoords( fHeight );
double fBaseLineOffset1 = MMToPDFCoords( fBaseLineOffset );
//double fBaseLineOffset1 = MMToPDFCoords( fBaseLineOffset );
PToUnicode pToUnicode = FindToUnicodeForString( m_pDocument, bsText );
if ( !pToUnicode )
......@@ -986,7 +986,7 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
}
// Выводим текст
hRes = TextOut_( (float)dXShadow, fPageHeight - (float) (dYShadow + fBaseLineOffset), bsCodedString ) ;
hRes = TextOut_( (float)dXShadow, fPageHeight - (float) (dYShadow/* + fBaseLineOffset*/), bsCodedString ) ;
if ( hRes != S_OK)
return hRes;
......@@ -1205,7 +1205,7 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
}
// Выводим текст
if ( S_OK != ( hRes = TextOut_( (float)fX, fPageHeight - (float) (fY + fBaseLineOffset), bsCodedString )))
if ( S_OK != ( hRes = TextOut_( (float)fX, fPageHeight - (float) (fY /*+ fBaseLineOffset*/), bsCodedString )))
return hRes;
if ( S_OK != ( hRes = EndText() ) )
......@@ -1315,9 +1315,9 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
return S_OK;
}
HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,const std::wstring & bsGidText,
HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,const unsigned int* pGids, const unsigned int nGidsCount,
/*const std::wstring & bsSrcCodeText, */const double & fX1,const double & fY1,
const double & fWidth1, const double & fHeight1, const double & fBaseLineOffset1,const DWORD & nFlags)
const double & fWidth1, const double & fHeight1)//, const double & fBaseLineOffset1,const DWORD & nFlags)
{
// TODO: Сделать обработку DrawTextEx тоже через Состояния рендерера
SetState( rendstateNone );
......@@ -1345,7 +1345,7 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
double fWidth = MMToPDFCoords( fWidth1 );
double fHeight = MMToPDFCoords( fHeight1 );
double fBaseLineOffset = MMToPDFCoords( fBaseLineOffset1 );
//double fBaseLineOffset = MMToPDFCoords( fBaseLineOffset1 );
std::wstring bsCodedString;
......@@ -1654,7 +1654,7 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
}
// Выводим текст
if ( S_OK != ( hRes = TextOut_( (float)dXShadow, fPageHeight - (float) (dYShadow + fBaseLineOffset), bsCodedString ) ) )
if ( S_OK != ( hRes = TextOut_( (float)dXShadow, fPageHeight - (float) (dYShadow /*+ fBaseLineOffset*/), bsCodedString ) ) )
{
return hRes;
}
......@@ -1671,11 +1671,11 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
double dItalicAdd = tan( (double)dItalicAngle ) * fXHeight * fFontSize / 2;
if ( !m_oFont.Italic )
dItalicAdd = 0;
if ( S_OK != ( hRes = MoveTo( (float)dXShadow + dItalicAdd, fPageHeight - (float) ( dYShadow + fBaseLineOffset - fXHeight * fFontSize / 2 ) ) ) )
if ( S_OK != ( hRes = MoveTo( (float)dXShadow + dItalicAdd, fPageHeight - (float) ( dYShadow /*+ fBaseLineOffset*/ - fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
if ( S_OK != ( hRes = LineTo( (float)dXShadow + fTextWidth + dItalicAdd, fPageHeight - (float) ( dYShadow + fBaseLineOffset - fXHeight * fFontSize / 2 ) ) ) )
if ( S_OK != ( hRes = LineTo( (float)dXShadow + fTextWidth + dItalicAdd, fPageHeight - (float) ( dYShadow /*+ fBaseLineOffset*/ - fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
......@@ -1694,11 +1694,11 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
{
return hRes;
}
if ( S_OK != ( hRes = MoveTo( (float)dXShadow, fPageHeight - ( (float)dYShadow + fBaseLineOffset + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
if ( S_OK != ( hRes = MoveTo( (float)dXShadow, fPageHeight - ( (float)dYShadow /*+ fBaseLineOffset*/ + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
{
return hRes;
}
if ( S_OK != ( hRes = LineTo( (float)dXShadow + fTextWidth, fPageHeight - ( (float)dYShadow + fBaseLineOffset + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
if ( S_OK != ( hRes = LineTo( (float)dXShadow + fTextWidth, fPageHeight - ( (float)dYShadow/* + fBaseLineOffset*/ + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
{
return hRes;
}
......@@ -1840,7 +1840,7 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
}
// Выводим текст
if ( S_OK != ( hRes = TextOut_( (float)fX, fPageHeight - (float) (fY + fBaseLineOffset), bsCodedString ) ) )
if ( S_OK != ( hRes = TextOut_( (float)fX, fPageHeight - (float) (fY /*+ fBaseLineOffset*/), bsCodedString ) ) )
{
return hRes;
}
......@@ -1861,11 +1861,11 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
double dItalicAdd = tan( (double)dItalicAngle ) * fXHeight * fFontSize / 2;
if ( !m_oFont.Italic )
dItalicAdd = 0;
if ( S_OK != ( hRes = MoveTo( (float)fX + dItalicAdd, fPageHeight - (float) ( fY + fBaseLineOffset - fXHeight * fFontSize / 2 ) ) ) )
if ( S_OK != ( hRes = MoveTo( (float)fX + dItalicAdd, fPageHeight - (float) ( fY /*+ fBaseLineOffset*/ - fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
if ( S_OK != ( hRes = LineTo( (float)fX + fTextWidth + dItalicAdd, fPageHeight - (float) ( fY + fBaseLineOffset - fXHeight * fFontSize / 2 ) ) ) )
if ( S_OK != ( hRes = LineTo( (float)fX + fTextWidth + dItalicAdd, fPageHeight - (float) ( fY/* + fBaseLineOffset */- fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
......@@ -1890,11 +1890,11 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
{
return hRes;
}
if ( S_OK != ( hRes = MoveTo( (float)fX, fPageHeight - (float) (fY + fBaseLineOffset + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
if ( S_OK != ( hRes = MoveTo( (float)fX, fPageHeight - (float) (fY /*+ fBaseLineOffset */+ fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
{
return hRes;
}
if ( S_OK != ( hRes = LineTo( (float)fX + fTextWidth, fPageHeight - (float) (fY + fBaseLineOffset + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
if ( S_OK != ( hRes = LineTo( (float)fX + fTextWidth, fPageHeight - (float) (fY /*+ fBaseLineOffset*/ + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
{
return hRes;
}
......@@ -2582,14 +2582,14 @@ HRESULT CPdfWriterLib::PathCommandGetCurrentPoint (double *pfX, double *pfY)
}
HRESULT CPdfWriterLib::PathCommandText (const std::wstring & bsText, const double & fX, const double & fY,
const double & fWidth, const double & fHeight, const double & fBaseLineOffset )
const double & fWidth, const double & fHeight)//t, const double & fBaseLineOffset )
{
// В данная команда может прийти либо для обводки текста, либо для клипа по тексту
CommandDrawText( bsText, fX, fY, fWidth, fHeight, fBaseLineOffset );
CommandDrawText( bsText, fX, fY, fWidth, fHeight);//, fBaseLineOffset );
return S_OK;
}
HRESULT CPdfWriterLib::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT CPdfWriterLib::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
//if (!CheckValidate())
// return S_FALSE;
......@@ -2602,22 +2602,22 @@ HRESULT CPdfWriterLib::PathCommandTextCHAR(const LONG& c, const double& x, const
return S_OK;
}
HRESULT CPdfWriterLib::PathCommandTextEx (const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CPdfWriterLib::PathCommandTextEx (const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
// В данная команда может прийти либо для обводки текста, либо для клипа по тексту
CommandDrawTextEx( bsUnicodeText, bsGidText/*, bsSrcCodeText*/, x, y, w, h, baselineOffset, lFlags );
CommandDrawTextEx( bsUnicodeText,pGids, nGidsCount/*bsGidText*//*, bsSrcCodeText*/, x, y, w, h);//, baselineOffset, lFlags );
return S_OK;
}
HRESULT CPdfWriterLib::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT CPdfWriterLib::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (gid >= 0)
{
m_oFont.StringGID = 1;
return PathCommandTextCHAR(gid, x, y, w, h, baselineOffset);
return PathCommandTextCHAR(gid, x, y, w, h);//, baselineOffset);
}
m_oFont.StringGID = 0;
return PathCommandTextCHAR(c, x, y, w, h, baselineOffset);
return PathCommandTextCHAR(c, x, y, w, h);//, baselineOffset);
}
//--------- Функции для вывода изображений -------------------------------------------------------
......
......@@ -3435,11 +3435,12 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const CString&
oXmlWriter.m_bIsTop = (1 == m_nCurrentIndexObject) ? true : false;
#if defined(BUILD_CONFIG_FULL_VERSION) && defined(AVS_USE_CONVERT_PPTX_TOCUSTOM_VML)
if (NULL == m_pOOXToVMLRenderer)
m_pOOXToVMLRenderer = new COOXToVMLGeometry();
oXmlWriter.m_pOOXToVMLRenderer = m_pOOXToVMLRenderer;
#endif
//TODOOO
//#if defined(BUILD_CONFIG_FULL_VERSION) && defined(AVS_USE_CONVERT_PPTX_TOCUSTOM_VML)
// if (NULL == m_pOOXToVMLRenderer)
// m_pOOXToVMLRenderer = new COOXToVMLGeometry();
// oXmlWriter.m_pOOXToVMLRenderer = m_pOOXToVMLRenderer;
//#endif
if(bOle)
{
if (oElem.is<PPTX::Logic::Shape>())
......
......@@ -33,7 +33,7 @@ namespace NSWMFToImageConverter
{
m_pSVGRenderer = new NSHtmlRenderer::CASCSVGWriter();
}
if(NULL != m_pFontManager)
if(NULL != m_pFontManager && m_pSVGRenderer)
m_pSVGRenderer->SetFontManager(m_pFontManager);
}
......
......@@ -508,7 +508,7 @@ HRESULT NSPresentationEditor::CSVGConverter::put_EdgeDist(const double& val)
return S_OK;
}
//-------- --------------------------------------------------------
HRESULT NSPresentationEditor::CSVGConverter::CommandDrawText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight, const double& fBaseLineOffset)
HRESULT NSPresentationEditor::CSVGConverter::CommandDrawText(const std::wstring& bsText, const double& fX, const double& fY, const double& fWidth, const double& fHeight)//, const double& fBaseLineOffset)
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
......@@ -517,7 +517,7 @@ HRESULT NSPresentationEditor::CSVGConverter::CommandDrawText(const std::wstring&
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandText(bsText, fX, fY, fWidth, fHeight, fBaseLineOffset);
PathCommandText(bsText, fX, fY, fWidth, fHeight);//, fBaseLineOffset);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -534,13 +534,13 @@ HRESULT NSPresentationEditor::CSVGConverter::CommandDrawText(const std::wstring&
return S_OK;
}
HRESULT NSPresentationEditor::CSVGConverter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CSVGConverter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (abs(m_dTransformAngle) > 1)
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, bsGidText, x, y, w, h, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount, x, y, w, h);//, baselineOffset, lFlags);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -691,23 +691,24 @@ HRESULT NSPresentationEditor::CSVGConverter::PathCommandGetCurrentPoint(double*
m_pSimpleGraphicsConverter->PathCommandGetCurrentPoint(fX, fY);
return S_OK;
}
HRESULT NSPresentationEditor::CSVGConverter::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT NSPresentationEditor::CSVGConverter::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, baselineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h,0/*, baselineOffset*/);
return S_OK;
}
HRESULT NSPresentationEditor::CSVGConverter::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CSVGConverter::PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
bool bGid = m_oFont.StringGID;
if (NULL != bsGidText)
{
m_oFont.StringGID = true;
PathCommandText(bsGidText, x, y, w, h, baselineOffset);
}
//TODOOO
//if (NULL != bsGidText)
//{
// m_oFont.StringGID = true;
// PathCommandText(bsGidText, x, y, w, h);//, baselineOffset);
//}
m_oFont.StringGID = false;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
PathCommandText(sText, x, y, w, h);//, baselineOffset);
m_oFont.StringGID = bGid;
return S_OK;
......
......@@ -124,11 +124,11 @@ namespace NSPresentationEditor
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex) { return S_OK;}
//-------- --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) { return S_OK;}
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) { return S_OK;}
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) { return S_OK;}
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) { return S_OK;}
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h) ;
//-------- ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType) ;
......@@ -147,11 +147,11 @@ namespace NSPresentationEditor
virtual HRESULT PathCommandStart() ;
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y) ;
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) { return S_OK;}
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) ;
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) {return S_OK;}
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) { return S_OK;}
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags) ;
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) {return S_OK;}
virtual HRESULT PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h) ;
//-------- ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h) ;
......
......@@ -717,17 +717,17 @@ namespace SVG
if ( FontTextAnchorStart == element->GetFontStyle().LongAttribute(FontTextAnchor))
{
m_render->CommandDrawText ( bsText, element->m_Pos.X, element->m_Pos.Y, BoundX, 0.0, OffSetY );
m_render->CommandDrawText ( bsText, element->m_Pos.X, element->m_Pos.Y, BoundX, 0.0/*, OffSetY */);
}
if ( FontTextAnchorMiddle == element->GetFontStyle().LongAttribute(FontTextAnchor))
{
m_render->CommandDrawText ( bsText, element->m_Pos.X - BoundX * 0.5, element->m_Pos.Y, BoundX, 0.0, OffSetY );
m_render->CommandDrawText ( bsText, element->m_Pos.X - BoundX * 0.5, element->m_Pos.Y, BoundX, 0.0/*, OffSetY */);
}
if (FontTextAnchorEnd == element->GetFontStyle ().LongAttribute(FontTextAnchor))
{
m_render->CommandDrawText ( bsText, element->m_Pos.X - BoundX, element->m_Pos.Y, BoundX, 0.0, OffSetY );
m_render->CommandDrawText ( bsText, element->m_Pos.X - BoundX, element->m_Pos.Y, BoundX, 0.0/*, OffSetY */);
}
DoClip (element->GetClip(), false);
......
......@@ -519,7 +519,7 @@ HRESULT NSPresentationEditor::CShapeWriter::put_EdgeDist(double val)
return S_OK;
}
//-------- --------------------------------------------------------
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
......@@ -528,7 +528,7 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring&
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandText(bsText, x, y, w, h, baselineOffset);
PathCommandText(bsText, x, y, w, h);//, baselineOffset);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -537,22 +537,22 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandDrawText(const std::wstring&
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
return S_OK;
......@@ -573,13 +573,13 @@ HRESULT NSPresentationEditor::CShapeWriter::CommandString(const LONG& lType, con
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CShapeWriter::CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
if (true)
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, bsGidText,x, y, w, h, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount ,x, y, w, h);//, baselineOffset, lFlags);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -736,23 +736,24 @@ HRESULT NSPresentationEditor::CShapeWriter::PathCommandGetCurrentPoint(double* f
m_pSimpleGraphicsConverter->PathCommandGetCurrentPoint(fX, fY);
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset)
HRESULT NSPresentationEditor::CShapeWriter::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset)
{
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, baselineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, 0);//, baselineOffset);
return S_OK;
}
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags)
HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h)//, const double& baselineOffset, const DWORD& lFlags)
{
bool bGid = m_oFont.StringGID;
if (NULL != bsGidText)
{
m_oFont.StringGID = true;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
}
//TODOO
//if (NULL != bsGidText)
//{
// m_oFont.StringGID = true;
// PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
//}
m_oFont.StringGID = false;
PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset);
PathCommandText(bsUnicodeText, x, y, w, h);//, baselineOffset);
m_oFont.StringGID = bGid;
return S_OK;
......
......@@ -334,11 +334,11 @@ namespace NSPresentationEditor
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h);
//-------- ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType);
......@@ -357,11 +357,11 @@ namespace NSPresentationEditor
virtual HRESULT PathCommandStart() ;
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y);
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) ;
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT PathCommandTextEx(const std::wstring& sText, const unsigned int* pGids, const unsigned int nGidsCount, const double& x, const double& y, const double& w, const double& h) ;
//-------- ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h) ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment