Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 1648233002: Merge to XFA: Member function name refactoring (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: more xfa changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "render_int.h" 7 #include "render_int.h"
8 8
9 #include "core/include/fpdfapi/fpdf_module.h" 9 #include "core/include/fpdfapi/fpdf_module.h"
10 #include "core/include/fpdfapi/fpdf_render.h" 10 #include "core/include/fpdfapi/fpdf_render.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 if (!buffer.Initialize(m_pContext, m_pDevice, rect, pObj, &m_Options, res)) { 439 if (!buffer.Initialize(m_pContext, m_pDevice, rect, pObj, &m_Options, res)) {
440 return; 440 return;
441 } 441 }
442 CFX_Matrix matrix = *pObj2Device; 442 CFX_Matrix matrix = *pObj2Device;
443 matrix.Concat(*buffer.GetMatrix()); 443 matrix.Concat(*buffer.GetMatrix());
444 GetScaledMatrix(matrix); 444 GetScaledMatrix(matrix);
445 CPDF_Dictionary* pFormResource = NULL; 445 CPDF_Dictionary* pFormResource = NULL;
446 if (pObj->m_Type == CPDF_PageObject::FORM) { 446 if (pObj->m_Type == CPDF_PageObject::FORM) {
447 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pObj; 447 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pObj;
448 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) { 448 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
449 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDict("Resources"); 449 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
450 } 450 }
451 } 451 }
452 CPDF_RenderStatus status; 452 CPDF_RenderStatus status;
453 status.Initialize(m_pContext, buffer.GetDevice(), buffer.GetMatrix(), NULL, 453 status.Initialize(m_pContext, buffer.GetDevice(), buffer.GetMatrix(), NULL,
454 NULL, NULL, &m_Options, m_Transparency, m_bDropObjects, 454 NULL, NULL, &m_Options, m_Transparency, m_bDropObjects,
455 pFormResource); 455 pFormResource);
456 status.RenderSingleObject(pObj, &matrix); 456 status.RenderSingleObject(pObj, &matrix);
457 buffer.OutputToDevice(); 457 buffer.OutputToDevice();
458 } 458 }
459 FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj, 459 FX_BOOL CPDF_RenderStatus::ProcessForm(CPDF_FormObject* pFormObj,
460 const CFX_Matrix* pObj2Device) { 460 const CFX_Matrix* pObj2Device) {
461 CPDF_Dictionary* pOC = pFormObj->m_pForm->m_pFormDict->GetDict("OC"); 461 CPDF_Dictionary* pOC = pFormObj->m_pForm->m_pFormDict->GetDictBy("OC");
462 if (pOC && m_Options.m_pOCContext && 462 if (pOC && m_Options.m_pOCContext &&
463 !m_Options.m_pOCContext->CheckOCGVisible(pOC)) { 463 !m_Options.m_pOCContext->CheckOCGVisible(pOC)) {
464 return TRUE; 464 return TRUE;
465 } 465 }
466 CFX_Matrix matrix = pFormObj->m_FormMatrix; 466 CFX_Matrix matrix = pFormObj->m_FormMatrix;
467 matrix.Concat(*pObj2Device); 467 matrix.Concat(*pObj2Device);
468 CPDF_Dictionary* pResources = NULL; 468 CPDF_Dictionary* pResources = NULL;
469 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) { 469 if (pFormObj->m_pForm && pFormObj->m_pForm->m_pFormDict) {
470 pResources = pFormObj->m_pForm->m_pFormDict->GetDict("Resources"); 470 pResources = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
471 } 471 }
472 CPDF_RenderStatus status; 472 CPDF_RenderStatus status;
473 status.Initialize(m_pContext, m_pDevice, NULL, m_pStopObj, this, pFormObj, 473 status.Initialize(m_pContext, m_pDevice, NULL, m_pStopObj, this, pFormObj,
474 &m_Options, m_Transparency, m_bDropObjects, pResources, 474 &m_Options, m_Transparency, m_bDropObjects, pResources,
475 FALSE); 475 FALSE);
476 status.m_curBlend = m_curBlend; 476 status.m_curBlend = m_curBlend;
477 m_pDevice->SaveState(); 477 m_pDevice->SaveState();
478 status.RenderObjectList(pFormObj->m_pForm, &matrix); 478 status.RenderObjectList(pFormObj->m_pForm, &matrix);
479 m_bStopped = status.m_bStopped; 479 m_bStopped = status.m_bStopped;
480 m_pDevice->RestoreState(); 480 m_pDevice->RestoreState();
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 if (pPageObj->m_Type == CPDF_PageObject::FORM) { 739 if (pPageObj->m_Type == CPDF_PageObject::FORM) {
740 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj; 740 CPDF_FormObject* pFormObj = (CPDF_FormObject*)pPageObj;
741 const CPDF_GeneralStateData* pStateData = 741 const CPDF_GeneralStateData* pStateData =
742 pFormObj->m_GeneralState.GetObject(); 742 pFormObj->m_GeneralState.GetObject();
743 if (pStateData) { 743 if (pStateData) {
744 group_alpha = pStateData->m_FillAlpha; 744 group_alpha = pStateData->m_FillAlpha;
745 } 745 }
746 Transparency = pFormObj->m_pForm->m_Transparency; 746 Transparency = pFormObj->m_pForm->m_Transparency;
747 bGroupTransparent = !!(Transparency & PDFTRANS_ISOLATED); 747 bGroupTransparent = !!(Transparency & PDFTRANS_ISOLATED);
748 if (pFormObj->m_pForm->m_pFormDict) { 748 if (pFormObj->m_pForm->m_pFormDict) {
749 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDict("Resources"); 749 pFormResource = pFormObj->m_pForm->m_pFormDict->GetDictBy("Resources");
750 } 750 }
751 } 751 }
752 FX_BOOL bTextClip = FALSE; 752 FX_BOOL bTextClip = FALSE;
753 if (pPageObj->m_ClipPath.NotNull() && pPageObj->m_ClipPath.GetTextCount() && 753 if (pPageObj->m_ClipPath.NotNull() && pPageObj->m_ClipPath.GetTextCount() &&
754 m_pDevice->GetDeviceClass() == FXDC_DISPLAY && 754 m_pDevice->GetDeviceClass() == FXDC_DISPLAY &&
755 !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP)) { 755 !(m_pDevice->GetDeviceCaps(FXDC_RENDER_CAPS) & FXRC_SOFT_CLIP)) {
756 bTextClip = TRUE; 756 bTextClip = TRUE;
757 } 757 }
758 if ((m_Options.m_Flags & RENDER_OVERPRINT) && 758 if ((m_Options.m_Flags & RENDER_OVERPRINT) &&
759 pPageObj->m_Type == CPDF_PageObject::IMAGE && pGeneralState && 759 pPageObj->m_Type == CPDF_PageObject::IMAGE && pGeneralState &&
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) { 1398 item.GetParamType() == CPDF_ContentMarkItem::PropertiesDict) {
1399 CPDF_Dictionary* pOCG = 1399 CPDF_Dictionary* pOCG =
1400 ToDictionary(static_cast<CPDF_Object*>(item.GetParam())); 1400 ToDictionary(static_cast<CPDF_Object*>(item.GetParam()));
1401 if (!CheckOCGVisible(pOCG)) { 1401 if (!CheckOCGVisible(pOCG)) {
1402 return FALSE; 1402 return FALSE;
1403 } 1403 }
1404 } 1404 }
1405 } 1405 }
1406 return TRUE; 1406 return TRUE;
1407 } 1407 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698