DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * pause) { if (page == NULL) return FPDF_RENDER_FAILED; if (!pause) return FPDF_RENDER_FAILED; if (pause->version !=1) return FPDF_RENDER_FAILED; CPDF_Page* pPage = (CPDF_Page*)page; // FXMT_CSLOCK_OBJ(&pPage->m_PageLock); CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void*)1); if (pContext && pContext->m_pRenderer) { IFSDK_PAUSE_Adapter IPauseAdapter(pause); pContext->m_pRenderer->Continue(&IPauseAdapter); CPDF_ProgressiveRenderer::RenderStatus status = CPDF_ProgressiveRenderer::Failed; status = pContext->m_pRenderer->GetStatus(); return status; } return FPDF_RENDER_FAILED; }
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage) return; CRenderContext* pContext = (CRenderContext*)pPage->GetPrivateData((void*)1); if (!pContext) return; pContext->m_pDevice->RestoreState(); delete pContext; pPage->RemovePrivateData((void*)1); }
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) { if (page == NULL) return; CPDF_Page* pPage = (CPDF_Page*)page; // FXMT_CSLOCK_OBJ(&pPage->m_PageLock); CRenderContext * pContext = (CRenderContext*)pPage->GetPrivateData((void*)1); if (pContext) { pContext->m_pDevice->RestoreState(); delete pContext; pPage->RemovePrivateData((void*)1); } }
DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page, IFSDK_PAUSE* pause) { if (!pause || pause->version != 1) return FPDF_RENDER_FAILED; CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage) return FPDF_RENDER_FAILED; CRenderContext* pContext = (CRenderContext*)pPage->GetPrivateData((void*)1); if (pContext && pContext->m_pRenderer) { IFSDK_PAUSE_Adapter IPauseAdapter(pause); pContext->m_pRenderer->Continue(&IPauseAdapter); return CPDF_ProgressiveRenderer::ToFPDFStatus( pContext->m_pRenderer->GetStatus()); } return FPDF_RENDER_FAILED; }