summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-06-14 11:41:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-14 16:15:20 +0000
commit603a31d0c509c7ce3c2709dcb5377a78e6ce4815 (patch)
treedc5adcb4a16ab862c6fe7393be07cd7cb8f19ecf /public
parentf0f2a2a528e154b8ceeded297abc3a64007850f8 (diff)
downloadpdfium-603a31d0c509c7ce3c2709dcb5377a78e6ce4815.tar.xz
Add blend to GraphicsData
CL [1] added the ability to set the blend mode for a page object. This CL adds the corresponding component to GraphicsData since the blend mode is part of ExtGSState. In addition, a test using the SetBlendMode method is added. [1] https://pdfium-review.googlesource.com/c/5953/ Bug: pdfium:720 Change-Id: I49120284345185c200a45cc3b37ec59f0658e2dc Reviewed-on: https://pdfium-review.googlesource.com/6510 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h53
1 files changed, 27 insertions, 26 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index aceca351cd..022832fe78 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -136,23 +136,23 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_HasTransparency(FPDF_PAGE page);
// |FPDFPage_GenerateContent| or any changes to |page| will be lost.
DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page);
-// Checks if |pageObject| contains transparency.
+// Checks if |page_object| contains transparency.
//
-// pageObject - handle to a page object.
+// page_object - handle to a page object.
//
// Returns TRUE if |pageObject| contains transparency.
DLLEXPORT FPDF_BOOL STDCALL
-FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject);
+FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT page_object);
-// Get type of |pageObject|.
+// Get type of |page_object|.
//
-// pageObject - handle to a page object.
+// page_object - handle to a page object.
//
// Returns one of the FPDF_PAGEOBJ_* values on success, FPDF_PAGEOBJ_UNKNOWN on
// error.
-DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT pageObject);
+DLLEXPORT int STDCALL FPDFPageObj_GetType(FPDF_PAGEOBJECT page_object);
-// Transform |pageObject| by the given matrix.
+// Transform |page_object| by the given matrix.
//
// page_object - handle to a page object.
// a - matrix value.
@@ -304,30 +304,30 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_CreateNewRect(float x,
float w,
float h);
-// Get the bounding box of |pageObject|.
+// Get the bounding box of |page_object|.
//
-// pageObject - handle to a page object.
-// left - pointer where the left coordinate will be stored
-// bottom - pointer where the bottom coordinate will be stored
-// right - pointer where the right coordinate will be stored
-// top - pointer where the top coordinate will be stored
+// page_object - handle to a page object.
+// left - pointer where the left coordinate will be stored
+// bottom - pointer where the bottom coordinate will be stored
+// right - pointer where the right coordinate will be stored
+// top - pointer where the top coordinate will be stored
//
// Returns TRUE on success.
-DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT pageObject,
+DLLEXPORT FPDF_BOOL STDCALL FPDFPageObj_GetBounds(FPDF_PAGEOBJECT page_object,
float* left,
float* bottom,
float* right,
float* top);
-// Set the blend mode of |pageObject|.
+// Set the blend mode of |page_object|.
//
-// pageObject - handle to a page object.
-// blend_mode - string containing the blend mode.
+// page_object - handle to a page object.
+// blend_mode - string containing the blend mode.
//
// Blend mode can be one of following: Color, ColorBurn, ColorDodge, Darken,
// Difference, Exclusion, HardLight, Hue, Lighten, Luminosity, Multiply, Normal,
// Overlay, Saturation, Screen, SoftLight
-DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page,
+DLLEXPORT void STDCALL FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
FPDF_BYTESTRING blend_mode);
// Set the stroke RGBA of a path. Range of values: 0 - 255.
@@ -353,24 +353,25 @@ DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
// Returns TRUE on success
DLLEXPORT FPDF_BOOL FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width);
-// Set the line join of |pageObject|.
+// Set the line join of |page_object|.
//
-// pageObject - handle to a page object.
-// line_join - line join
+// 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
-DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page,
+DLLEXPORT void STDCALL FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
int line_join);
-// Set the line cap of |pageObject|.
+// Set the line cap of |page_object|.
//
-// pageObject - handle to a page object.
-// line_cap - line cap
+// 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
-DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT page, int line_cap);
+DLLEXPORT void STDCALL FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
+ int line_cap);
// Set the fill RGBA of a path. Range of values: 0 - 255.
//