Avoid rounding errors in wxMSW wxDC scaling code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Apr 2011 22:57:42 +0000 (22:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Apr 2011 22:57:42 +0000 (22:57 +0000)
commita152f137f6c21cd47d74df0e7a98cdb55e4ca178
tree05595d758503dfff1fa375b50ee1aa9eb8e27da0
parent42604e44bec70f5a26cabb26653f7ca1490fb04e
Avoid rounding errors in wxMSW wxDC scaling code.

Multiply by scale factor when it's > 1 and divide by it when it's < 1 to avoid
rounding errors. By choosing whether to increase the viewport or window
extents we increase precisions without any apparent negative effects (at least
under Windows NT where the coordinates in 2^27 range are supported, but even
under Windows 9x it's not clear if the old code was better as while we never
overflowed the viewport extents, we could overflow the window ones easily for
small zoom factors).

Closes #9554.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/dc.cpp