summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfannot.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-10-31 13:32:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-10-31 13:32:17 +0000
commit367e7de07ec33ad045500a04dc2a180390937b27 (patch)
tree1b286d0be1c9e4db933d31c22aceb92aac7f3f7b /fpdfsdk/fpdfannot.cpp
parent8aa3002c673f36909560575514b9a9474e5e66bf (diff)
downloadpdfium-367e7de07ec33ad045500a04dc2a180390937b27.tar.xz
Add FS_RECTF conversion functions.
Change-Id: I87fb109fdd121716a170df15c4762496c1ccb88c Reviewed-on: https://pdfium-review.googlesource.com/17210 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfannot.cpp')
-rw-r--r--fpdfsdk/fpdfannot.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfannot.cpp b/fpdfsdk/fpdfannot.cpp
index 09bf42af92..ec541f55d0 100644
--- a/fpdfsdk/fpdfannot.cpp
+++ b/fpdfsdk/fpdfannot.cpp
@@ -644,7 +644,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_SetRect(FPDF_ANNOTATION annot,
if (!pAnnotDict)
return false;
- CFX_FloatRect newRect(rect->left, rect->bottom, rect->right, rect->top);
+ CFX_FloatRect newRect = CFXFloatRectFromFSRECTF(*rect);
// Update the "Rect" entry in the annotation dictionary.
pAnnotDict->SetRectFor("Rect", newRect);
@@ -674,11 +674,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot,
if (!pAnnotDict)
return false;
- CFX_FloatRect rt = pAnnotDict->GetRectFor("Rect");
- rect->left = rt.left;
- rect->bottom = rt.bottom;
- rect->right = rt.right;
- rect->top = rt.top;
+ FSRECTFFromCFXFloatRect(pAnnotDict->GetRectFor("Rect"), rect);
return true;
}