43 if (!m_pCurrentLayer) {
44 if (m_LayerIndex >= m_pContext->CountLayers()) {
48 m_pCurrentLayer = m_pContext->GetLayer(m_LayerIndex);
49 m_LastObjectRendered = m_pCurrentLayer->GetObjectHolder()->end();
51 std::make_unique<CPDF_RenderStatus>(m_pContext, m_pDevice);
53 m_pRenderStatus->SetOptions(*m_pOptions);
54 m_pRenderStatus->SetTransparency(
55 m_pCurrentLayer->GetObjectHolder()->GetTransparency());
56 m_pRenderStatus->Initialize(
nullptr,
nullptr);
57 m_pDevice->SaveState();
58 m_ClipRect = m_pCurrentLayer->GetMatrix().GetInverse().TransformRect(
59 CFX_FloatRect(m_pDevice->GetClipBox()));
61 CPDF_PageObjectHolder::const_iterator iter;
62 CPDF_PageObjectHolder::const_iterator iterEnd =
63 m_pCurrentLayer->GetObjectHolder()->end();
64 if (m_LastObjectRendered != iterEnd) {
65 iter = m_LastObjectRendered;
68 iter = m_pCurrentLayer->GetObjectHolder()->begin();
70 int nObjsToGo = kStepLimit;
72 while (iter != iterEnd) {
78 if (m_pOptions->GetOptions().bBreakForMasks && pCurObj->IsImage() &&
79 pCurObj->AsImage()->GetImage()->IsMask()) {
80 if (m_pDevice->GetDeviceType() == DeviceType::kPrinter) {
81 m_LastObjectRendered = iter;
82 m_pRenderStatus->ProcessClipPath(pCurObj->clip_path(),
83 m_pCurrentLayer->GetMatrix());
88 if (m_pRenderStatus->ContinueSingleObject(
89 pCurObj, m_pCurrentLayer->GetMatrix(), pPause)) {
92 if (pCurObj->IsImage() && m_pRenderStatus->GetRenderOptions()
94 .bLimitedImageCache) {
95 m_pContext->GetPageCache()->CacheOptimization(
96 m_pRenderStatus->GetRenderOptions().GetCacheSizeLimit());
103 m_LastObjectRendered = iter;
104 if (nObjsToGo == 0) {
107 nObjsToGo = kStepLimit;
110 if (is_mask && iter != iterEnd)
113 if (m_pCurrentLayer->GetObjectHolder()->GetParseState() ==
114 CPDF_PageObjectHolder::ParseState::kParsed) {
115 m_pRenderStatus.reset();
116 m_pDevice->RestoreState(
false);
117 m_pCurrentLayer =
nullptr;
121 }
else if (is_mask) {
124 m_pCurrentLayer->GetObjectHolder()->ContinueParse(pPause);
125 if (m_pCurrentLayer->GetObjectHolder()->GetParseState() !=
126 CPDF_PageObjectHolder::ParseState::kParsed) {
const CFX_FloatRect & GetRect() const
virtual bool IsForm() const
virtual bool IsShading() const