summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-16 13:24:58 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-16 17:47:33 +0000
commitb370e5a8f8df8cd6827ddb99b958d6a00642035e (patch)
treeaa22efaece1304a928e9d0f6765334f9cf4ff3cb /public
parent816d7e4a0dccc049a1defe8a17e1b05c211665e1 (diff)
downloadpdfium-b370e5a8f8df8cd6827ddb99b958d6a00642035e.tar.xz
Fixed the return values of FPDFAnnot_Get{Rect|AttachmentPoints}
Currently, FPDFAnnot_Get{Rect|AttachmentPoints} would return BBox if the annotation's appearance stream is defined, which does not make much sense to the user since BBox is defined in the form space; upon rendering, the annotation's position in the device space is solely defined by its rectangle. This CL removes references to BBox in FPDFAnnot_Get{Rect| AttachmentPoints}; instead, they will only return rectangle or quadpoints as requested. The embedder test is also modified to reflect this change, and also to demonstrate that an annotation's position is changed only if its rectangle is changed. Bug=pdfium:861 Change-Id: I489876511aa5d93131dd695170d46bbc49d16574 Reviewed-on: https://pdfium-review.googlesource.com/11050 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_annot.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h
index 1de99453fc..6cd06dd9db 100644
--- a/public/fpdf_annot.h
+++ b/public/fpdf_annot.h
@@ -283,7 +283,8 @@ 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.
+// with quadpoints, then update the bounding box too if the new quadpoints
+// define a bigger one.
//
// annot - handle to an annotation.
// quadPoints - the quadpoints to be set.
@@ -294,9 +295,7 @@ FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot,
const FS_QUADPOINTSF* quadPoints);
// Experimental API.
-// Get 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 return the bounding box it specifies instead.
+// Get the attachment points (i.e. quadpoints) of an annotation.
//
// annot - handle to an annotation.
// quadPoints - receives the quadpoints; must not be NULL.
@@ -309,7 +308,8 @@ FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot,
// Experimental API.
// Set the annotation rectangle defining the location of the annotation. If the
// annotation's appearance stream is defined and this annotation is of a type
-// without quadpoints, then update the bounding box too.
+// without quadpoints, then update the bounding box too if the new rectangle
+// defines a bigger one.
//
// annot - handle to an annotation.
// rect - the annotation rectangle to be set.
@@ -319,9 +319,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
const FS_RECTF* rect);
// Experimental API.
-// Get the annotation rectangle defining the location of the annotation. If the
-// annotation's appearance stream is defined and this annotation is of a type
-// without quadpoints, then return the bounding box it specifies instead.
+// Get the annotation rectangle defining the location of the annotation.
//
// annot - handle to an annotation.
// rect - receives the rectangle; must not be NULL.