Commit 0e70539c authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

вытерты комменты

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63634 954022d7-b5bf-4e40-9824-e11837661b57
parent 909a7b0a
......@@ -396,13 +396,12 @@ 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)
{
//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)
//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;
......@@ -412,25 +411,25 @@ namespace NSHtmlRenderer
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandText(bsText, x, y, w, h/* baselineOffset*/);
PathCommandText(bsText, x, y, w, h);
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)
{
//todo new command
return S_OK;
}
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)
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)
{
if (m_bIsRaster)
return S_OK;
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, pGids,nGidsCount , x, y, w, h);//, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids,nGidsCount , x, y, w, h);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -607,26 +606,26 @@ 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)
{
//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)
{
if (m_bIsRaster)
return S_OK;
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight, 0);//, fBaseLineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight, 0);
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)
{
//todo new command
return S_OK;
}
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)
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)
{
if (m_bIsRaster)
return S_OK;
......@@ -641,7 +640,7 @@ namespace NSHtmlRenderer
//}
m_pFont->StringGID = 0;
PathCommandText(sText, x, y, w, h);//, baselineOffset);
PathCommandText(sText, x, y, w, h);
m_pFont->StringGID = bGid ? 1 : 0;
return S_OK;
......
......@@ -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)
{
//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)
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
PathCommandStart();
PathCommandText(bsText, x, y, w, h);//, baselineOffset);
PathCommandText(bsText, x, y, w, h);
//double dOldPenW = m_pPen->Size;
//long lOldPenC = m_pPen->Color;
......@@ -503,22 +503,22 @@ 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)
{
//todo new command
return S_OK;
}
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)
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)
{
//TODOOO
//if (!bsGidText.empty())
//{
// m_pFont->StringGID = TRUE;
// return CommandDrawText(bsGidText, x, y, w, h/*, baselineOffset*/);
// return CommandDrawText(bsGidText, x, y, w, h);
//}
m_pFont->StringGID = FALSE;
return CommandDrawText(bsUnicodeText, x, y, w, h/*, baselineOffset*/);
return CommandDrawText(bsUnicodeText, x, y, w, h);
return S_OK;
}
//-------- Маркеры для команд ---------------------------------------------------------------
......@@ -763,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)
{
//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)
{
if (NULL == m_pFontManager)
{
......@@ -777,25 +777,25 @@ namespace NSHtmlRenderer
}
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight,0);//, fBaseLineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, fX, fY, fWidth, fHeight,0);
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)
{
//todo new command
return S_OK;
}
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)
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)
{
//TODOOO
//if (!bsGidText.empty())
//{
// m_pFont->StringGID = TRUE;
// return PathCommandText(bsGidText, x, y, w, h);//, baselineOffset);
// return PathCommandText(bsGidText, x, y, w, h);
//}
m_pFont->StringGID = FALSE;
return PathCommandText(sText, x, y, w, h);//, baselineOffset);
return PathCommandText(sText, x, y, w, h);
}
//-------- Функции для вывода изображений ---------------------------------------------------
HRESULT CASCSVGRenderer::DrawImage(IGrObject* pImage, const double& fX, const double& fY, const double& fWidth, const double& fHeight)
......
......@@ -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)
{
//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)
{
if (gid >= 0)
{
m_oFont.StringGID = true;
return CommandDrawTextCHAR(gid, x, y, w, h);//, baselineOffset);
return CommandDrawTextCHAR(gid, x, y, w, h);
}
m_oFont.StringGID = false;
return CommandDrawTextCHAR(c, x, y, w, h);//, baselineOffset);
return CommandDrawTextCHAR(c, x, y, w, h);
}
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)
{
HRESULT hRes = S_OK;
......@@ -750,7 +750,6 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
double fWidth1 = MMToPDFCoords( fWidth );
double fHeight1 = MMToPDFCoords( fHeight );
//double fBaseLineOffset1 = MMToPDFCoords( fBaseLineOffset );
PToUnicode pToUnicode = FindToUnicodeForString( m_pDocument, bsText );
if ( !pToUnicode )
......@@ -986,7 +985,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), bsCodedString ) ;
if ( hRes != S_OK)
return hRes;
......@@ -1001,12 +1000,12 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
// 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 - fXHeight * fFontSize / 2 ) ) ) )
// {
// ::SysFreeString( bsCodedString );
// 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 - fXHeight * fFontSize / 2 ) ) ) )
// {
// ::SysFreeString( bsCodedString );
// return hRes;
......@@ -1028,12 +1027,12 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
// ::SysFreeString( bsCodedString );
// 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 + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
// {
// ::SysFreeString( bsCodedString );
// 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 + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
// {
// ::SysFreeString( bsCodedString );
// return hRes;
......@@ -1205,7 +1204,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), bsCodedString )))
return hRes;
if ( S_OK != ( hRes = EndText() ) )
......@@ -1224,11 +1223,11 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
// 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 - 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 - fXHeight * fFontSize / 2 ) ) ) )
// {
// return hRes;
// }
......@@ -1254,12 +1253,12 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
// ::SysFreeString( bsCodedString );
// 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 + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
// {
// ::SysFreeString( bsCodedString );
// 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 + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
// {
// ::SysFreeString( bsCodedString );
// return hRes;
......@@ -1316,8 +1315,8 @@ HRESULT CPdfWriterLib::CommandDrawText (const std::wstring & bsText,const double
return S_OK;
}
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 & fX1,const double & fY1,
const double & fWidth1, const double & fHeight1)
{
// TODO: Сделать обработку DrawTextEx тоже через Состояния рендерера
SetState( rendstateNone );
......@@ -1345,8 +1344,6 @@ HRESULT CPdfWriterLib::CommandDrawTextEx (const std::wstring & bsUnicodeText,con
double fWidth = MMToPDFCoords( fWidth1 );
double fHeight = MMToPDFCoords( fHeight1 );
//double fBaseLineOffset = MMToPDFCoords( fBaseLineOffset1 );
std::wstring bsCodedString;
// Запоминаем значения Bold и Italic, потому что в функции GdiFontToPdfFont они могут измениться
......@@ -1654,7 +1651,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), bsCodedString ) ) )
{
return hRes;
}
......@@ -1671,11 +1668,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 - 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 - fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
......@@ -1694,11 +1691,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 + 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 + fUnderLineOffset /*fDescent * fFontSize*/ ) ) ) )
{
return hRes;
}
......@@ -1840,7 +1837,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), bsCodedString ) ) )
{
return hRes;
}
......@@ -1861,11 +1858,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 - 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- fXHeight * fFontSize / 2 ) ) ) )
{
return hRes;
}
......@@ -1890,11 +1887,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 + 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 + fUnderLineOffset) /*fDescent * fFontSize*/ ) ) )
{
return hRes;
}
......@@ -2582,14 +2579,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)//t, const double & fBaseLineOffset )
const double & fWidth, const double & fHeight)
{
// В данная команда может прийти либо для обводки текста, либо для клипа по тексту
CommandDrawText( bsText, fX, fY, fWidth, fHeight);//, fBaseLineOffset );
CommandDrawText( bsText, fX, fY, fWidth, fHeight);
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)
{
//if (!CheckValidate())
// return S_FALSE;
......@@ -2602,22 +2599,22 @@ HRESULT CPdfWriterLib::PathCommandTextCHAR(const LONG& c, const double& x, const
return S_OK;
}
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)
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)
{
// В данная команда может прийти либо для обводки текста, либо для клипа по тексту
CommandDrawTextEx( bsUnicodeText,pGids, nGidsCount/*bsGidText*//*, bsSrcCodeText*/, x, y, w, h);//, baselineOffset, lFlags );
CommandDrawTextEx( bsUnicodeText,pGids, nGidsCount, x, y, w, h);
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)
{
if (gid >= 0)
{
m_oFont.StringGID = 1;
return PathCommandTextCHAR(gid, x, y, w, h);//, baselineOffset);
return PathCommandTextCHAR(gid, x, y, w, h);
}
m_oFont.StringGID = 0;
return PathCommandTextCHAR(c, x, y, w, h);//, baselineOffset);
return PathCommandTextCHAR(c, x, y, w, h);
}
//--------- Функции для вывода изображений -------------------------------------------------------
......
......@@ -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)
{
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);
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 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)
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)
{
if (abs(m_dTransformAngle) > 1)
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount, x, y, w, h);//, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount, x, y, w, h);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -691,24 +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)
{
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h,0/*, baselineOffset*/);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, 0);
return S_OK;
}
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)
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)
{
bool bGid = m_oFont.StringGID;
//TODOOO
//if (NULL != bsGidText)
//{
// m_oFont.StringGID = true;
// PathCommandText(bsGidText, x, y, w, h);//, baselineOffset);
// PathCommandText(bsGidText, x, y, w, h);
//}
m_oFont.StringGID = false;
PathCommandText(sText, x, y, w, h);//, baselineOffset);
PathCommandText(sText, x, y, w, h);
m_oFont.StringGID = bGid;
return S_OK;
......
......@@ -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)
{
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);
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)
{
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)
{
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)
{
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)
{
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 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)
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)
{
if (true)
{
PathCommandEnd();
BeginCommand(c_nPathType);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount ,x, y, w, h);//, baselineOffset, lFlags);
PathCommandTextEx(bsUnicodeText, pGids, nGidsCount ,x, y, w, h);
DrawPath(c_nWindingFillMode);
EndCommand(c_nPathType);
PathCommandEnd();
......@@ -736,13 +736,13 @@ 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)
{
_SetFont();
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, 0);//, baselineOffset);
m_pSimpleGraphicsConverter->PathCommandText(bsText, m_pFontManager, x, y, w, h, 0);
return S_OK;
}
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)
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)
{
bool bGid = m_oFont.StringGID;
//TODOO
......@@ -753,7 +753,7 @@ HRESULT NSPresentationEditor::CShapeWriter::PathCommandTextEx(const std::wstring
//}
m_oFont.StringGID = false;
PathCommandText(bsUnicodeText, x, y, w, h);//, baselineOffset);
PathCommandText(bsUnicodeText, x, y, w, h);
m_oFont.StringGID = bGid;
return S_OK;
......
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