summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_transformpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_transformpage.cpp')
-rw-r--r--fpdfsdk/fpdf_transformpage.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 860ba42c96..d2d9f8dbc4 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -189,9 +189,10 @@ FPDFPageObj_TransformClipPath(FPDF_PAGEOBJECT page_object,
double d,
double e,
double f) {
- CPDF_PageObject* pPageObj = (CPDF_PageObject*)page_object;
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
+
CFX_Matrix matrix((float)a, (float)b, (float)c, (float)d, (float)e, (float)f);
// Special treatment to shading object, because the ClipPath for shading
@@ -267,7 +268,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath(FPDF_PAGE page,
return;
std::ostringstream strClip;
- CPDF_ClipPath* pClipPath = (CPDF_ClipPath*)clipPath;
+ auto* pClipPath = static_cast<CPDF_ClipPath*>(clipPath);
for (size_t i = 0; i < pClipPath->GetPathCount(); ++i) {
CPDF_Path path = pClipPath->GetPath(i);
if (path.GetPoints().empty()) {