From b520ed6c955896ee46a40dc141adf90b216bb67d Mon Sep 17 00:00:00 2001 From: Kulikova Svetlana Date: Tue, 27 Oct 2020 13:15:15 +0300 Subject: [PATCH] fix build --- .../doctrenderer/embed/GraphicsEmbed.cpp | 1 + DesktopEditor/doctrenderer/graphics.cpp | 5 ++ DesktopEditor/doctrenderer/graphics.h | 87 +++++-------------- 3 files changed, 27 insertions(+), 66 deletions(-) diff --git a/DesktopEditor/doctrenderer/embed/GraphicsEmbed.cpp b/DesktopEditor/doctrenderer/embed/GraphicsEmbed.cpp index 9931d06c09..522a6a85db 100644 --- a/DesktopEditor/doctrenderer/embed/GraphicsEmbed.cpp +++ b/DesktopEditor/doctrenderer/embed/GraphicsEmbed.cpp @@ -176,6 +176,7 @@ JSSmart CGraphicsEmbed::SetFont(JSSmart path, JSSmart CGraphicsEmbed::SetTextPr(JSSmart textPr, JSSmart theme) { m_pInternal->SetTextPr(); + return NULL; } JSSmart CGraphicsEmbed::SetFontSlot(JSSmart path, JSSmart face, JSSmart size, JSSmart style) { diff --git a/DesktopEditor/doctrenderer/graphics.cpp b/DesktopEditor/doctrenderer/graphics.cpp index 2ca951c572..030f198535 100644 --- a/DesktopEditor/doctrenderer/graphics.cpp +++ b/DesktopEditor/doctrenderer/graphics.cpp @@ -218,6 +218,11 @@ void CGraphics::SetIntegerGrid(bool param) m_pRenderer->put_IntegerGrid(param); } +bool CGraphics::GetIntegerGrid() +{ + return m_pRenderer->get_IntegerGrid(); +} + void CGraphics::DrawHeaderEdit(double yPos, BYTE lock_type) { m_pRenderer->PathCommandEnd(); diff --git a/DesktopEditor/doctrenderer/graphics.h b/DesktopEditor/doctrenderer/graphics.h index a3ac111a98..9f16ce9571 100644 --- a/DesktopEditor/doctrenderer/graphics.h +++ b/DesktopEditor/doctrenderer/graphics.h @@ -48,7 +48,6 @@ namespace NSGraphics CGrStatePenBrush() { m_eType = gstPenBrush; } }; - class CGraphics; class CHist_Clip { public: @@ -61,44 +60,32 @@ namespace NSGraphics public: CHist_Clip() : IsPath(false), Path(NULL), IsIntegerGrid(false) {} - - void ToRenderer(CGraphics* pRenderer); }; class CGrStateState : public IGrState + { + public: + Aggplus::CMatrix Transform; + bool IsIntegerGrid; + std::vector Clips; + + public: + CGrStateState() { - public: - Aggplus::CMatrix Transform; - bool IsIntegerGrid; - std::vector Clips; - - public: - CGrStateState() + m_eType = gstState; + IsIntegerGrid = false; + } + ~CGrStateState() + { + size_t nCount = Clips.size(); + for (size_t i = 0; i < nCount; ++i) { - m_eType = gstState; - IsIntegerGrid = false; + CHist_Clip* pClip = Clips[i]; + RELEASEOBJECT(pClip); } - ~CGrStateState() - { - size_t nCount = Clips.size(); - for (size_t i = 0; i < nCount; ++i) - { - CHist_Clip* pClip = Clips[i]; - RELEASEOBJECT(pClip); - } - Clips.clear(); - } - - template - void ApplyClips(T* pRenderer) - { - size_t nCount = Clips.size(); - for (size_t i = 0; i < nCount; ++i) - { - Clips[i]->ToRenderer(pRenderer); - } - } - }; + Clips.clear(); + } + }; class CGrState { @@ -118,28 +105,6 @@ namespace NSGraphics RELEASEOBJECT(pState); Clips.clear(); } - - void Save() - { - SavePen(); - SaveBrush(); - SaveGrState(); - } - void Restore() - { - RestoreGrState(); - RestoreBrush(); - RestorePen(); - } - - void StartClipPath() - { - // реализовать, как понадобится - } - void EndClipPath() - { - // реализовать, как понадобится - } }; class CGraphics @@ -214,7 +179,7 @@ namespace NSGraphics void private_FillGlyphC() {} void private_FillGlyph2() {} void SetIntegerGrid(bool param); - bool GetIntegerGrid() {} + bool GetIntegerGrid(); void DrawStringASCII() {} void DrawStringASCII2() {} void DrawHeaderEdit(double yPos, BYTE lock_type); @@ -262,16 +227,6 @@ namespace NSGraphics void DrawPolygon() {} void DrawFootnoteRect() {} }; - - void CHist_Clip::ToRenderer(CGraphics* pRenderer) - { - if (!IsPath) - { - pRenderer->StartClipPath(); - pRenderer->rect(Rect.left, Rect.top, Rect.GetWidth(), Rect.GetHeight()); - pRenderer->EndClipPath(); - } - } } #endif // CGRAPHICS_H