summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfeditpage.cpp14
-rw-r--r--fpdfsdk/fpdfeditpath.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 699e030c49..a7ee212aee 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -168,7 +168,7 @@ DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page) {
DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,
FPDF_PAGEOBJECT page_obj) {
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(page_obj);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_obj);
if (!pPageObj)
return;
@@ -206,7 +206,7 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)
return false;
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(pageObject);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(pageObject);
int blend_type = pPageObj->m_GeneralState.GetBlendType();
if (blend_type != FXDIB_BLEND_NORMAL)
return true;
@@ -239,7 +239,7 @@ DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)
return FPDF_PAGEOBJ_UNKNOWN;
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(pageObject);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(pageObject);
return pPageObj->GetType();
}
@@ -260,7 +260,7 @@ DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
double d,
double e,
double f) {
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(page_object);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
@@ -270,7 +270,7 @@ DLLEXPORT void STDCALL FPDFPageObj_Transform(FPDF_PAGEOBJECT page_object,
DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
FPDF_BYTESTRING blend_mode) {
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(page_object);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
if (!pPageObj)
return;
@@ -331,7 +331,7 @@ FPDF_BOOL FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object,
return false;
float rgb[3] = {R / 255.f, G / 255.f, B / 255.f};
- auto* pPageObj = static_cast<CPDF_PageObject*>(page_object);
+ auto* pPageObj = CPDFPageObjectFromFPDFPageObject(page_object);
pPageObj->m_GeneralState.SetFillAlpha(A / 255.f);
pPageObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
@@ -347,7 +347,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT pageObject,
if (!pageObject)
return false;
- CPDF_PageObject* pPageObj = static_cast<CPDF_PageObject*>(pageObject);
+ CPDF_PageObject* pPageObj = CPDFPageObjectFromFPDFPageObject(pageObject);
CFX_FloatRect bbox = pPageObj->GetRect();
*left = bbox.left;
*bottom = bbox.bottom;
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 6235210113..12d8a975a3 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -194,7 +194,7 @@ DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
static_cast<int>(CFX_GraphStateData::LineJoin::LineJoinBevel)) {
return;
}
- auto* pPathObj = static_cast<CPDF_PageObject*>(path);
+ auto* pPathObj = CPDFPageObjectFromFPDFPageObject(path);
CFX_GraphStateData::LineJoin lineJoin =
static_cast<CFX_GraphStateData::LineJoin>(line_join);
pPathObj->m_GraphState.SetLineJoin(lineJoin);
@@ -208,7 +208,7 @@ DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT path, int line_cap) {
line_cap > static_cast<int>(CFX_GraphStateData::LineCap::LineCapSquare)) {
return;
}
- auto* pPathObj = static_cast<CPDF_PageObject*>(path);
+ auto* pPathObj = CPDFPageObjectFromFPDFPageObject(path);
CFX_GraphStateData::LineCap lineCap =
static_cast<CFX_GraphStateData::LineCap>(line_cap);
pPathObj->m_GraphState.SetLineCap(lineCap);