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 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 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);
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 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 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) ;;
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) ;
......
......@@ -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 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 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) { 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 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 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) {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 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 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) ;
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 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 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);
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