From 12abfd04a42a1166f7d1496beb63515bc47ec360 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 15 Sep 2017 07:49:03 +0200 Subject: Add public method FPDFPath_CountPoint to get # of points of a path object. It was already possible to get the fill color, this exposes the number of points. Naming attempts to be consistent with existing FPDFPage_CountObject(). Change-Id: I79e8dd9f0c077de84ce9017a01d239e48e58174a Reviewed-on: https://pdfium-review.googlesource.com/13592 Reviewed-by: Lei Zhang Commit-Queue: Lei Zhang --- public/fpdf_edit.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'public/fpdf_edit.h') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 22582674ea..9ee11cb5ec 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -552,6 +552,16 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path, unsigned int* B, unsigned int* A); +// Get number of point objects inside |path|. +// +// path - handle to a path. +// +// A point object is a command, created by e.g. FPDFPath_MoveTo() or +// FPDFPath_LineTo(). +// +// Returns the number of objects in |path| or -1 on failure. +FPDF_EXPORT int FPDF_CALLCONV FPDFPath_CountPoint(FPDF_PAGEOBJECT path); + // Move a path's current point. // // path - the handle to the path object. -- cgit v1.2.3