diff options
author | Ralf Sippl <ralf.sippl@gmail.com> | 2018-04-12 21:20:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-12 21:20:26 +0000 |
commit | 1638179e85863b5045fcea2282fd3e0622aeac13 (patch) | |
tree | e21cc4c409ed04ccb4496f17c4edcc0d8f586cdc /public | |
parent | c9f4f0dbcaaf9e86ef2b64c844b094bd2f6b1a92 (diff) | |
download | pdfium-1638179e85863b5045fcea2282fd3e0622aeac13.tar.xz |
Add index parameter to quadpoints getter and setter.
This is needed for working with multiline text markup
annotations.
Based on https://pdfium-review.googlesource.com/12012.
Bug: pdfium:1045
Change-Id: Ifb105996b8b950bb2d5fceaf754b4f571155aef4
Reviewed-on: https://pdfium-review.googlesource.com/29150
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdf_annot.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h index a84c4f982a..8e9b93e12d 100644 --- a/public/fpdf_annot.h +++ b/public/fpdf_annot.h @@ -285,7 +285,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetColor(FPDF_ANNOTATION annot, // Experimental API. // Check if the annotation is of a type that has attachment points -// (i.e. quadpoints). Quadpoints are the vertices of the rectange that +// (i.e. quadpoints). Quadpoints are the vertices of the rectangle that // encompasses the texts affected by the annotation. They provide the // coordinates in the page where the annotation is attached. Only text markup // annotations (i.e. highlight, strikeout, squiggly, and underline) and link @@ -299,20 +299,38 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasAttachmentPoints(FPDF_ANNOTATION annot); // Experimental API. -// Set the attachment points (i.e. quadpoints) of an annotation. If the -// annotation's appearance stream is defined and this annotation is of a type -// with quadpoints, then update the bounding box too if the new quadpoints +// Replace the attachment points (i.e. quadpoints) set of an annotation at +// |quad_index|. This index needs to be within the result of +// FPDFAnnot_CountAttachmentPoints(). +// If the annotation's appearance stream is defined and this annotation is of a +// type with quadpoints, then update the bounding box too if the new quadpoints // define a bigger one. // // annot - handle to an annotation. +// quad_index - index of the set of quadpoints. // quad_points - the quadpoints to be set. // // Returns true if successful. FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot, + size_t quad_index, const FS_QUADPOINTSF* quad_points); // Experimental API. +// Append to the list of attachment points (i.e. quadpoints) of an annotation. +// If the annotation's appearance stream is defined and this annotation is of a +// type with quadpoints, then update the bounding box too if the new quadpoints +// define a bigger one. +// +// annot - handle to an annotation. +// quad_points - the quadpoints to be set. +// +// Returns true if successful. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFAnnot_AppendAttachmentPoints(FPDF_ANNOTATION annot, + const FS_QUADPOINTSF* quad_points); + +// Experimental API. // Get the number of sets of quadpoints of an annotation. // // annot - handle to an annotation. @@ -325,11 +343,13 @@ FPDFAnnot_CountAttachmentPoints(FPDF_ANNOTATION annot); // Get the attachment points (i.e. quadpoints) of an annotation. // // annot - handle to an annotation. +// quad_index - index of the set of quadpoints. // quad_points - receives the quadpoints; must not be NULL. // // Returns true if successful. FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot, + size_t quad_index, FS_QUADPOINTSF* quad_points); // Experimental API. |