From 77f9bff2c229df771a43448a9d5087e042235936 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 29 Aug 2017 11:34:12 -0700 Subject: Reduce rounding errors when Invalidating rects. Instead of using CFX_FloatRect::ToFxRect(), which always rounds down, use GetOuterRect() which correctly rounds up / down depending on the side of the rectangle. Change-Id: I7abd3a65e8c0467ed4303292f26a72737a5d553b Reviewed-on: https://pdfium-review.googlesource.com/12312 Commit-Queue: dsinclair Reviewed-by: dsinclair --- fpdfsdk/cfx_systemhandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk/cfx_systemhandler.h') diff --git a/fpdfsdk/cfx_systemhandler.h b/fpdfsdk/cfx_systemhandler.h index 7402ac3c4f..c5da75579b 100644 --- a/fpdfsdk/cfx_systemhandler.h +++ b/fpdfsdk/cfx_systemhandler.h @@ -53,7 +53,7 @@ class CFX_SystemHandler { explicit CFX_SystemHandler(CPDFSDK_FormFillEnvironment* pFormFillEnv); ~CFX_SystemHandler(); - void InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect); + void InvalidateRect(CPDFSDK_Widget* widget, const CFX_FloatRect& rect); void OutputSelectedRect(CFFL_FormFiller* pFormFiller, CFX_FloatRect& rect); bool IsSelectionImplemented() const; void SetCursor(int32_t nCursorType); -- cgit v1.2.3