Use floats in experimental APIs.
Floats work more seamlessly with the underlying implementation, which
uses floats instead of doubles. Along the way, take advantage of
FS_MATRIX to reduce the number of parameters in these APIs. Also
introduce FS_POINTF for the same purpose.
NOTE: This breaks API compatibility.
The modified APIS are:
- FPDFAnnot_GetFormFieldAtPoint
- FPDFFormObj_GetMatrix
- FPDFPath_GetMatrix
- FPDFPath_SetMatrix
- FPDFText_GetCharAngle
- FPDFText_GetLooseCharBox
- FPDFTextObj_GetFontSize
- FPDFTextObj_GetMatrix
Bug: pdfium:996
Change-Id: I58d43928811cf019fef3017ebce670322720db4d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/61873
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp
index b789891..ec361d5 100644
--- a/fpdfsdk/fpdf_doc.cpp
+++ b/fpdfsdk/fpdf_doc.cpp
@@ -367,7 +367,7 @@
return false;
CPDF_Dictionary* pAnnotDict = CPDFDictionaryFromFPDFLink(link_annot);
- *rect = FSRECTFFromCFXFloatRect(pAnnotDict->GetRectFor("Rect"));
+ *rect = FSRectFFromCFXFloatRect(pAnnotDict->GetRectFor("Rect"));
return true;
}