diff options
Diffstat (limited to 'fpdfsdk/cfx_systemhandler.cpp')
-rw-r--r-- | fpdfsdk/cfx_systemhandler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp index f38be4c3e8..b897a3e0bb 100644 --- a/fpdfsdk/cfx_systemhandler.cpp +++ b/fpdfsdk/cfx_systemhandler.cpp @@ -46,14 +46,13 @@ void CFX_SystemHandler::InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect) { CFX_Matrix device2page; device2page.SetReverse(page2device); - FX_FLOAT left; - FX_FLOAT top; - FX_FLOAT right; - FX_FLOAT bottom; - device2page.Transform(static_cast<FX_FLOAT>(rect.left), - static_cast<FX_FLOAT>(rect.top), left, top); - device2page.Transform(static_cast<FX_FLOAT>(rect.right), - static_cast<FX_FLOAT>(rect.bottom), right, bottom); + FX_FLOAT left = static_cast<FX_FLOAT>(rect.left); + FX_FLOAT top = static_cast<FX_FLOAT>(rect.top); + FX_FLOAT right = static_cast<FX_FLOAT>(rect.right); + FX_FLOAT bottom = static_cast<FX_FLOAT>(rect.bottom); + device2page.TransformPoint(left, top); + device2page.TransformPoint(right, bottom); + CFX_FloatRect rcPDF(left, bottom, right, top); rcPDF.Normalize(); |