summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-05-08 22:22:41 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 22:22:41 +0000
commitdf1298a228abb59eb167d0be43d46a50c0333497 (patch)
tree9dd021fd3a97f2208367faa7737985821896a05f /public
parent7b094f81483240f50dfc12e51cf545a8f0d5933d (diff)
downloadpdfium-df1298a228abb59eb167d0be43d46a50c0333497.tar.xz
Add several FPDFPageObj_* APIschromium/3425
This CL adds the following APIs: FPDFPageObj_SetStrokeColor FPDFPageObj_GetStrokeColor FPDFPageObj_SetStrokeWidth FPDFPageObj_SetLineJoin FPDFPageObj_SetLineCap FPDFPageObj_SetFillColor FPDFPageObj_GetFillColor Bug: pdfium:980 Change-Id: I19f9abb6756314ba8bd2f66a6c38e2e722cd8473 Reviewed-on: https://pdfium-review.googlesource.com/32192 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 74c2700733..c0766a33b8 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -612,6 +612,22 @@ FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
unsigned int B,
unsigned int A);
+// Set the stroke RGBA of a page object. Range of values: 0 - 255.
+//
+// page_object - the handle to the page object.
+// R - the red component for the object's stroke color.
+// G - the green component for the object's stroke color.
+// B - the blue component for the object's stroke color.
+// A - the stroke alpha for the object.
+//
+// Returns TRUE on success.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_SetStrokeColor(FPDF_PAGEOBJECT page_object,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A);
+
// Get the stroke RGBA of a path. Range of values: 0 - 255.
//
// path - the handle to the path object.
@@ -628,6 +644,22 @@ FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
unsigned int* B,
unsigned int* A);
+// Get the stroke RGBA of a page object. Range of values: 0 - 255.
+//
+// page_object - the handle to the page object.
+// R - the red component of the path stroke color.
+// G - the green component of the object's stroke color.
+// B - the blue component of the object's stroke color.
+// A - the stroke alpha of the object.
+//
+// Returns TRUE on success.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_GetStrokeColor(FPDF_PAGEOBJECT page_object,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A);
+
// Set the stroke width of a path.
//
// path - the handle to the path object.
@@ -637,6 +669,15 @@ FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width);
+// Set the stroke width of a page object.
+//
+// path - the handle to the page object.
+// width - the width of the stroke.
+//
+// Returns TRUE on success
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_SetStrokeWidth(FPDF_PAGEOBJECT page_object, float width);
+
// Set the line join of |page_object|.
//
// page_object - handle to a page object.
@@ -647,6 +688,16 @@ FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width);
FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
int line_join);
+// Set the line join of |page_object|.
+//
+// page_object - handle to a page object.
+// line_join - line join
+//
+// Line join can be one of following: FPDF_LINEJOIN_MITER, FPDF_LINEJOIN_ROUND,
+// FPDF_LINEJOIN_BEVEL
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_SetLineJoin(FPDF_PAGEOBJECT page_object, int line_join);
+
// Set the line cap of |page_object|.
//
// page_object - handle to a page object.
@@ -657,6 +708,16 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
int line_cap);
+// Set the line cap of |page_object|.
+//
+// page_object - handle to a page object.
+// line_cap - line cap
+//
+// Line cap can be one of following: FPDF_LINECAP_BUTT, FPDF_LINECAP_ROUND,
+// FPDF_LINECAP_PROJECTING_SQUARE
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_SetLineCap(FPDF_PAGEOBJECT page_object, int line_cap);
+
// Set the fill RGBA of a path. Range of values: 0 - 255.
//
// path - the handle to the path object.
@@ -672,6 +733,22 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
unsigned int B,
unsigned int A);
+// Set the fill RGBA of a page object. Range of values: 0 - 255.
+//
+// page_object - the handle to the page object.
+// R - the red component for the object's fill color.
+// G - the green component for the object's fill color.
+// B - the blue component for the object's fill color.
+// A - the fill alpha for the object.
+//
+// Returns TRUE on success.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object,
+ unsigned int R,
+ unsigned int G,
+ unsigned int B,
+ unsigned int A);
+
// Get the fill RGBA of a path. Range of values: 0 - 255.
//
// path - the handle to the path object.
@@ -687,6 +764,22 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
unsigned int* B,
unsigned int* A);
+// Get the fill RGBA of a page object. Range of values: 0 - 255.
+//
+// page_object - the handle to the page object.
+// R - the red component of the object's fill color.
+// G - the green component of the object's fill color.
+// B - the blue component of the object's fill color.
+// A - the fill alpha of the object.
+//
+// Returns TRUE on success.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPageObj_GetFillColor(FPDF_PAGEOBJECT page_object,
+ unsigned int* R,
+ unsigned int* G,
+ unsigned int* B,
+ unsigned int* A);
+
// Experimental API.
// Get number of segments inside |path|.
//