From 10325828345d8a865424474664e9dd13ad1caf7d Mon Sep 17 00:00:00 2001 From: "Oleg.Korshul" Date: Thu, 16 Jul 2015 16:29:21 +0000 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81?= =?UTF-8?q?=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D1=81=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BA=D1=81=D1=82=D0=BE=D0=BC=20(gids)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63567 954022d7-b5bf-4e40-9824-e11837661b57 --- DesktopEditor/fontengine/FontManager.cpp | 20 ++++++ DesktopEditor/fontengine/FontManager.h | 2 + DesktopEditor/fontengine/GlyphString.cpp | 26 +++++++ DesktopEditor/fontengine/GlyphString.h | 3 +- DesktopEditor/graphics/Graphics.cpp | 45 ++++++++++++ DesktopEditor/graphics/Graphics.h | 1 + DesktopEditor/graphics/GraphicsPath.cpp | 11 ++- DesktopEditor/graphics/GraphicsPath.h | 3 +- DesktopEditor/graphics/GraphicsRenderer.cpp | 70 ++++++++++++------- DesktopEditor/graphics/GraphicsRenderer.h | 20 +++--- DesktopEditor/graphics/IRenderer.h | 20 +++--- .../raster/Metafile/Common/MetaFileRenderer.h | 6 +- 12 files changed, 176 insertions(+), 51 deletions(-) diff --git a/DesktopEditor/fontengine/FontManager.cpp b/DesktopEditor/fontengine/FontManager.cpp index 246bfb10b1..080e5dd06a 100644 --- a/DesktopEditor/fontengine/FontManager.cpp +++ b/DesktopEditor/fontengine/FontManager.cpp @@ -273,6 +273,26 @@ INT CFontManager::LoadString2(const std::wstring &wsBuffer, const float &fX, con return TRUE; } +INT CFontManager::LoadString1(const unsigned int* pGids, const unsigned int& nGidsCount, const float &fX, const float &fY) +{ + if (NULL == m_pFont) + return FALSE; + + m_oString.SetString(pGids, nGidsCount, fX, fY); + m_pFont->GetString(m_oString); + return TRUE; +} + +INT CFontManager::LoadString2(const unsigned int* pGids, const unsigned int& nGidsCount, const float &fX, const float &fY) +{ + if (NULL == m_pFont) + return FALSE; + + m_oString.SetString(pGids, nGidsCount, fX, fY); + m_pFont->GetString2(m_oString); + return TRUE; +} + INT CFontManager::LoadString3(const LONG& gid, const float &fX, const float &fY) { if (NULL == m_pFont) diff --git a/DesktopEditor/fontengine/FontManager.h b/DesktopEditor/fontengine/FontManager.h index 4d4e694c0e..deea9ae1af 100644 --- a/DesktopEditor/fontengine/FontManager.h +++ b/DesktopEditor/fontengine/FontManager.h @@ -118,6 +118,8 @@ public: INT LoadString1(const std::wstring& wsBuffer, const float& fX, const float& fY); INT LoadString2(const std::wstring& wsBuffer, const float& fX, const float& fY); + INT LoadString1(const unsigned int* pGids, const unsigned int& nGidsCount, const float& fX, const float& fY); + INT LoadString2(const unsigned int* pGids, const unsigned int& nGidsCount, const float& fX, const float& fY); INT LoadString3(const LONG& gid, const float& fX, const float& fY); INT LoadString3C(const LONG& gid, const float& fX, const float& fY); INT LoadString2C(const LONG& wsBuffer, const float& fX, const float& fY); diff --git a/DesktopEditor/fontengine/GlyphString.cpp b/DesktopEditor/fontengine/GlyphString.cpp index 782a588e3f..9a41c12f54 100644 --- a/DesktopEditor/fontengine/GlyphString.cpp +++ b/DesktopEditor/fontengine/GlyphString.cpp @@ -129,6 +129,32 @@ CGlyphString::~CGlyphString() delete []m_pGlyphsBuffer; } +void CGlyphString::SetString(const unsigned int* pGids, const unsigned int& nGidsCount, float fX, float fY) +{ + m_fX = fX + m_fTransX; + m_fY = fY + m_fTransY; + + if ( m_pGlyphsBuffer ) + delete []m_pGlyphsBuffer; + + m_nGlyphIndex = 0; + m_nGlyphsCount = nGidsCount; + + if ( m_nGlyphsCount > 0 ) + { + m_pGlyphsBuffer = new TGlyph[m_nGlyphsCount]; + + for ( int nIndex = 0; nIndex < m_nGlyphsCount; ++nIndex ) + { + m_pGlyphsBuffer[nIndex].lUnicode = (long)pGids[nIndex]; + m_pGlyphsBuffer[nIndex].bBitmap = false; + } + } + else + { + m_pGlyphsBuffer = NULL; + } +} void CGlyphString::SetString(const std::wstring& wsString, float fX, float fY) { diff --git a/DesktopEditor/fontengine/GlyphString.h b/DesktopEditor/fontengine/GlyphString.h index 94b64516b2..0b7a636a9c 100644 --- a/DesktopEditor/fontengine/GlyphString.h +++ b/DesktopEditor/fontengine/GlyphString.h @@ -135,6 +135,7 @@ public: CGlyphString(const std::wstring& wsString, float fX = 0, float fY = 0); ~CGlyphString(); void SetString(const std::wstring& wsString, float fX = 0, float fY = 0); + void SetString(const unsigned int* pGids, const unsigned int& nGidsCount, float fX = 0, float fY = 0); void SetStringGID(const LONG& gid, float fX = 0, float fY = 0); void Reset(); int GetLength(); @@ -169,4 +170,4 @@ private: int m_nGlyphIndex; // Номер текущего символа }; -#endif /* _BUILD_GLYPH_STRING_H */ \ No newline at end of file +#endif /* _BUILD_GLYPH_STRING_H */ diff --git a/DesktopEditor/graphics/Graphics.cpp b/DesktopEditor/graphics/Graphics.cpp index ae6779f01b..0325d8133e 100644 --- a/DesktopEditor/graphics/Graphics.cpp +++ b/DesktopEditor/graphics/Graphics.cpp @@ -999,6 +999,51 @@ namespace Aggplus return TRUE; } + INT CGraphics::DrawString(const unsigned int* pGids, const unsigned int nGidsCount, CFontManager* pFont, CBrush* pBrush, double x, double y) + { + if (pBrush->GetType() != BrushTypeSolidColor) + return TRUE; + + CMatrix oMatrix = m_oBaseTransform; + oMatrix.Multiply(&m_oTransform, MatrixOrderPrepend); + + double mass[6]; + oMatrix.GetElements(mass); + + double _x = x; + double _y = y; + + CMatrix oM1 = oMatrix; + oM1.Invert(); + oM1.Multiply(&m_oFullTransform, MatrixOrderPrepend); + oM1.TransformPoint(_x, _y); + + pFont->SetTextMatrix((float)mass[0], (float)mass[1], (float)mass[2], (float)mass[3], (float)mass[4], (float)mass[5]); + + pFont->LoadString2(pGids, nGidsCount, (float)_x, (float)_y); + float fX = 0; + float fY = 0; + INT bRes = FALSE; + + while (TRUE) + { + TGlyph* pGlyph = NULL; + float fX = 0, fY = 0; + + bRes = pFont->GetNextChar2(pGlyph, fX, fY); + + if (FALSE == bRes) + break; + + if (NULL != pGlyph) + { + FillGlyph2((int)fX, (int)fY, pGlyph, pBrush); + } + } + + return TRUE; + } + INT CGraphics::DrawStringC(const LONG& lText, CFontManager* pFont, CBrush* pBrush, double x, double y) { if (pBrush->GetType() != BrushTypeSolidColor) diff --git a/DesktopEditor/graphics/Graphics.h b/DesktopEditor/graphics/Graphics.h index 2829a5e2bb..2348e6a83e 100644 --- a/DesktopEditor/graphics/Graphics.h +++ b/DesktopEditor/graphics/Graphics.h @@ -366,6 +366,7 @@ public: // отрисовка текста INT DrawString(const std::wstring& strText, CFontManager* pFont, CBrush* pBrush, double x, double y); + INT DrawString(const unsigned int* pGids, const unsigned int nGidsCount, CFontManager* pFont, CBrush* pBrush, double x, double y); INT DrawStringC(const LONG& lText, CFontManager* pFont, CBrush* pBrush, double x, double y); INT DrawStringPath(const std::wstring& strText, CFontManager* pFont, CBrush* pBrush, double x, double y); INT DrawStringPathC(const LONG& lText, CFontManager* pFont, CBrush* pBrush, double x, double y); diff --git a/DesktopEditor/graphics/GraphicsPath.cpp b/DesktopEditor/graphics/GraphicsPath.cpp index 149b9858a8..a65ab93ef2 100644 --- a/DesktopEditor/graphics/GraphicsPath.cpp +++ b/DesktopEditor/graphics/GraphicsPath.cpp @@ -405,6 +405,15 @@ namespace Aggplus pFont->LoadString1(strText, (float)x, (float)y); return (TRUE == pFont->GetStringPath(this)) ? Ok : InvalidParameter; } + Status CGraphicsPath::AddString(const unsigned int* pGids, const unsigned int nGidsCount, CFontManager* pFont, double x, double y) + { + if (NULL == pFont) + return InvalidParameter; + + pFont->LoadString1(pGids, nGidsCount, (float)x, (float)y); + return (TRUE == pFont->GetStringPath(this)) ? Ok : InvalidParameter; + } + Status CGraphicsPath::AddStringC(const LONG& lText, CFontManager* pFont, double x, double y) { if (NULL == pFont) @@ -1168,4 +1177,4 @@ namespace Aggplus return false; } -} \ No newline at end of file +} diff --git a/DesktopEditor/graphics/GraphicsPath.h b/DesktopEditor/graphics/GraphicsPath.h index 8079274fe6..96786a828f 100644 --- a/DesktopEditor/graphics/GraphicsPath.h +++ b/DesktopEditor/graphics/GraphicsPath.h @@ -70,6 +70,7 @@ public: virtual bool _CurveTo(double x1, double y1, double x2, double y2, double x3, double y3); virtual bool _Close(); Status AddString(const std::wstring& strText, CFontManager* pFont, double x, double y); + Status AddString(const unsigned int* pGids, const unsigned int nGidsCount, CFontManager* pFont, double x, double y); Status AddStringC(const LONG& lText, CFontManager* pFont, double x, double y); void z_Stroke(const NSStructures::CPen* Pen); void Widen(const NSStructures::CPen* Pen, const CMatrix* matrix, float flatness); @@ -151,4 +152,4 @@ protected: }; } -#endif // _BUILD_GRAPHICSPATH_H_ \ No newline at end of file +#endif // _BUILD_GRAPHICSPATH_H_ diff --git a/DesktopEditor/graphics/GraphicsRenderer.cpp b/DesktopEditor/graphics/GraphicsRenderer.cpp index 85285f8570..84d79c6871 100644 --- a/DesktopEditor/graphics/GraphicsRenderer.cpp +++ b/DesktopEditor/graphics/GraphicsRenderer.cpp @@ -586,7 +586,7 @@ HRESULT CGraphicsRenderer::put_FontFaceIndex(const int& lFaceIndex) } //-------- Функции для вывода текста -------------------------------------------------------- -HRESULT CGraphicsRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) +HRESULT CGraphicsRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) { if (c_nHyperlinkType == m_lCurrentCommandType) return S_OK; @@ -595,13 +595,13 @@ HRESULT CGraphicsRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, c _SetFont(); Aggplus::CBrush* pBrush = CreateBrush(&m_oBrush); - m_pRenderer->DrawStringC(c, m_pFontManager, pBrush, x, y + baselineOffset); + m_pRenderer->DrawStringC(c, m_pFontManager, pBrush, x, y); RELEASEOBJECT(pBrush); return S_OK; } -HRESULT CGraphicsRenderer::CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) +HRESULT CGraphicsRenderer::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; @@ -610,35 +610,46 @@ HRESULT CGraphicsRenderer::CommandDrawText(const std::wstring& bsText, const dou _SetFont(); Aggplus::CBrush* pBrush = CreateBrush(&m_oBrush); - m_pRenderer->DrawString(bsText, m_pFontManager, pBrush, x, y + baselineOffset); + m_pRenderer->DrawString(bsText, m_pFontManager, pBrush, x, y); RELEASEOBJECT(pBrush); return S_OK; } -HRESULT CGraphicsRenderer::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 CGraphicsRenderer::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 CGraphicsRenderer::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 CGraphicsRenderer::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 (!bsGidText.empty()) + if (NULL != pGids) { - m_oFont.StringGID = TRUE; - return CommandDrawText(bsGidText, x, y, w, h, baselineOffset); + m_oFont.StringGID = TRUE; + if (c_nHyperlinkType == m_lCurrentCommandType) + return S_OK; + + put_BrushType(c_BrushTypeSolid); + + _SetFont(); + + Aggplus::CBrush* pBrush = CreateBrush(&m_oBrush); + m_pRenderer->DrawString(pGids, nGidsCount, m_pFontManager, pBrush, x, y); + + RELEASEOBJECT(pBrush); + return S_OK; } - - m_oFont.StringGID = FALSE; - return CommandDrawText(bsUnicodeText, x, y, w, h, baselineOffset); + + m_oFont.StringGID = FALSE; + return CommandDrawText(bsUnicodeText, x, y, w, h); } //-------- Маркеры для команд --------------------------------------------------------------- @@ -909,7 +920,7 @@ HRESULT CGraphicsRenderer::PathCommandGetCurrentPoint(double* x, double* y) } // textpath -HRESULT CGraphicsRenderer::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) +HRESULT CGraphicsRenderer::PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) { if (!CheckValidate()) return S_FALSE; @@ -918,11 +929,11 @@ HRESULT CGraphicsRenderer::PathCommandTextCHAR(const LONG& c, const double& x, c // так как пат рисуется в миллиметрах - надо перевести пункты в миллиметры float fSize = (float)(0.3528 * m_oFont.Size); - m_pPath->AddStringC(c, m_pFontManager, x, y + baselineOffset); + m_pPath->AddStringC(c, m_pFontManager, x, y); return S_OK; } -HRESULT CGraphicsRenderer::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset) +HRESULT CGraphicsRenderer::PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) { if (!CheckValidate()) return S_FALSE; @@ -931,32 +942,41 @@ HRESULT CGraphicsRenderer::PathCommandText(const std::wstring& bsText, const dou // так как пат рисуется в миллиметрах - надо перевести пункты в миллиметры float fSize = (float)(0.3528 * m_oFont.Size); - m_pPath->AddString(bsText, m_pFontManager, x, y + baselineOffset); + m_pPath->AddString(bsText, m_pFontManager, x, y); return S_OK; } -HRESULT CGraphicsRenderer::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 CGraphicsRenderer::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 = TRUE; - return PathCommandTextCHAR(gid, x, y, w, h, baselineOffset); + return PathCommandTextCHAR(gid, x, y, w, h); } m_oFont.StringGID = FALSE; - return PathCommandTextCHAR(c, x, y, w, h, baselineOffset); + return PathCommandTextCHAR(c, x, y, w, h); } -HRESULT CGraphicsRenderer::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 CGraphicsRenderer::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) { - if (!bsGidText.empty()) + if (NULL != pGids) { m_oFont.StringGID = TRUE; - return PathCommandText(bsGidText, x, y, w, h, baselineOffset); + if (!CheckValidate()) + return S_FALSE; + + _SetFont(); + + // так как пат рисуется в миллиметрах - надо перевести пункты в миллиметры + float fSize = (float)(0.3528 * m_oFont.Size); + m_pPath->AddString(pGids, nGidsCount, m_pFontManager, x, y); + + return S_OK; } m_oFont.StringGID = FALSE; - return PathCommandText(bsUnicodeText, x, y, w, h, baselineOffset); + return PathCommandText(bsUnicodeText, x, y, w, h); } //-------- Функции для вывода изображений --------------------------------------------------- diff --git a/DesktopEditor/graphics/GraphicsRenderer.h b/DesktopEditor/graphics/GraphicsRenderer.h index 2e487021a2..4f115a8efa 100644 --- a/DesktopEditor/graphics/GraphicsRenderer.h +++ b/DesktopEditor/graphics/GraphicsRenderer.h @@ -169,11 +169,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); @@ -192,11 +192,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); diff --git a/DesktopEditor/graphics/IRenderer.h b/DesktopEditor/graphics/IRenderer.h index 434a898f03..e42f468228 100644 --- a/DesktopEditor/graphics/IRenderer.h +++ b/DesktopEditor/graphics/IRenderer.h @@ -221,11 +221,11 @@ public: virtual HRESULT put_FontFaceIndex(const int& lFaceIndex) = 0; //-------- Функции для вывода текста -------------------------------------------------------- - virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) = 0; - virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) = 0; - - virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) = 0; - 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) = 0; + virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) = 0; + virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) = 0; + + virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) = 0; + 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) = 0; //-------- Маркеры для команд --------------------------------------------------------------- virtual HRESULT BeginCommand(const DWORD& lType) = 0; @@ -244,11 +244,11 @@ public: virtual HRESULT PathCommandStart() = 0; virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y) = 0; - virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) = 0; - virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) = 0; - - virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) = 0; - 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) = 0; + virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h) = 0; + virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h) = 0; + + virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h) = 0; + 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) = 0; //-------- Функции для вывода изображений --------------------------------------------------- virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h) = 0; diff --git a/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h b/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h index f5295e0651..0295f1d825 100644 --- a/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h +++ b/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h @@ -300,7 +300,7 @@ namespace MetaFile if (NULL == pDx) { - m_pRenderer->CommandDrawText(wsText, dX, dY, 0, 0, 0); + m_pRenderer->CommandDrawText(wsText, dX, dY, 0, 0); } else { @@ -310,7 +310,7 @@ namespace MetaFile { std::wstring wsChar; wsChar += wsText.at(unCharIndex); - m_pRenderer->CommandDrawText(wsChar, dX + dOffset, dY, 0, 0, 0); + m_pRenderer->CommandDrawText(wsChar, dX + dOffset, dY, 0, 0); dOffset += (pDx[unCharIndex] * dKoefX); } } @@ -795,4 +795,4 @@ namespace MetaFile bool m_bStartedPath; }; } -#endif // _METAFILE_COMMON_METAFILERENDERER_H \ No newline at end of file +#endif // _METAFILE_COMMON_METAFILERENDERER_H