Commit efb8f0e6 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@54904 954022d7-b5bf-4e40-9824-e11837661b57
parent d190fdaa
......@@ -67,6 +67,8 @@ public:
if (NULL == m_aT)
return FALSE;
m_nSize = nAllocSize;
}
return TRUE;
......
......@@ -1137,8 +1137,10 @@ namespace Aggplus
typedef agg::my_span_gradient<agg::rgba8> gradient_span_gen;
gradient_span_gen span_gen;
double dLinearAngle = m_oTransform.z_Rotation() + pBrush->GetAngle();
if( pBrush->IsRectable() )
span_gen.SetDirection( rect, pBrush->GetAngle(), pBrush->IsAngleScalable() );
span_gen.SetDirection( rect, (float)dLinearAngle, pBrush->IsAngleScalable() );
else
span_gen.SetDirection( rect );
......
......@@ -44,7 +44,13 @@ namespace Aggplus
{
for( int i = 0; i < nCountSubColors; i++ )
{
pColors[i] = Aggplus::CColor(255, pBrush->m_arrSubColors[i].color);
DWORD dwColor = (DWORD)pBrush->m_arrSubColors[i].color;
BYTE r = (dwColor >> 24) & 0xFF;
BYTE g = (dwColor >> 16) & 0xFF;
BYTE b = (dwColor >> 8) & 0xFF;
BYTE a = (dwColor) & 0xFF;
pColors[i] = Aggplus::CColor(a, b, g, r);
pBlends[i] = (float)(pBrush->m_arrSubColors[i].position / 65536.0);
}
......@@ -457,6 +463,18 @@ HRESULT CGraphicsRenderer::BrushRect(const BOOL& val, const double& left, const
m_oBrush.Rect.Height = (float)height;
return S_OK;
}
HRESULT CGraphicsRenderer::put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount)
{
m_oBrush.m_arrSubColors.RemoveAll();
for (LONG i = 0; i < nCount; ++i)
{
NSStructures::CBrush::TSubColor color;
color.color = lColors[i];
color.position = (long)(pPositions[i] * 65536);
m_oBrush.m_arrSubColors.Add(color);
}
return S_OK;
}
// font -------------------------------------------------------------------------------------
HRESULT CGraphicsRenderer::get_FontName(std::wstring* bsName)
......@@ -535,6 +553,7 @@ HRESULT CGraphicsRenderer::CommandDrawTextCHAR(const LONG& c, const double& x, c
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
put_BrushType(c_BrushTypeSolid);
_SetFont();
......@@ -549,6 +568,7 @@ HRESULT CGraphicsRenderer::CommandDrawText(const std::wstring& bsText, const dou
{
if (c_nHyperlinkType == m_lCurrentCommandType)
return S_OK;
put_BrushType(c_BrushTypeSolid);
_SetFont();
......
......@@ -127,6 +127,7 @@ public:
virtual HRESULT get_BrushLinearAngle(double* dAngle);
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
virtual HRESULT BrushRect(const BOOL& val, const double& left, const double& top, const double& width, const double& height);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName);
......
......@@ -170,6 +170,8 @@ public:
virtual HRESULT put_BrushLinearAngle(const double& dAngle) = 0;
virtual HRESULT BrushRect(const BOOL& val, const double& left, const double& top, const double& width, const double& height) = 0;
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount) = 0;
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName) = 0;
virtual HRESULT put_FontName(const std::wstring& bsName) = 0;
......
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