mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 06:24:28 +08:00
get glyphs from c++
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user