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

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render_image.cpp

Issue 2334323005: Rename dictionary set and get methods (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render_image.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
index e23cab3546c57eaa5076d292ea01db2b8b3ba97a..6b842198edc69b53a34a1792d0d3de0031c8a980 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -444,7 +444,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
}
if (m_pRenderStatus->m_pDevice->GetDeviceClass() != FXDC_DISPLAY) {
CPDF_Object* pFilters =
- m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectBy(
+ m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectFor(
"Filter");
if (pFilters) {
if (pFilters->IsName()) {
@@ -490,7 +490,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() {
}
CPDF_Dictionary* pPageResources = pPage ? pPage->m_pPageResources : nullptr;
CPDF_Object* pCSObj =
- m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectBy(
+ m_pImageObject->GetImage()->GetStream()->GetDict()->GetDirectObjectFor(
"ColorSpace");
CPDF_ColorSpace* pColorSpace =
pDocument->LoadColorSpace(pCSObj, pPageResources);
@@ -954,12 +954,12 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
if (!pSMaskDict)
return nullptr;
- CPDF_Stream* pGroup = pSMaskDict->GetStreamBy("G");
+ CPDF_Stream* pGroup = pSMaskDict->GetStreamFor("G");
if (!pGroup)
return nullptr;
std::unique_ptr<CPDF_Function> pFunc;
- CPDF_Object* pFuncObj = pSMaskDict->GetDirectObjectBy("TR");
+ CPDF_Object* pFuncObj = pSMaskDict->GetDirectObjectFor("TR");
if (pFuncObj && (pFuncObj->IsDictionary() || pFuncObj->IsStream()))
pFunc = CPDF_Function::Load(pFuncObj);
@@ -971,7 +971,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
form.ParseContent(nullptr, nullptr, nullptr);
CFX_FxgeDevice bitmap_device;
- FX_BOOL bLuminosity = pSMaskDict->GetStringBy("S") != "Alpha";
+ FX_BOOL bLuminosity = pSMaskDict->GetStringFor("S") != "Alpha";
int width = pClipRect->right - pClipRect->left;
int height = pClipRect->bottom - pClipRect->top;
FXDIB_Format format;
@@ -987,12 +987,12 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
CPDF_Object* pCSObj = nullptr;
CPDF_ColorSpace* pCS = nullptr;
if (bLuminosity) {
- CPDF_Array* pBC = pSMaskDict->GetArrayBy("BC");
+ CPDF_Array* pBC = pSMaskDict->GetArrayFor("BC");
FX_ARGB back_color = 0xff000000;
if (pBC) {
CPDF_Dictionary* pDict = pGroup->GetDict();
- if (pDict && pDict->GetDictBy("Group"))
- pCSObj = pDict->GetDictBy("Group")->GetDirectObjectBy("CS");
+ if (pDict && pDict->GetDictFor("Group"))
+ pCSObj = pDict->GetDictFor("Group")->GetDirectObjectFor("CS");
else
pCSObj = nullptr;
pCS = m_pContext->GetDocument()->LoadColorSpace(pCSObj);
@@ -1026,7 +1026,7 @@ CFX_DIBitmap* CPDF_RenderStatus::LoadSMask(CPDF_Dictionary* pSMaskDict,
}
CPDF_Dictionary* pFormResource = nullptr;
if (form.m_pFormDict) {
- pFormResource = form.m_pFormDict->GetDictBy("Resources");
+ pFormResource = form.m_pFormDict->GetDictFor("Resources");
}
CPDF_RenderOptions options;
options.m_ColorMode = bLuminosity ? RENDER_COLOR_NORMAL : RENDER_COLOR_ALPHA;
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698