Commit 608664db authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

SetTileImageDpi

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63057 954022d7-b5bf-4e40-9824-e11837661b57
parent b067d43c
......@@ -38,6 +38,8 @@ namespace Aggplus
#if defined (_LINUX) || defined (_QT)
m_bSwapRGB = true;
#endif
m_dDpiTile = -1;
}
CGraphics::CGraphics(int dwWidth, int dwHeight, int stride, BYTE* pBuffer) : m_dwConfigFlags(0)
......@@ -67,6 +69,8 @@ namespace Aggplus
#if defined (_LINUX) || defined (_QT)
m_bSwapRGB = true;
#endif
m_dDpiTile = -1;
}
CGraphics::CGraphics(CImage* pImage) : m_dwConfigFlags(0)
......@@ -101,6 +105,8 @@ namespace Aggplus
#if defined (_LINUX) || defined (_QT)
m_bSwapRGB = true;
#endif
m_dDpiTile = -1;
}
CGraphics::~CGraphics()
......@@ -852,6 +858,15 @@ namespace Aggplus
brushMatrix.Scale(dScaleX, dScaleY, Aggplus::MatrixOrderAppend);
}
if (ptxBrush->GetWrapMode() != Aggplus::WrapModeClamp && m_dDpiTile > 1)
{
double dScaleX = m_dDpiX / m_dDpiTile;
double dScaleY = m_dDpiY / m_dDpiTile;
brushMatrix.Scale(dScaleX, dScaleY, Aggplus::MatrixOrderAppend);
}
brushMatrix.Translate(x, y, Aggplus::MatrixOrderAppend);
brushMatrix.Multiply(&m_oFullTransform, MatrixOrderAppend);
ptxBrush->SetTransform(&brushMatrix);
......@@ -1553,7 +1568,7 @@ namespace Aggplus
agg::trans_affine coords = m_oCoordTransform.m_agg_mtx;
coords.invert();
mtx_Work.multiply(coords);
mtx_Work.premultiply(coords);
//mtx_Work.multiply(m_oFullTransform.m_agg_mtx);
mtx_Work.invert();
......
......@@ -202,6 +202,8 @@ public:
// for RGBA painting
bool m_bSwapRGB;
double m_dDpiTile;
public:
CGraphics();
......
......@@ -72,6 +72,7 @@ public:
void SaveBrush(NSStructures::CBrush& oBrush) { oBrush = m_oBrush; }
void RestoreBrush(const NSStructures::CBrush& oBrush) { m_oBrush = oBrush; }
void SetSwapRGB(bool bValue){ if (m_pRenderer) m_pRenderer->m_bSwapRGB = bValue; }
void SetTileImageDpi(const double& dDpi) { if (m_pRenderer) m_pRenderer->m_dDpiTile = dDpi; }
public:
// тип рендерера-----------------------------------------------------------------------------
......
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