mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-15 21:49:48 +08:00
Fix coords
This commit is contained in:
@ -812,6 +812,7 @@ void CPdfReader::DrawPageOnRenderer(IRenderer* pRenderer, int _nPageIndex, bool*
|
||||
|
||||
((GlobalParamsAdaptor*)globalParams)->ClearRedact();
|
||||
|
||||
pRenderer->SetTransform(1, 0, 0, 1, 0, 0);
|
||||
for (int i = 0 ; i < m_vRedact.size(); ++i)
|
||||
{
|
||||
if (m_vRedact[i]->m_nPageIndex == _nPageIndex)
|
||||
@ -827,12 +828,13 @@ void CPdfReader::DrawPageOnRenderer(IRenderer* pRenderer, int _nPageIndex, bool*
|
||||
ret = *((int*)pMemory);
|
||||
double B = ret / 100000.0;
|
||||
LONG lColor = (LONG)(((LONG)(R * 255)) | ((LONG)(G * 255) << 8) | ((LONG)(B * 255) << 16) | ((LONG)255 << 24));
|
||||
pRenderer->PathCommandClose();
|
||||
|
||||
pRenderer->PathCommandEnd();
|
||||
pRenderer->put_BrushColor1(lColor);
|
||||
pRenderer->PathCommandMoveTo(m_vRedact[i]->m_arrRedactBox[0], m_vRedact[i]->m_arrRedactBox[1]);
|
||||
pRenderer->PathCommandLineTo(m_vRedact[i]->m_arrRedactBox[0], m_vRedact[i]->m_arrRedactBox[3]);
|
||||
pRenderer->PathCommandLineTo(m_vRedact[i]->m_arrRedactBox[2], m_vRedact[i]->m_arrRedactBox[3]);
|
||||
pRenderer->PathCommandLineTo(m_vRedact[i]->m_arrRedactBox[2], m_vRedact[i]->m_arrRedactBox[1]);
|
||||
pRenderer->PathCommandMoveTo(PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[0]), PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[1]));
|
||||
pRenderer->PathCommandLineTo(PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[0]), PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[3]));
|
||||
pRenderer->PathCommandLineTo(PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[2]), PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[3]));
|
||||
pRenderer->PathCommandLineTo(PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[2]), PdfReader::PDFCoordsToMM(m_vRedact[i]->m_arrRedactBox[1]));
|
||||
pRenderer->PathCommandClose();
|
||||
pRenderer->DrawPath(c_nWindingFillMode);
|
||||
pRenderer->PathCommandEnd();
|
||||
|
||||
Reference in New Issue
Block a user