Commit 1c98740b authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent dad0cae9
......@@ -51,8 +51,6 @@ INCLUDEPATH += \
../../DesktopEditor/freetype-2.5.2/include
SOURCES += \
src/HTMLRenderer.cpp \
src/HTMLRenderer2.cpp \
src/HTMLRenderer3.cpp
HEADERS += \
......@@ -68,11 +66,6 @@ HEADERS += \
src/VectorGraphicsWriter2.h \
src/VMLWriter.h \
src/Writer.h \
src/Writer2.h \
src/Writer3.h \
src/Writer4.h \
include/HTMLRenderer.h \
include/HTMLRenderer2.h \
include/HTMLRenderer3.h
unix {
......
......@@ -6,6 +6,9 @@
class CASCHTMLRenderer_Private;
class CASCHTMLRenderer : public IRenderer
{
public:
CASCHTMLRenderer();
~CASCHTMLRenderer();
public:
// тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType);
......
......@@ -221,6 +221,16 @@ namespace NSHtmlRenderer
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)
{
BYTE* pBuffer = pFrame->get_Data();
......@@ -687,6 +697,21 @@ namespace NSHtmlRenderer
*((WCHAR*)(m_pBuffer + m_lPosition)) = lValue;
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)
{
// здесь никаких даблов. Сплошные округления
......
......@@ -42,6 +42,7 @@ namespace NSHtmlRenderer
m_bInitH = oSrc.m_bInitH;
m_pUpdater = oSrc.m_pUpdater;
return *this;
}
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.
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