Commit 1c98740b authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent dad0cae9
...@@ -51,8 +51,6 @@ INCLUDEPATH += \ ...@@ -51,8 +51,6 @@ INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include ../../DesktopEditor/freetype-2.5.2/include
SOURCES += \ SOURCES += \
src/HTMLRenderer.cpp \
src/HTMLRenderer2.cpp \
src/HTMLRenderer3.cpp src/HTMLRenderer3.cpp
HEADERS += \ HEADERS += \
...@@ -68,11 +66,6 @@ HEADERS += \ ...@@ -68,11 +66,6 @@ HEADERS += \
src/VectorGraphicsWriter2.h \ src/VectorGraphicsWriter2.h \
src/VMLWriter.h \ src/VMLWriter.h \
src/Writer.h \ src/Writer.h \
src/Writer2.h \
src/Writer3.h \
src/Writer4.h \
include/HTMLRenderer.h \
include/HTMLRenderer2.h \
include/HTMLRenderer3.h include/HTMLRenderer3.h
unix { unix {
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
class CASCHTMLRenderer_Private; class CASCHTMLRenderer_Private;
class CASCHTMLRenderer : public IRenderer class CASCHTMLRenderer : public IRenderer
{ {
public:
CASCHTMLRenderer();
~CASCHTMLRenderer();
public: public:
// тип рендерера----------------------------------------------------------------------------- // тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType); virtual HRESULT get_Type(LONG* lType);
......
...@@ -221,6 +221,16 @@ namespace NSHtmlRenderer ...@@ -221,6 +221,16 @@ namespace NSHtmlRenderer
LONG bottom; LONG bottom;
}; };
inline bool IsEqualMain(const Aggplus::CMatrix* pMatrix, const Aggplus::CMatrix* pMatrix2)
{
if (fabs(pMatrix->m_agg_mtx.sx - pMatrix2->m_agg_mtx.sx) < 0.001 &&
fabs(pMatrix->m_agg_mtx.sy - pMatrix2->m_agg_mtx.sy) < 0.001 &&
fabs(pMatrix->m_agg_mtx.shx - pMatrix2->m_agg_mtx.shx) < 0.001 &&
fabs(pMatrix->m_agg_mtx.shy - pMatrix2->m_agg_mtx.shy) < 0.001)
return true;
return false;
}
static RECT GetImageBounds(CBgraFrame* pFrame) static RECT GetImageBounds(CBgraFrame* pFrame)
{ {
BYTE* pBuffer = pFrame->get_Data(); BYTE* pBuffer = pFrame->get_Data();
...@@ -687,6 +697,21 @@ namespace NSHtmlRenderer ...@@ -687,6 +697,21 @@ namespace NSHtmlRenderer
*((WCHAR*)(m_pBuffer + m_lPosition)) = lValue; *((WCHAR*)(m_pBuffer + m_lPosition)) = lValue;
m_lPosition += sizeof(WCHAR); m_lPosition += sizeof(WCHAR);
} }
inline void WriteWCHAR_nocheck2(const int& lValue)
{
if (lValue < 0x10000)
{
*((USHORT*)(m_pBuffer + m_lPosition)) = lValue;
m_lPosition += 2;
}
else
{
int code = lValue - 0x10000;
*((USHORT*)(m_pBuffer + m_lPosition)) = 0xD800 | ((code >> 10) & 0x03FF);
*((USHORT*)(m_pBuffer + m_lPosition + 2)) = 0xDC00 | (code & 0x03FF);
m_lPosition += 4;
}
}
inline void WriteDouble_nocheck(const double& dValue) inline void WriteDouble_nocheck(const double& dValue)
{ {
// здесь никаких даблов. Сплошные округления // здесь никаких даблов. Сплошные округления
......
...@@ -42,6 +42,7 @@ namespace NSHtmlRenderer ...@@ -42,6 +42,7 @@ namespace NSHtmlRenderer
m_bInitH = oSrc.m_bInitH; m_bInitH = oSrc.m_bInitH;
m_pUpdater = oSrc.m_pUpdater; m_pUpdater = oSrc.m_pUpdater;
return *this;
} }
inline double GetWidth() inline double GetWidth()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -7,9 +7,9 @@ namespace NSHtmlRenderer ...@@ -7,9 +7,9 @@ namespace NSHtmlRenderer
class CTileInfo class CTileInfo
{ {
/* /*
_T("<htmltiling x=\"%.2lf\" y=\"%.2lf\" countx=\"%.2lf\" county=\"%.2lf\" stepx=\"%.2lf\" stepy=\"%.2lf\">\ _T("<htmltiling x=\"%.2lf\" y=\"%.2lf\" countx=\"%.2lf\" county=\"%.2lf\" stepx=\"%.2lf\" stepy=\"%.2lf\">\
<bbox x=\".2lf\" y=\"%.2lf\" r=\"%.2lf\" b=\"%.2lf\" />\ <bbox x=\".2lf\" y=\"%.2lf\" r=\"%.2lf\" b=\"%.2lf\" />\
<transform m1=\"%.2lf\" m2=\"%.2lf\" m3=\"%.2lf\" m4=\"%.2lf\" m5=\"%.2lf\" m6=\"%.2lf\" />\ <transform m1=\"%.2lf\" m2=\"%.2lf\" m3=\"%.2lf\" m4=\"%.2lf\" m5=\"%.2lf\" m6=\"%.2lf\" />\
</htmltiling> </htmltiling>
*/ */
...@@ -2117,4 +2117,4 @@ protected: ...@@ -2117,4 +2117,4 @@ protected:
return true; return true;
} }
}; };
} }
\ No newline at end of file
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