get glyphs from c++

This commit is contained in:
Kulikova Svetlana
2021-07-13 12:55:13 +03:00
parent 5f96f5dbb7
commit 72edf8e89d
8 changed files with 268 additions and 3 deletions

View File

@ -207,6 +207,20 @@ BYTE* CXpsFile::ConvertToPixels(int nPageIndex, int nRasterW, int nRasterH)
RELEASEINTERFACE(pFontManager);
RELEASEOBJECT(pRenderer);
oFrame.ClearNoAttack();
#ifdef BUILDING_WASM_MODULE
BYTE* pGlyphs = NULL;
DWORD dGlyphs = 0;
m_pInternal->m_pDocument->GetPageGlyphs(nPageIndex, pGlyphs, dGlyphs);
if (pGlyphs && dGlyphs)
{
BYTE* pRes = new BYTE[nWidth * nHeight * 4 + dGlyphs];
memcpy(pRes, pBgraData, nWidth * nHeight * 4);
memcpy(pRes + nWidth * nHeight * 4, pGlyphs, dGlyphs);
RELEASEARRAYOBJECTS(pBgraData);
return pRes;
}
#endif
return pBgraData;
}
void CXpsFile::ConvertToRaster(int nPageIndex, const std::wstring& wsDstPath, int nImageType, const int nRasterW, const int nRasterH)