summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp6
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h10
2 files changed, 12 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index f8a2b5de75..5e554623df 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1291,8 +1291,8 @@ RetainPtr<CPDF_TransferFunc> CPDF_RenderStatus::GetTransferFunc(
return pDocCache ? pDocCache->GetTransferFunc(pObj) : nullptr;
}
-FX_ARGB CPDF_RenderStatus::GetFillArgb(CPDF_PageObject* pObj,
- bool bType3) const {
+FX_ARGB CPDF_RenderStatus::GetFillArgbInternal(CPDF_PageObject* pObj,
+ bool bType3) const {
const CPDF_ColorState* pColorState = &pObj->m_ColorState;
if (!bType3 && Type3CharMissingFillColor(m_pType3Char.Get(), pColorState))
return m_T3FillColor;
@@ -1808,7 +1808,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
CFX_Matrix char_matrix = pType3Font->GetFontMatrix();
float font_size = textobj->m_TextState.GetFontSize();
char_matrix.Scale(font_size, font_size);
- FX_ARGB fill_argb = GetFillArgb(textobj, true);
+ FX_ARGB fill_argb = GetFillArgbForType3(textobj);
int fill_alpha = FXARGB_A(fill_argb);
int device_class = m_pDevice->GetDeviceClass();
std::vector<FXTEXT_GLYPHPOS> glyphs;
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index b15c1d1482..a7e845f237 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -89,7 +89,14 @@ class CPDF_RenderStatus {
RetainPtr<CPDF_TransferFunc> GetTransferFunc(
const CPDF_Object* pObject) const;
- FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const;
+
+ FX_ARGB GetFillArgb(CPDF_PageObject* pObj) const {
+ return GetFillArgbInternal(pObj, false);
+ }
+ FX_ARGB GetFillArgbForType3(CPDF_PageObject* pObj) const {
+ return GetFillArgbInternal(pObj, true);
+ }
+
void DrawTilingPattern(CPDF_TilingPattern* pPattern,
CPDF_PageObject* pPageObj,
const CFX_Matrix* pObj2Device,
@@ -107,6 +114,7 @@ class CPDF_RenderStatus {
const CPDF_Transparency& transparency);
private:
+ FX_ARGB GetFillArgbInternal(CPDF_PageObject* pObj, bool bType3) const;
bool ProcessTransparency(CPDF_PageObject* PageObj,
const CFX_Matrix* pObj2Device);
void ProcessObjectNoClip(CPDF_PageObject* PageObj,