summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpath.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-10 14:13:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-10 18:30:02 +0000
commit00d2ad12fa9d37581fd12d2ea5ea702c9e2e2e16 (patch)
tree14aee847aea03dcab44a07383dfb7539f891738a /fpdfsdk/fpdfeditpath.cpp
parentd9b0dac5e78795fa916c163fac385182fc9ceea9 (diff)
downloadpdfium-00d2ad12fa9d37581fd12d2ea5ea702c9e2e2e16.tar.xz
Rename DLLEXPORT AND STDCALL
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to be more PDFium specific. This is split off of https://pdfium-review.googlesource.com/c/8970 by Felix Kauselmann. Bug: pdfium:825 Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998 Reviewed-on: https://pdfium-review.googlesource.com/10610 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r--fpdfsdk/fpdfeditpath.cpp98
1 files changed, 51 insertions, 47 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp
index 2181df8406..19d47e6a44 100644
--- a/fpdfsdk/fpdfeditpath.cpp
+++ b/fpdfsdk/fpdfeditpath.cpp
@@ -26,28 +26,30 @@ static_assert(CFX_GraphStateData::LineJoinRound == FPDF_LINEJOIN_ROUND,
static_assert(CFX_GraphStateData::LineJoinBevel == FPDF_LINEJOIN_BEVEL,
"CFX_GraphStateData::LineJoinBevel value mismatch");
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewPath(float x, float y) {
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewPath(float x,
+ float y) {
auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendPoint(CFX_PointF(x, y), FXPT_TYPE::MoveTo, false);
pPathObj->DefaultStates();
return pPathObj.release(); // Caller takes ownership.
}
-DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x,
- float y,
- float w,
- float h) {
+FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPageObj_CreateNewRect(float x,
+ float y,
+ float w,
+ float h) {
auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendRect(x, y, x + w, y + h);
pPathObj->DefaultStates();
return pPathObj.release(); // Caller takes ownership.
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
if (!path || R > 255 || G > 255 || B > 255 || A > 255)
return false;
@@ -60,11 +62,12 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A) {
if (!path || !R || !G || !B || !A)
return false;
@@ -78,8 +81,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path,
- float width) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
if (!path || width < 0.0f)
return false;
@@ -89,19 +92,19 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
- unsigned int R,
- unsigned int G,
- unsigned int B,
- unsigned int A) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A) {
return FPDFPageObj_SetFillColor(path, R, G, B, A);
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
- unsigned int* R,
- unsigned int* G,
- unsigned int* B,
- unsigned int* A) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A) {
if (!path || !R || !G || !B || !A)
return false;
@@ -115,9 +118,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
- float x,
- float y) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y) {
if (!path)
return false;
@@ -127,9 +130,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_MoveTo(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path,
- float x,
- float y) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_LineTo(FPDF_PAGEOBJECT path,
+ float x,
+ float y) {
if (!path)
return false;
@@ -139,13 +142,13 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_LineTo(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
- float x1,
- float y1,
- float x2,
- float y2,
- float x3,
- float y3) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
+ float x1,
+ float y1,
+ float x2,
+ float y2,
+ float x3,
+ float y3) {
if (!path)
return false;
@@ -157,7 +160,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_BezierTo(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_Close(FPDF_PAGEOBJECT path) {
if (!path)
return false;
@@ -170,9 +173,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_Close(FPDF_PAGEOBJECT path) {
return true;
}
-DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
- int fillmode,
- FPDF_BOOL stroke) {
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
+ int fillmode,
+ FPDF_BOOL stroke) {
if (!path)
return false;
@@ -189,8 +192,8 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPath_SetDrawMode(FPDF_PAGEOBJECT path,
return true;
}
-DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
- int line_join) {
+FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
+ int line_join) {
if (!path)
return;
if (line_join <
@@ -206,7 +209,8 @@ DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT path,
pPathObj->SetDirty(true);
}
-DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT path, int line_cap) {
+FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT path,
+ int line_cap) {
if (!path)
return;
if (line_cap < static_cast<int>(CFX_GraphStateData::LineCap::LineCapButt) ||