summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp17
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h4
2 files changed, 12 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 8899867354..66688a2d4c 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1305,7 +1305,7 @@ bool CPDF_RenderStatus::ProcessPath(CPDF_PathObject* pPathObj,
const CFX_Matrix* pObj2Device) {
int FillType = pPathObj->m_FillType;
bool bStroke = pPathObj->m_bStroke;
- ProcessPathPattern(pPathObj, pObj2Device, FillType, bStroke);
+ ProcessPathPattern(pPathObj, pObj2Device, &FillType, &bStroke);
if (FillType == 0 && !bStroke)
return true;
@@ -2414,20 +2414,23 @@ void CPDF_RenderStatus::DrawPathWithPattern(CPDF_PathObject* pPathObj,
void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj,
const CFX_Matrix* pObj2Device,
- int& filltype,
- bool& bStroke) {
- if (filltype) {
+ int* filltype,
+ bool* bStroke) {
+ ASSERT(filltype);
+ ASSERT(bStroke);
+
+ if (*filltype) {
const CPDF_Color& FillColor = *pPathObj->m_ColorState.GetFillColor();
if (FillColor.IsPattern()) {
DrawPathWithPattern(pPathObj, pObj2Device, &FillColor, false);
- filltype = 0;
+ *filltype = 0;
}
}
- if (bStroke) {
+ if (*bStroke) {
const CPDF_Color& StrokeColor = *pPathObj->m_ColorState.GetStrokeColor();
if (StrokeColor.IsPattern()) {
DrawPathWithPattern(pPathObj, pObj2Device, &StrokeColor, true);
- bStroke = false;
+ *bStroke = false;
}
}
}
diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h
index c8b7b09017..8008092766 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.h
+++ b/core/fpdfapi/render/cpdf_renderstatus.h
@@ -109,8 +109,8 @@ class CPDF_RenderStatus {
bool ProcessPath(CPDF_PathObject* pPathObj, const CFX_Matrix* pObj2Device);
void ProcessPathPattern(CPDF_PathObject* pPathObj,
const CFX_Matrix* pObj2Device,
- int& filltype,
- bool& bStroke);
+ int* filltype,
+ bool* bStroke);
void DrawPathWithPattern(CPDF_PathObject* pPathObj,
const CFX_Matrix* pObj2Device,
const CPDF_Color* pColor,