summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp6
-rw-r--r--core/src/fxge/ge/fx_ge_device.cpp9
2 files changed, 6 insertions, 9 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 5998a9236c..e4876a0d26 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -914,8 +914,7 @@ void CPDF_RenderStatus::DrawShadingPattern(CPDF_ShadingPattern* pattern,
return;
}
} else if (pPageObj->IsImage()) {
- FX_RECT rect = pPageObj->GetBBox(pObj2Device);
- m_pDevice->SetClip_Rect(&rect);
+ m_pDevice->SetClip_Rect(pPageObj->GetBBox(pObj2Device));
} else {
return;
}
@@ -996,8 +995,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern,
return;
}
} else if (pPageObj->IsImage()) {
- FX_RECT rect = pPageObj->GetBBox(pObj2Device);
- m_pDevice->SetClip_Rect(&rect);
+ m_pDevice->SetClip_Rect(pPageObj->GetBBox(pObj2Device));
} else {
return;
}
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 268001b285..c4f7735957 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -91,13 +91,12 @@ FX_BOOL CFX_RenderDevice::SetClip_PathStroke(
UpdateClipBox();
return TRUE;
}
-FX_BOOL CFX_RenderDevice::SetClip_Rect(const FX_RECT* pRect) {
+FX_BOOL CFX_RenderDevice::SetClip_Rect(const FX_RECT& rect) {
CFX_PathData path;
- path.AppendRect((FX_FLOAT)(pRect->left), (FX_FLOAT)(pRect->bottom),
- (FX_FLOAT)(pRect->right), (FX_FLOAT)(pRect->top));
- if (!SetClip_PathFill(&path, NULL, FXFILL_WINDING)) {
+ path.AppendRect(rect.left, rect.bottom, rect.right, rect.top);
+ if (!SetClip_PathFill(&path, nullptr, FXFILL_WINDING))
return FALSE;
- }
+
UpdateClipBox();
return TRUE;
}