From 0c6b07d3fdbbabda8753e6457f4323237fc5be30 Mon Sep 17 00:00:00 2001 From: Jane Liu Date: Tue, 15 Aug 2017 10:50:22 -0400 Subject: Changed the return type of FPDFAnnot_Get{Rect|AttachmentPoints}() Instead of returning structs, changed FPDFAnnot_GetRect() and FPDFAnnot_GetAttachmentPoints() to return a bool and take a struct as an out parameter. Change-Id: I380e76eb1566b2488150fb31e9dad564a3ee10d4 Reviewed-on: https://pdfium-review.googlesource.com/10470 Reviewed-by: Lei Zhang Commit-Queue: Jane Liu --- public/fpdf_annot.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'public/fpdf_annot.h') diff --git a/public/fpdf_annot.h b/public/fpdf_annot.h index 243896eec1..1de99453fc 100644 --- a/public/fpdf_annot.h +++ b/public/fpdf_annot.h @@ -299,10 +299,12 @@ FPDFAnnot_SetAttachmentPoints(FPDF_ANNOTATION annot, // with quadpoints, then return the bounding box it specifies instead. // // annot - handle to an annotation. +// quadPoints - receives the quadpoints; must not be NULL. // -// Returns a quadpoints object, or an empty set of quadpoints on failure. -FPDF_EXPORT FS_QUADPOINTSF FPDF_CALLCONV -FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot); +// Returns true if successful. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFAnnot_GetAttachmentPoints(FPDF_ANNOTATION annot, + FS_QUADPOINTSF* quadPoints); // Experimental API. // Set the annotation rectangle defining the location of the annotation. If the @@ -322,9 +324,11 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot, // without quadpoints, then return the bounding box it specifies instead. // // annot - handle to an annotation. +// rect - receives the rectangle; must not be NULL. // -// Returns a rectangle object, or an empty rectangle on failure. -FPDF_EXPORT FS_RECTF FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot); +// Returns true if successful. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot, + FS_RECTF* rect); // Experimental API. // Check if |annot|'s dictionary has |key| as a key. -- cgit v1.2.3