summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r--fpdfsdk/fpdfeditpath.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index a26ca5186e..60117cad32 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -35,7 +35,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
return false;
float rgb[3] = {R / 255.f, G / 255.f, B / 255.f};
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_GeneralState.SetStrokeAlpha(A / 255.f);
pPathObj->m_ColorState.SetStrokeColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
@@ -46,7 +46,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
if (!path || width < 0.0f)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_GraphState.SetLineWidth(width);
return true;
}
@@ -60,7 +60,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
return false;
float rgb[3] = {R / 255.f, G / 255.f, B / 255.f};
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_GeneralState.SetFillAlpha(A / 255.f);
pPathObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
@@ -75,7 +75,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
if (!path || !R || !G || !B || !A)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
uint32_t fillRGB = pPathObj->m_ColorState.GetFillRGB();
*R = FXSYS_GetRValue(fillRGB);
*G = FXSYS_GetGValue(fillRGB);
@@ -89,7 +89,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_MoveTo(FPDF_PAGEOBJECT path, float x, float y) {
if (!path)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false);
return true;
}
@@ -98,7 +98,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_LineTo(FPDF_PAGEOBJECT path, float x, float y) {
if (!path)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::LineTo, false);
return true;
}
@@ -113,7 +113,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
if (!path)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
pPathObj->m_Path.AppendPoint(CFX_PointF(x1, y1), FXPT_TYPE::BezierTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(x2, y2), FXPT_TYPE::BezierTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(x3, y3), FXPT_TYPE::BezierTo, false);
@@ -124,7 +124,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_Close(FPDF_PAGEOBJECT path) {
if (!path)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
if (pPathObj->m_Path.GetPoints().empty())
return false;
@@ -138,7 +138,7 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
if (!path)
return false;
- auto* pPathObj = reinterpret_cast<CPDF_PathObject*>(path);
+ auto* pPathObj = static_cast<CPDF_PathObject*>(path);
if (fillmode == FPDF_FILLMODE_ALTERNATE)
pPathObj->m_FillType = FXFILL_ALTERNATE;