mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53840 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
7234af2a2c
commit
f092256c4f
@ -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:
|
|||||||
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:
|
|||||||
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_
|
||||||
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user