summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h46
-rw-r--r--public/fpdfview.h1
2 files changed, 47 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 9ee11cb5ec..d73a740efd 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -42,6 +42,12 @@
#define FPDF_PAGEOBJ_SHADING 4
#define FPDF_PAGEOBJ_FORM 5
+// The path segment constants.
+#define FPDF_SEGMENT_UNKNOWN -1
+#define FPDF_SEGMENT_LINETO 0
+#define FPDF_SEGMENT_BEZIERTO 1
+#define FPDF_SEGMENT_MOVETO 2
+
#define FPDF_FILLMODE_ALTERNATE 1
#define FPDF_FILLMODE_WINDING 2
@@ -552,6 +558,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
unsigned int* B,
unsigned int* A);
+// Experimental API.
// Get number of point objects inside |path|.
//
// path - handle to a path.
@@ -562,6 +569,45 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
// Returns the number of objects in |path| or -1 on failure.
FPDF_EXPORT int FPDF_CALLCONV FPDFPath_CountPoint(FPDF_PAGEOBJECT path);
+// Experimental API.
+// Get segment in |path| at |index|.
+//
+// path - handle to a path.
+// index - the index of a segment.
+//
+// Returns the handle to the segment, or NULL on faiure.
+FPDF_EXPORT FPDF_PATHSEGMENT FPDF_CALLCONV
+FPDFPath_GetPathSegment(FPDF_PAGEOBJECT path, int index);
+
+// Experimental API.
+// Get coordinates of |segment|.
+//
+// segment - handle to a segment.
+// x - the horizontal position of the segment.
+// y - the vertical position of the segment.
+//
+// Returns TRUE on success, otherwise |x| and |y| is not set.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPathSegment_GetPoint(FPDF_PATHSEGMENT segment, float* x, float* y);
+
+// Experimental API.
+// Get type of |segment|.
+//
+// segment - handle to a segment.
+//
+// Returns one of the FPDF_SEGMENT_* values on success,
+// FPDF_SEGMENT_UNKNOWN on error.
+FPDF_EXPORT int FPDF_CALLCONV FPDFPathSegment_GetType(FPDF_PATHSEGMENT segment);
+
+// Experimental API.
+// Gets if the |segment| closes the current subpath of a given path.
+//
+// segment - handle to a segment.
+//
+// Returns close flag for non-NULL segment, FALSE otherwise.
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFPathSegment_GetClose(FPDF_PATHSEGMENT segment);
+
// Move a path's current point.
//
// path - the handle to the path object.
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 135d00a8f4..3f180335d3 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -52,6 +52,7 @@ typedef void* FPDF_SCHHANDLE;
typedef void* FPDF_STRUCTELEMENT;
typedef void* FPDF_STRUCTTREE;
typedef void* FPDF_TEXTPAGE;
+typedef void const* FPDF_PATHSEGMENT;
#ifdef PDF_ENABLE_XFA
typedef void* FPDF_STRINGHANDLE;