mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix build
This commit is contained in:
@ -297,7 +297,7 @@ public:
|
||||
SetTransform(mass[0], mass[1], mass[2], mass[3], mass[4], mass[5]);
|
||||
return S_OK;
|
||||
}
|
||||
virtual HRESULT SetBaseTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6) { return S_OK; };
|
||||
virtual HRESULT SetBaseTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6) { return S_OK; }
|
||||
virtual HRESULT SetTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6) = 0;
|
||||
virtual HRESULT GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF) = 0;
|
||||
virtual HRESULT ResetTransform() = 0;
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include "../../Common/MetaFileUtils.h"
|
||||
#include "CEmfInterpretatorBase.h"
|
||||
#include "../EmfParser/CEmfParserBase.h"
|
||||
#include "../../../../xml/include/xmlwriter.h"
|
||||
|
||||
#include "../../Wmf/WmfInterpretator/CInterpretatorSvgBase.h"
|
||||
|
||||
|
||||
@ -1,7 +1,15 @@
|
||||
#include "CInterpretatorSvgBase.h"
|
||||
|
||||
#include "../../../BgraFrame.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#ifndef MININT8
|
||||
#define MAXUINT8 ((unsigned char)~((unsigned char)0))
|
||||
#define MAXINT8 ((char)(MAXUINT8 >> 1))
|
||||
#define MININT8 ((char)~MAXINT8)
|
||||
#endif
|
||||
|
||||
namespace MetaFile
|
||||
{
|
||||
#define MAXTRANSFORMSCALE 100.
|
||||
@ -836,7 +844,7 @@ namespace MetaFile
|
||||
m_unNumber = unNumber;
|
||||
}
|
||||
|
||||
void CHatchGenerator::SetStroke(double dWidth, int nColor, char chAlpha)
|
||||
void CHatchGenerator::SetStroke(double dWidth, int nColor, unsigned char chAlpha)
|
||||
{
|
||||
m_dStrokeWidth = dWidth;
|
||||
m_nStrokeColor = nColor;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define CINTERPRETATORSVGBASE_H
|
||||
|
||||
#include "../../xml/include/xmlwriter.h"
|
||||
#include "../../Common/MetaFileTypes.h"
|
||||
#include "../../MetaFile.h"
|
||||
|
||||
namespace MetaFile
|
||||
@ -13,7 +14,7 @@ namespace MetaFile
|
||||
|
||||
void SetSize(double dWidth, double dHeight);
|
||||
void SetStyleId(unsigned int unStyleId, unsigned int unNumber);
|
||||
void SetStroke(double dWidth, int nColor, char chAlpha = 255);
|
||||
void SetStroke(double dWidth, int nColor, unsigned char chAlpha = 255);
|
||||
void SetBKColor(int nColor);
|
||||
|
||||
bool GenerateHatch();
|
||||
@ -35,7 +36,7 @@ namespace MetaFile
|
||||
|
||||
double m_dStrokeWidth;
|
||||
int m_nStrokeColor;
|
||||
char m_chAlpha;
|
||||
unsigned char m_chAlpha;
|
||||
|
||||
double m_dWidth;
|
||||
double m_dHeight;
|
||||
@ -47,55 +48,55 @@ namespace MetaFile
|
||||
|
||||
class CInterpretatorSvgBase : public IOutputDevice
|
||||
{
|
||||
public:
|
||||
CInterpretatorSvgBase(IMetaFileBase* pParser, double dWidth, double dHeight);
|
||||
virtual ~CInterpretatorSvgBase();
|
||||
public:
|
||||
CInterpretatorSvgBase(IMetaFileBase* pParser, double dWidth, double dHeight);
|
||||
virtual ~CInterpretatorSvgBase();
|
||||
|
||||
void SetSize(double dWidth, double dHeight);
|
||||
void GetSize(double& dWidth, double& dHeight);
|
||||
void UpdateSize();
|
||||
void SetSize(double dWidth, double dHeight);
|
||||
void GetSize(double& dWidth, double& dHeight);
|
||||
void UpdateSize();
|
||||
|
||||
void SetXmlWriter(XmlUtils::CXmlWriter* pXmlWriter);
|
||||
XmlUtils::CXmlWriter* GetXmlWriter();
|
||||
void SetXmlWriter(XmlUtils::CXmlWriter* pXmlWriter);
|
||||
XmlUtils::CXmlWriter* GetXmlWriter();
|
||||
|
||||
std::wstring GetFile();
|
||||
void IncludeSvg(const std::wstring& wsSvg, const TRectD& oRect, const TRectD& oClipRect, TXForm *pTransform);
|
||||
private:
|
||||
void WriteNode(const std::wstring& wsNodeName, const NodeAttributes& arAttributes, const std::wstring& wsValueNode = L"");
|
||||
void WriteNodeBegin(const std::wstring& wsNodeName, const NodeAttributes& arAttributes);
|
||||
void WriteNodeEnd(const std::wstring& wsNodeName);
|
||||
void WriteText(const std::wstring& wsText, const TPointD& oCoord, const TRect& oBounds = TRect(), const TPointD& oScale = TPointD(1, 1));
|
||||
std::wstring GetFile();
|
||||
void IncludeSvg(const std::wstring& wsSvg, const TRectD& oRect, const TRectD& oClipRect, TXForm *pTransform);
|
||||
private:
|
||||
void WriteNode(const std::wstring& wsNodeName, const NodeAttributes& arAttributes, const std::wstring& wsValueNode = L"");
|
||||
void WriteNodeBegin(const std::wstring& wsNodeName, const NodeAttributes& arAttributes);
|
||||
void WriteNodeEnd(const std::wstring& wsNodeName);
|
||||
void WriteText(const std::wstring& wsText, const TPointD& oCoord, const TRect& oBounds = TRect(), const TPointD& oScale = TPointD(1, 1));
|
||||
|
||||
void AddStroke(NodeAttributes &arAttributes) const;
|
||||
void AddFill(NodeAttributes &arAttributes, double dWidth = 0, double dHeight = 0);
|
||||
void AddTransform(NodeAttributes &arAttributes, TXForm* pTransform = NULL) const;
|
||||
void AddClip(NodeAttributes &arAttributes);
|
||||
void AddStroke(NodeAttributes &arAttributes) const;
|
||||
void AddFill(NodeAttributes &arAttributes, double dWidth = 0, double dHeight = 0);
|
||||
void AddTransform(NodeAttributes &arAttributes, TXForm* pTransform = NULL) const;
|
||||
void AddClip(NodeAttributes &arAttributes);
|
||||
|
||||
void AddNoneFill(NodeAttributes &arAttributes) const;
|
||||
void AddNoneFill(NodeAttributes &arAttributes) const;
|
||||
|
||||
TPointD GetCutPos() const;
|
||||
TPointD GetCutPos() const;
|
||||
|
||||
std::wstring CreatePath(const IPath* pPath = NULL, const TXForm* pTransform = NULL);
|
||||
std::wstring CreateHatchStyle(unsigned int unHatchStyle, double dWidth, double dHeight);
|
||||
std::wstring CreateDibPatternStyle(IBrush *pBrush);
|
||||
std::wstring CreatePatternStyle(IBrush *pBrush);
|
||||
std::wstring CreateGradient(IBrush *pBrush);
|
||||
std::wstring CreatePath(const IPath* pPath = NULL, const TXForm* pTransform = NULL);
|
||||
std::wstring CreateHatchStyle(unsigned int unHatchStyle, double dWidth, double dHeight);
|
||||
std::wstring CreateDibPatternStyle(IBrush *pBrush);
|
||||
std::wstring CreatePatternStyle(IBrush *pBrush);
|
||||
std::wstring CreateGradient(IBrush *pBrush);
|
||||
|
||||
private:
|
||||
TSvgViewport m_oViewport;
|
||||
TPointD m_oSizeWindow;
|
||||
TPointD m_oScale;
|
||||
private:
|
||||
TSvgViewport m_oViewport;
|
||||
TPointD m_oSizeWindow;
|
||||
TPointD m_oScale;
|
||||
|
||||
std::wstring m_wsLastClipId;
|
||||
std::wstring m_wsLastClipId;
|
||||
|
||||
unsigned int m_unNumberDefs;
|
||||
std::wstring m_wsDefs;
|
||||
unsigned int m_unNumberDefs;
|
||||
std::wstring m_wsDefs;
|
||||
|
||||
IMetaFileBase *m_pParser;
|
||||
XmlUtils::CXmlWriter m_oXmlWriter;
|
||||
IMetaFileBase *m_pParser;
|
||||
XmlUtils::CXmlWriter m_oXmlWriter;
|
||||
|
||||
friend class CEmfInterpretatorSvg;
|
||||
friend class CWmfInterpretatorSvg;
|
||||
friend class CEmfInterpretatorSvg;
|
||||
friend class CWmfInterpretatorSvg;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
|
||||
#include "../WmfParser/CWmfParserBase.h"
|
||||
#include "CWmfInterpretatorBase.h"
|
||||
#include "../../../../xml/include/xmlwriter.h"
|
||||
|
||||
#include "CInterpretatorSvgBase.h"
|
||||
|
||||
namespace MetaFile
|
||||
|
||||
@ -108,7 +108,8 @@
|
||||
{
|
||||
"name": "wmf",
|
||||
"folder": "../../DesktopEditor/raster/Metafile/Wmf/",
|
||||
"files": ["WmfInterpretator/CWmfInterpretatorSvg.cpp", "WmfInterpretator/CWmfInterpretatorRender.cpp", "WmfInterpretator/CWmfInterpretator.cpp",
|
||||
"files": ["WmfInterpretator/CInterpretatorSvgBase.cpp", "WmfInterpretator/CWmfInterpretatorSvg.cpp",
|
||||
"WmfInterpretator/CWmfInterpretatorRender.cpp", "WmfInterpretator/CWmfInterpretator.cpp",
|
||||
"WmfParser/CWmfParser.cpp", "WmfParser/CWmfParserBase.cpp",
|
||||
"WmfClip.cpp", "WmfObjects.cpp", "WmfPlayer.cpp"]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user