Commit dad0cae9 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent eb542da4
......@@ -835,6 +835,22 @@ namespace Aggplus
return PathCommandText(bsText, pManager, fX, fY, fWidth, fHeight, fBaseLineOffset);
}
bool CGraphicsPathSimpleConverter::PathCommandText2(const int* pUnicodes, const int* pGids, const int& nCount, CFontManager* pManager,
const double& x, const double& y, const double& w, const double& h)
{
if (NULL == pGids)
{
pManager->SetStringGID(FALSE);
pManager->LoadString1((const unsigned int*)pUnicodes, (unsigned int)nCount, (float)x, (float)y);
return (TRUE == pManager->GetStringPath(this)) ? true : false;
}
else
{
pManager->SetStringGID(TRUE);
pManager->LoadString1((const unsigned int*)pGids, (unsigned int)nCount, (float)x, (float)y);
return (TRUE == pManager->GetStringPath(this)) ? true : false;
}
}
bool CGraphicsPathSimpleConverter::PathCommandGetBounds(double& left, double& top, double& width, double &height)
{
......
......@@ -126,6 +126,10 @@ public:
bool PathCommandGetCurrentPoint(double* fX, double* fY);
bool PathCommandText(const std::wstring& bsText, CFontManager* pManager, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset);
bool PathCommandTextEx(std::wstring& bsText, std::wstring& bsGidText, CFontManager* pManager, double fX, double fY, double fWidth, double fHeight, double fBaseLineOffset, DWORD lFlags);
bool PathCommandText2(const int* pUnicodes, const int* pGids, const int& nCount, CFontManager* pManager,
const double& x, const double& y, const double& w, const double& h);
bool PathCommandGetBounds(double& left, double& top, double& width, double &height);
public:
......
......@@ -62,7 +62,7 @@ bool CBgraFrame::SaveFile(const std::wstring& strFileName, unsigned int nFileTyp
}
return true;
}
bool CBgraFrame::Resize(const long& nNewWidth, const long& nNewHeight)
bool CBgraFrame::Resize(const long& nNewWidth, const long& nNewHeight, bool bDestroyData)
{
CxImage img;
if (!img.CreateFromArray(m_pData, m_lWidth, m_lHeight, 32, 4 * m_lWidth, (m_lStride >= 0) ? true : false))
......@@ -72,6 +72,9 @@ bool CBgraFrame::Resize(const long& nNewWidth, const long& nNewHeight)
if (!img.Resample( nNewWidth, nNewHeight, 2/*bicubic spline interpolation*/, &imgDst ))
return false;
if (bDestroyData)
Destroy();
CxImageToMediaFrame( imgDst );
return true;
}
......
......@@ -81,7 +81,7 @@ public:
public:
bool OpenFile(const std::wstring& strFileName, unsigned int nFileType = 0); //0 - detect
bool SaveFile(const std::wstring& strFileName, unsigned int nFileType);
bool Resize(const long& nNewWidth, const long& nNewHeight);
bool Resize(const long& nNewWidth, const long& nNewHeight, bool bDestroyData = true);
private:
void CxImageToMediaFrame( CxImage& img );
......
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