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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53840 954022d7-b5bf-4e40-9824-e11837661b57
parent 7234af2a
...@@ -251,6 +251,7 @@ class CGraphics ...@@ -251,6 +251,7 @@ class CGraphics
friend class CBrushLinearGradient; friend class CBrushLinearGradient;
friend class CBrushTexture; friend class CBrushTexture;
friend class CImage; friend class CImage;
friend class CGraphicsRenderer;
protected: protected:
BYTE* m_pPixels; BYTE* m_pPixels;
...@@ -379,6 +380,9 @@ public: ...@@ -379,6 +380,9 @@ public:
void CalculateFullTransform(); void CalculateFullTransform();
bool IsClip(); bool IsClip();
inline Aggplus::CMatrix* GetFullTransform() { return &m_oFullTransform; }
inline Aggplus::CMatrix* GetCoordTransform() { return &m_oCoordTransform; }
protected: protected:
template<class Renderer> template<class Renderer>
......
...@@ -192,6 +192,23 @@ public: ...@@ -192,6 +192,23 @@ public:
void CreateFromBgraFrame(CBgraFrame* pFrame); void CreateFromBgraFrame(CBgraFrame* pFrame);
void Create(BYTE* pPixels, const Aggplus::CDoubleRect& oRect, LONG lWidthControl, LONG lHeightControl, Aggplus::CDIB* pDib = NULL); void Create(BYTE* pPixels, const Aggplus::CDoubleRect& oRect, LONG lWidthControl, LONG lHeightControl, Aggplus::CDIB* pDib = NULL);
void CreateFlip(BYTE* pPixels, const Aggplus::CDoubleRect& oRect, LONG lWidthControl, LONG lHeightControl, Aggplus::CDIB* pDib = NULL); void CreateFlip(BYTE* pPixels, const Aggplus::CDoubleRect& oRect, LONG lWidthControl, LONG lHeightControl, Aggplus::CDIB* pDib = NULL);
inline Aggplus::CMatrix* GetFullTransform()
{
return m_pRenderer->GetFullTransform();
}
inline void SetCoordTransformOffset(double dOffsetX, double dOffsetY)
{
Aggplus::CMatrix* pCoord = m_pRenderer->GetCoordTransform();
pCoord->m_agg_mtx.tx = dOffsetX;
pCoord->m_agg_mtx.ty = dOffsetY;
m_pRenderer->CalculateFullTransform();
}
inline void CalculateFullTransform()
{
m_pRenderer->CalculateFullTransform();
}
}; };
#endif // _BUILD_GRAPHICS_RENDERER_H_ #endif // _BUILD_GRAPHICS_RENDERER_H_
\ No newline at end of file
...@@ -203,4 +203,16 @@ namespace Aggplus ...@@ -203,4 +203,16 @@ namespace Aggplus
dst[i].Y = (float)y; dst[i].Y = (float)y;
} }
} }
bool CMatrix::IsIdentity() const
{
return m_agg_mtx.is_identity();
}
bool CMatrix::IsIdentity2() const
{
return agg::is_equal_eps(m_agg_mtx.sx, 1.0, agg::affine_epsilon) &&
agg::is_equal_eps(m_agg_mtx.shy, 0.0, agg::affine_epsilon) &&
agg::is_equal_eps(m_agg_mtx.shx, 0.0, agg::affine_epsilon) &&
agg::is_equal_eps(m_agg_mtx.sy, 1.0, agg::affine_epsilon);
}
} }
\ No newline at end of file
...@@ -39,6 +39,8 @@ public: ...@@ -39,6 +39,8 @@ public:
Status GetElements(double* m) const; Status GetElements(double* m) const;
void Reset(); void Reset();
bool IsIdentity() const;
bool IsIdentity2() const;
const CMatrix& operator=(const CMatrix& Src); const CMatrix& operator=(const CMatrix& Src);
......
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